Nexsted if across 3 columns

F

Felicity Geronimo

Hi,

I need to check 3 columns nx to each other to see if true or false
appears in these cells for example:

A B C
FALSE TRUE FALSE
#N/A #N/A #N/A
FALSE FALSE TRUE
FALSE FALSE TRUE
FALSE FALSE TRUE
#N/A #N/A TRUE
#N/A #N/A TRUE
#N/A #N/A TRUE
#N/A #N/A TRUE
#N/A #N/A TRUE
TRUE FALSE FALSE

I want to write a formula that says if column A = false, check column
B, if that also says false check column C

If True appears in column A i want it to display column A
If True appears in column B i want it to display column B
If True appears in column C i want it to display column C
If any column contains #N/A i want it to move to next column and check
again
If all 3 columns contain #N/A I want it to display "Not found"

Thanks
 
J

Jason Morin

Try this in D1 and fill down:

=IF(ISNUMBER(MATCH(TRUE,A1:C1,0)),TRUE,"Not Found")

HTH
Jason
Atlanta, GA
 
R

Ron Rosenfeld

Hi,

I need to check 3 columns nx to each other to see if true or false
appears in these cells for example:

A B C
FALSE TRUE FALSE
#N/A #N/A #N/A
FALSE FALSE TRUE
FALSE FALSE TRUE
FALSE FALSE TRUE
#N/A #N/A TRUE
#N/A #N/A TRUE
#N/A #N/A TRUE
#N/A #N/A TRUE
#N/A #N/A TRUE
TRUE FALSE FALSE

I want to write a formula that says if column A = false, check column
B, if that also says false check column C

If True appears in column A i want it to display column A
If True appears in column B i want it to display column B
If True appears in column C i want it to display column C
If any column contains #N/A i want it to move to next column and check
again
If all 3 columns contain #N/A I want it to display "Not found"

Thanks

Your description implies that the columns may contain ONLY TRUE, FALSE or #N/A
and also that there will only be a single TRUE.

The following formula appears to do what you describe:

=IF(COUNTIF(A1:C1,NA())=3,"not found",
CHOOSE(MATCH(TRUE,A1:C1,0),"column A","column B","columnC"))


--ron
 
B

Bernard Liengme

If you want a true naive formula!!!
=IF(ISNA(C1),IF(ISNA(B1),IF(A1,"Col A","?"),IF(B1,"Col B",IF(A1,"Col A"))),
IF(C1,"Col C", IF(ISNA(B1),IF(A1,"Col A","?"),IF(B1,"Col B",IF(A1,"Col
A")))))
 
F

Felicity Geronimo

Thnakyou very much, this works perfectly well - howver, please can you
let me know what the "?" actually does?

Many Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top