View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JLatham JLatham is offline
external usenet poster
 
Posts: 3,365
Default Vlookup with if statement

Building on the information HTC provided, you may try this to see when the
value in A2 is not contained in the first column of the lookup table (named
range 'downtime')

=IF(ISNA(VLOOKUP(A2,downtime,6,FALSE)),"not in
list",IF(VLOOKUP(A2,downtime,6,FALSE)0,VLOOKUP(A2 ,downtime,6,FALSE),24))

So the question becomes "what do you need to do when the value in A2 is not
one of the entries in column 1 of the downtime table?"

"HTC" wrote:

Typically, Excel returns an N/A on a VLOOKUP when it cannot find the value in
your A2 cell in the downtime chart. Is the value you are trying to lookup in
cell A2 contained within the first column of the downtime detail?

"Trishames" wrote:

I am getting #n/a with this formula
=IF(VLOOKUP(A2,downtime,6,FALSE)0,VLOOKUP(A2,down time,6,FALSE),24) where
downtime is a range and column 6 is the value I want returned if true if
false, I want 24 and all I get is #N/A

Can anyone please help

Thank you
--
Trish McConnell