Using vlookup when referencing text

G

Guest

I am setting up a spreadsheet for a friend that will auto populate his
clients information once he has selected a client name from a data validation
list.

I try to use a vlookup function by referencing the client name in the
dropdown list. However, i always get a N/A error. What could be causing
this. The list of clients on the dropdown is taken directly from the list on
the page in which the range is referencing so the names are exactly the same
(no extra spaces). Here is the formula i am trying to enter

=vlookup(C7,Lists!A:G,1,False)
C7 is the cell which contains the drop down list of client names ie "City of
Austin"
the sheet 'lists' contains the list of clients and other pertinent
information. so in this formula I am trying to return the value for customer
number in column A that corresponds to the client name (which is in column B).

Any help is much appreciated
 
G

Guest

VLOOKUP requires the field which is being matched to be in the leftmost
(first) column. of the lookup table As I understand it, it is in column B of
your table; so you need to swap columns A & B and change VLOOKUP to be:

=vlookup(C7,Lists!A:G,2,False)

HTH
 
F

Franz Verga

pblenis said:
I am setting up a spreadsheet for a friend that will auto populate his
clients information once he has selected a client name from a data
validation list.

I try to use a vlookup function by referencing the client name in the
dropdown list. However, i always get a N/A error. What could be
causing this. The list of clients on the dropdown is taken directly
from the list on the page in which the range is referencing so the
names are exactly the same (no extra spaces). Here is the formula i
am trying to enter

=vlookup(C7,Lists!A:G,1,False)
C7 is the cell which contains the drop down list of client names ie
"City of Austin"
the sheet 'lists' contains the list of clients and other pertinent
information. so in this formula I am trying to return the value for
customer number in column A that corresponds to the client name
(which is in column B).

Any help is much appreciated

Hi,

If you are looking for a client name, the column with names *must* be the
first in your table.


--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy
 

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

Top