CASH | CREDIT CARD | MIX | Lookup | Return Value | ||
A | Y | N | N | A | CASH | |
B | N | Y | N | B | CREDIT CARD | |
C | N | N | Y | C | MIX | |
D | N | Y | N | D | CREDIT CARD |
Hi, Does anyone know the formula that I can use to lookup value A across 3 columns (CASH, CREDIT CARD, MIX). if either of the columns have a Y value, return the value as the column header.
Currently the formula I am using is =IF(XLOOKUP(F2,$A$2:$A$5,$B$2:$B$5)="Y","CASH",IF(XLOOKUP(F2,$A$2:$A$5,$C$2:$C$5)="Y","CREDIT CARD",IF(XLOOKUP(F2,$A$2:$A$5,$D$2:$D$5)="Y","MIX"))), is there a cleaner way of writing this formula?