Formula for returning values if true or false

H

Heather

I have a spreadsheet which has three columns headed code 1 code 2 code 3. If a cell in a code 1 has an X I want that column heading returned, if its not found in that column then go to next column find the X and return that column heading instead eg code 2, and so on

Does anyone know how this may be done ?
 
K

kkknie

This formula checks only the first 100 rows, but can be adapted to d
the entire column by changing the ranges:

=IF(ISERROR(MATCH("X",A2:A100)), IF(ISERROR(MATCH("X",B2:B100))
IF(ISERROR(MATCH("X",C2:C100)), "NONE", C1), B1), A1)

Even better, I tested it BEFORE I posted it...
 
Top