andrewlau2881
New Member
- Joined
- Oct 20, 2023
- Messages
- 15
- Office Version
- 365
- Platform
- Windows
Hi all,
I would like to search through columns A and B to match a name.
If that name is found then I would like to return 1 if it is in column A and 2 if it is in column B.
It returns a 1 if it is in column A. However, if it is in column B I get N/A. I have used very similar IF statments before with success but cannot get my head around why this one won't work.
All help appreciated.
Excel Formula:
=IF(MATCH(K2,A3:A33,0),1,IF((MATCH(K2,B3:B33,0)),2,""))
I would like to search through columns A and B to match a name.
If that name is found then I would like to return 1 if it is in column A and 2 if it is in column B.
It returns a 1 if it is in column A. However, if it is in column B I get N/A. I have used very similar IF statments before with success but cannot get my head around why this one won't work.
All help appreciated.