ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   3 level nested if please explain (https://www.excelbanter.com/excel-discussion-misc-queries/152905-3-level-nested-if-please-explain.html)

Janis

3 level nested if please explain
 
=if(isna(vlookup_1),if(isna(vlookup_2), if(isna(vlookup_3),"not present",
vlookup_3),vlookup_2),vlookup_1)


just trying to understand what someone gave me earlier.

if value is #n/a do first lookup
T ^ F
(do second lookup) (if its false do nothing)
T ^ F
(3rd lookup) (do nothing)
T ^ F
(not present) (do nothing)

the last 3 after the comma is what is confusing after the "not present"

vlookup_3), vlookup_2), vlookup_1)) this is the nested part but where does
it go in my diagram?

thanks,

JE McGimpsey

3 level nested if please explain
 
Your (do nothing)s are incorrect.

One way to visualize:

Start with

=IF(criterion1, True1, False1)

(e.g., where criterion1 is ISNA(VLOOKUP_1))

Now substitute the second IF() statement for True1

=IF(criterion1, IF(criterion2, True2, False2), False1)

and the third IF() statement for True2:

=IF(criterion1, IF(criterion2, IF(criterion3, True3, False3)
, False2), False1)


whe

criterion1: ISNA(VLOOKUP_1)
criterion2: ISNA(VLOOKUP_2)
criterion3: ISNA(VLOOKUP_3)

False1: VLOOKUP_1
False2: VLOOKUP_2
False3: VLOOKUP_3

TRUE3: "not present"



In article ,
Janis wrote:

=if(isna(vlookup_1),if(isna(vlookup_2), if(isna(vlookup_3),"not present",
vlookup_3),vlookup_2),vlookup_1)


just trying to understand what someone gave me earlier.

if value is #n/a do first lookup
T ^ F
(do second lookup) (if its false do nothing)
T ^ F
(3rd lookup) (do nothing)
T ^ F
(not present) (do nothing)

the last 3 after the comma is what is confusing after the "not present"

vlookup_3), vlookup_2), vlookup_1)) this is the nested part but where does
it go in my diagram?

thanks,



All times are GMT +1. The time now is 11:54 PM.

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