ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using vlookup when referencing text (https://www.excelbanter.com/excel-discussion-misc-queries/96146-using-vlookup-when-referencing-text.html)

pblenis

Using vlookup when referencing text
 
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

Toppers

Using vlookup when referencing text
 
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


"pblenis" wrote:

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


pblenis

Using vlookup when referencing text
 
That did it, thanks alot, ill have to remember that in the future

"Toppers" wrote:

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


"pblenis" wrote:

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


Franz Verga

Using vlookup when referencing text
 
pblenis wrote:
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




All times are GMT +1. The time now is 01:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com