ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   complicated If condition? (https://www.excelbanter.com/excel-worksheet-functions/87989-complicated-if-condition.html)

MIchel Khennafi

complicated If condition?
 
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.



JMB

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.





All times are GMT +1. The time now is 12:56 AM.

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