View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default VLOOKUP #N/A Error

If you have unique column headers then you can use a MATCH function to get
the column_index_number for you.

...........A..........B..........C..........D
1....Name......H1........H2........H3
2....Sue..........x...........y...........z
3....Joe..........a...........b...........c

Where Hn = column headers

To lookup Joe and H2:

=VLOOKUP("Joe",A1:D3,MATCH("H2",A1:D1,0),0)

Result = b

--
Biff
Microsoft Excel MVP


"NM" wrote in message
...
Thanks Sheeloo! With your help I was able to fix my #N/A error.

Another question: What is the fastest way to calculate the column index
number.Say for eg. how do you calculate the column index number for
columns
which fall to the extreme right? I mean my column index is BR, say my
table
range starts from A, what will be the coulmn index number for BR? Do I
count
all the way to BR?

Thanks for your help.

"Sheeloo" wrote:

Suppose you are using
=VLOOKUP(A1,C:D,2,False)

Then make sure that A1 is one of the values in Col C...

If your fourth parameter is TRUE or you are not using one then make sure
that Col C & D are sorted on Col C...

If you are using a formula in A1, then make sure it returns a valid
value...

Just to test replace A1 by 10
and add one row with 10 in Col C and TEST in Col D
you should get TEST as a result of the formula above.


"NM" wrote:

Hi,

I'm using a VLOOKUP formula and I'm getting a #N/A
error! The calculation steps show error at the 'lookup_value'.I've
tried by
best but cannot work through it.Can you please let me know how to get
rid of
this.

Thanks!