Having trouble with vlookup and match

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If column a has a limited # of phone numbers in 1 sheet and in the 2nd sheet
I have those numbers embedded with many others as well as additional
information in columns b,c,d,... =

how do I pull the data in columns b,c,d,... only associated with the phone
numbers in sheet 1?
 
Use the vlookup function. If your data in sheet1 begins in A2, then your
function in B2 would be =vlookup($a2,Sheet2!A:D,2,false). Copy that formula
to columns C, D, etc, changing the final 2 to a 3 in column C, 4 in column D,
and so on (if your additional information extends past column D, you'll have
to adjust the A:D so that the ending column is the final column of your
additional data). Then select all the formulas in row 2 and autofill them
into the remaining rows of your table in sheet1.
 
Thanks, I will try right now.

Aside: By "auto-fill" you mean drag down, yes?
 
I got all #N/A's; any guess?

bpeltzer said:
Use the vlookup function. If your data in sheet1 begins in A2, then your
function in B2 would be =vlookup($a2,Sheet2!A:D,2,false). Copy that formula
to columns C, D, etc, changing the final 2 to a 3 in column C, 4 in column D,
and so on (if your additional information extends past column D, you'll have
to adjust the A:D so that the ending column is the final column of your
additional data). Then select all the formulas in row 2 and autofill them
into the remaining rows of your table in sheet1.
 
#N/A indicates that the contents of A2 weren't found anywhere in column A on
sheet2. Are you confident that that's NOT the case? Is it possible that
either the data in sheet1!A2 or the corresponding entry in column A of sheet2
has spaces before or after, or perhaps one is text and the other numeric?
Spaces and/or strings are the issue, which has the spaces and which doesn't?
Which is numeric and which isn't?
 
when I cut and pasted and asked it to find it found it; wouldn't that denote
all was in order with format?
 
No it wouldn't. The fnd is a little more forgiving. Best way to check for
spaces is to select the cell and click in the formula bar. If you go to the
very beginning of the 'formula', is there a space before the number? If you
go the very end, is there a space after?
As for whether a 'number' really is a number or just a string representation
of a number, click in the cell and apply the comma style. Did you get two
decimal points? Yes implies a number, no implies a string.
Check for both issues both on Sheet1!A2 and the matching cell on Sheet2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top