View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB
 
Posts: n/a
Default complicated If condition?

One way, you can replace the 2 with

IF(B5="N",2,IF(B5="R",7))

If B5 is neither you could add a third option (I used 1).
IF(B5="N",2,IF(B5="R",7,1))


"MIchel Khennafi" wrote:

Good afternoon,

In A5, I have the following formula:

=IF(ISNA(VLOOKUP($C10,vac_calc,2,FALSE)),"Not in
list",VLOOKUP($C10,vac_calc,2,FALSE))


I need to insert a new condition within this condition: I need to test the
value of a cell located in B5.

if B5="N" then do IF(ISNA(VLOOKUP($C10,vac_calc,2,FALSE)),"Not in
list",VLOOKUP($C10,vac_calc,2,FALSE))

if B5="R" then do VLOOKUP($C10,vac_calc,7,FALSE)

How do I modify the formula in A5?

Thanks for your help

M.