Compare columns and return X if

dragonmouse

Board Regular
Joined
May 14, 2008
Messages
129
Office Version
  1. 2016
Platform
  1. Windows
I want to compare multiple columns with serial numbers (same work sheet):

If column "A" matches a number in column "B" return RCVD OR
If Column "A" matches a number in Column "C" return INDUCT OR
if Column "A" matches a number in column D return DONE OR
IF Column "A" does not match ANY column return "BLANK"

Thoughts? NOTE: The ROWS will not be lined up. If they were it would be easy.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Maybe
Excel Formula:
=IFERROR(CHOOSE(MATCH(A2,B2:D2,0),"RCVD","INDUCT","DONE"),"")
 
Upvote 0
Ok that's VERY close however it's only comparing the data on that ONE row B2:D2 rather than matching cell A2 with the entire column
 
Upvote 0
In that case, try

Excel Formula:
=IFERROR(CHOOSE(MATCH(A2,FILTER($B$2:$D$20,($B$2:$B$20=A1)+($C$2:$C$20=A1)+($D$2:$D$20=A1)),0),"RCVD","INDUCT","DONE"),"")
 
Upvote 0
Going with the simplest method
Excel Formula:
=if(countif($B$2:$B$20,A1),"RCVD",if(countif($C$2:$C$20,A1),"INDUCT",if(countif($D$2:$D$20,A1),"DONE","")))
If the content of A2 is found in more than 1 column then the first column it is found in will take priority.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,611
Messages
6,120,513
Members
448,967
Latest member
screechyboy79

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top