Need an Excel array formula that searches multiple columns, and shows the row heading when found

bakarken

Board Regular
Joined
Sep 23, 2016
Messages
53
Office Version
  1. 2019
Platform
  1. Windows
Hi guys - really appreciate any help you can offer (I feel close to finding it but I'm struggling, think I need an array formula that include Index, Row, Search)
Using Excel 2019

In the below example, I need the formula to be placed in cells B1:B3

The formula needs to SEARCH for all words/text strings in columns F:G
If it finds anything, it needs to show the word (heading) from column E, if it finds something next to it in F:G

500Jeff10NEED FORMULA HEREAccountsGregTom
BG TomNEED FORMULA HEREAdminJeff
0000 GregNEED FORMULA HERE

So ideally, B1 would say Admin (because it found Jeff next to admin), B2 and B3 would say Accounts (because it found these names next to Accounts in either F or G)

I'm sure an Index/Search formula can do this - any help really appreciated!!

Bonus points if it can say 'Not found' if nothing is found in searches, or 'Multiple found' if multiple search results.

Thank you!!
 
Try:

DANTE AMOR
ABCDEFG
1500Jeff10AdminAccountsGregTom
2BG TomAccountsSystemSueDante
30000 GregAccountsEng
4form Dante xdSystemArc
5AdminJeff
AMOR
Cell Formulas
RangeFormula
B1:B4B1=INDEX($E$1:$E$6,MAX((ISNUMBER(SEARCH(IF($F$1:$G$6<>"",$F$1:$G$6),A1)))*(ROW($F$1:$G$6))))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Bonus points if it can say 'Not found' if nothing is found in searches
Try:
DANTE AMOR
ABCDEFG
1500Jeff10AdminAccountsGregTom
2BG TomAccountsSystemSueDante
30000 GregAccountsEng
4form Dante xdSystemArc
5100abc200Not foundAdminJeff
6
Hoja1
Cell Formulas
RangeFormula
B1:B5B1=IFERROR(INDEX($E$1:$E$6,MAX(IF(ISNUMBER(SEARCH(IF($F$1:$G$6<>"",$F$1:$G$6),A1)),ROW($F$1:$G$6),-1))),"Not found")
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Try:

DANTE AMOR
ABCDEFG
1500Jeff10AdminAccountsGregTom
2BG TomAccountsSystemSueDante
30000 GregAccountsEng
4form Dante xdSystemArc
5AdminJeff
AMOR
Cell Formulas
RangeFormula
B1:B4B1=INDEX($E$1:$E$6,MAX((ISNUMBER(SEARCH(IF($F$1:$G$6<>"",$F$1:$G$6),A1)))*(ROW($F$1:$G$6))))
Press CTRL+SHIFT+ENTER to enter array formulas.
Dante thank you so much! This is brilliant!

One slight issue - where there are no 'matches' in the array search, it is still resulting in the uppermost cell in column E (E1 in this case, Accounts). Is there a way for it, instead of defaulting to E1, to just say 'not found' or something?

Also, if the name Jeff appears twice in columns F:G (say in both F3 and G5 for example), is there a way that it can say 'multiple found'?
 
Upvote 0
One slight issue - where there are no 'matches' ...
Also, if the name Jeff appears twice in columns F:G (say in both F3 and G5 for example), is there a way that it can say 'multiple found'?

Edit:
DANTE AMOR
ABCDEFG
1500Jeff10MultipleAccountsGregTom
2BG TomAccountsSystemSueDante
30000 GregAccountsEng
4form Dante xdSystemArcJeff
5100abc200Not foundAdminJeff
6200 Sue Tom 300Multiple
Hoja1
Cell Formulas
RangeFormula
B1:B6B1=IF(SUM(--ISNUMBER(SEARCH(IF($F$1:$G$6<>"",$F$1:$G$6),A1)))>1,"Multiple",IFERROR(INDEX($E$1:$E$6,MAX(IF(ISNUMBER(SEARCH(IF($F$1:$G$6<>"",$F$1:$G$6),A1)),ROW($F$1:$G$6),-1))),"Not found"))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0
Solution
Edit:
DANTE AMOR
ABCDEFG
1500Jeff10MultipleAccountsGregTom
2BG TomAccountsSystemSueDante
30000 GregAccountsEng
4form Dante xdSystemArcJeff
5100abc200Not foundAdminJeff
6200 Sue Tom 300Multiple
Hoja1
Cell Formulas
RangeFormula
B1:B6B1=IF(SUM(--ISNUMBER(SEARCH(IF($F$1:$G$6<>"",$F$1:$G$6),A1)))>1,"Multiple",IFERROR(INDEX($E$1:$E$6,MAX(IF(ISNUMBER(SEARCH(IF($F$1:$G$6<>"",$F$1:$G$6),A1)),ROW($F$1:$G$6),-1))),"Not found"))
Press CTRL+SHIFT+ENTER to enter array formulas.
Absolutely perfect, thank you so much Dante!!
 
Upvote 0

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