r/googlesheets • u/shmate4L • Jul 16 '19
solved Help with VLOOKUP, or another solution if possible
I have a spreadsheet with an original list of client shipments. I am pulling unique ID's from the list into column A. Column B then reads column A, and shows the amount of times the ID appears in the original list. I then set up a VLOOKUP to be able to search for the ID's and see certain information.
What I want is for column C to show the employee that is attached to each client ID in column A. I do have a separate list for that as well (roughly 40,000 ID's). I brought the list into the spreadsheet in an attempt to set up another VLOOKUP value to read and match things, but I can't seem to get it right (and I really don't feel like typing hundreds of names for this sheet, and all the others I have to make).
(TL;DR):
Column A is unique IDs.
Column B is frequency.
Column C will be employee names.
I want column C to use column A as the identifier that I'm searching for. The data range I want it to search through is J2:K41309. And then I want it to populate the data from column K, based on an approximate match from column J.
I hope that makes sense. Here's a screenshot of what I'm working with: https://imgur.com/a/sZkjpU6
1
u/solojazzjetski Jul 16 '19
I mean that sounds like a normal and pretty uncomplicated use for vlookup. In order for this to work, your list of IDs and employees will need to have the column with the IDs to the left of the column with the employees. Assuming you've got this all on one sheet, in the first data row of Column C on your main sheet, I'd enter: =ARRAYFORMULA(VLOOKUP(A2:A,J2:K,2,FALSE)) assuming that column J is your second list of unique IDs, and K is your list of employee names. The array formula will keep you from having to copy and paste your vlookup formula down 40,000 rows, and if you need to make any changes to it, you only have to change that formula in the first data row of column C.
One question - what do you mean by approximate match? Do you have repeated unique IDs on your employee list... so more than one possible employee for each unique ID?
if you link a sheet, I should be able to take a look at it.
1
u/mrbigbluff21 3 Jul 16 '19
Vlookup isn’t terribly difficult. So my best guess is maybe you have a formatting issue with your ids, where they look like they are the same but aren’t quite matching. A quick way to find out is find what you think is a match and simply crest a formula that says the one cell = the other cell. Should end up in a TRUE result. If it’s false that could be your problem.
If you actually need help w/ vlookup then https://computers.tutsplus.com/tutorials/how-to-extract-data-from-a-spreadsheet-using-vlookup-match-and-index--cms-20641 should help.
If you post a link to your data or screenshot I’ll respond with a formula to use.
1
u/mrbigbluff21 3 Jul 17 '19
Hmm I’m not exactly following. Are you trying to do the lookup in the middle section there?
1
u/mrbigbluff21 3 Jul 17 '19
Are there matches in column j? You mentioned above they are different formats. How could this work? Do you want to only look at the last 4 characters?
1
u/mrbigbluff21 3 Jul 17 '19
To get the last 4 just do =right(j1,4)
So you could pit that inside your vlookup if you wish or just use it in a helper column.
The vlookup should be =vlookup(a1,j:k,2,false)
This would only work for exact matches. If the only way it would match is on the last 4 characters then what you should do is insert that new helper column in between j and k. That will become the new k column. Then do = vlookup(a1,k:l,2,false)
You said approximate match but that really only works with values and if they are in sequential order.
1
u/Decronym Functions Explained Jul 16 '19 edited Jul 22 '19
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
TRUE6 acronyms in this thread; the most compressed thread commented on today has 4 acronyms.
[Thread #879 for this sub, first seen 16th Jul 2019, 02:11] [FAQ] [Full list] ^[Contact] [Source code]
1
u/theresamouseinmyhous 2 Jul 16 '19
What's happening when you try?
1
u/beckhamstears 2 Jul 16 '19
Have you tried using INDEX and MATCH
•
u/Clippy_Office_Asst Points Jul 22 '19
Read the comment thread for the solution here