INDEX MATCH Multiple Substrings

kimmymckenzie

New Member
Joined
Jun 18, 2018
Messages
1
{=IFNA(INDEX(NamedRange,MATCH(TRUE,ISNUMBER(SEARCH(NamedRange2,CellcontaingStringoftext)),0))’””)}

This array is looking a up list of words that could be included anywhere in the string of text and returns the corresponding value of next column of the first identified substring, if it does not successfully match it returns nothing.

My concern with this array is that it returns only the first value.

In the perfect world I would have it List all of the corresponding values, though, at a minimum, I would like it to identify if it finds one (and return it) or to return “multiple” when it finds more than one substring in the string of text.

I can’t share a sample file because the site is restricted on my work computer, I’m working on this! But what I can say is that the list of substring is common words to describe frontline IT issues, and the corresponding value is the system name. The string of text that it’s looking up is the description that is written in an IT incident / tickets.

Any suggests would be greatly appreciated!

Kim
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Welcome to Mr Excel forum

See if this example helps


[TABLE="class: grid"]
<tbody>[TR]
[TD="bgcolor: #DCE6F1"][/TD]
[TD="bgcolor: #DCE6F1"]
A
[/TD]
[TD="bgcolor: #DCE6F1"]
B
[/TD]
[TD="bgcolor: #DCE6F1"]
C
[/TD]
[TD="bgcolor: #DCE6F1"]
D
[/TD]
[TD="bgcolor: #DCE6F1"]
E
[/TD]
[TD="bgcolor: #DCE6F1"]
F
[/TD]
[TD="bgcolor: #DCE6F1"]
G
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
1
[/TD]
[TD]
Text​
[/TD]
[TD]
Result1​
[/TD]
[TD]
Result2​
[/TD]
[TD]
Result3​
[/TD]
[TD]
Result4​
[/TD]
[TD][/TD]
[TD]
Keywords​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
2
[/TD]
[TD]
xxx apple xxx banana​
[/TD]
[TD]
Apple​
[/TD]
[TD]
Banana​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="bgcolor: #D9D9D9"]
Apple​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
3
[/TD]
[TD]
banana xxx​
[/TD]
[TD]
Banana​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="bgcolor: #D9D9D9"]
Banana​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
4
[/TD]
[TD]
zzzz xxxx​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="bgcolor: #D9D9D9"]
Cherry​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
5
[/TD]
[TD]
Cherry xxx banana​
[/TD]
[TD]
Banana​
[/TD]
[TD]
Cherry​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="bgcolor: #D9D9D9"]
Mango​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
6
[/TD]
[TD]
xxx apple mango cherry​
[/TD]
[TD]
Apple​
[/TD]
[TD]
Cherry​
[/TD]
[TD]
Mango​
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
7
[/TD]
[TD]
zzzz cherry mango xxx banana xyz apple​
[/TD]
[TD]
Apple​
[/TD]
[TD]
Banana​
[/TD]
[TD]
Cherry​
[/TD]
[TD]
Mango​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
8
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Named range: Keywords = G2:G5 (gray area)

Array formula in B2 copied across and down
=IFERROR(INDEX(Keywords,SMALL(IF(ISNUMBER(SEARCH(Keywords,$A2)),ROW(Keywords)-MIN(ROW(Keywords))+1),COLUMNS($B2:B2))),"")
confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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