Forum Discussion
JMcNamara
Apr 12, 2021Copper Contributor
Excel - Searching Multiple Columns
 I am trying to write an equation that will pull the officer name using the corresponding code to match. Below are a mock up of the data that I am using.                        So what I need is a for...
HansVogelaar
Apr 12, 2021MVP
In D2:
=INDEX('Code Types'!$A$2:$A$4,SUMPRODUCT(('Code Types'!$B$2:$D$4=C2)*(ROW('Code Types'!$B$2:$D$4)-ROW('Code Types'!$B$2)+1)))
where Code Types is the name of the sheet with Code Type 1, Code Type 2 etc.
Adjust the ranges if needed, then fill down.
JMcNamara
Apr 12, 2021Copper Contributor
Worked great! Thanks! I truly appreciate your help.