Find a match of multiple terms

bongkph

New Member
Joined
Oct 24, 2018
Messages
3
Hi,

Can you please help me with formula or function to find multiple terms and leave me with a value of those who doesn't have a match. Here is what I want to do:

Column A
abc.com/contents100
abc.com/contents200
abc.com/contents300
xyz.com/contents321
123.com/contentsaaa
123.com/contentsbbb
123.com/contentsccc

Column B (find these terms in column A)
abc.com
123.com

Column C (show all with no match)
xyz.com/contents321

I don't know if this is possible. If not, any recommendations that can give me needed results is highly appreciated.

Thanks you very much.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Welcome to Mr Excel forum

See if this example helps

[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][td="bgcolor: #DCE6F1"]
C
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td]
Values​
[/td][td]
Search​
[/td][td]
Result​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td]
abc.com/contents100​
[/td][td]
abc.com​
[/td][td]
xyz.com/contents321​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td]
abc.com/contents200​
[/td][td]
123.com​
[/td][td]
1123.com/contentsccc​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td]
abc.com/contents300​
[/td][td][/td][td]
aabc.com/contents100​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td]
xyz.com/contents321​
[/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
6
[/td][td]
123.com/contentsaaa​
[/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
7
[/td][td]
123.com/contentsbbb​
[/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
8
[/td][td]
123.com/contentsccc​
[/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
9
[/td][td]
1123.com/contentsccc​
[/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
10
[/td][td]
aabc.com/contents100​
[/td][td][/td][td][/td][/tr]
[/table]


Array formula in C2 copied down
=IFERROR(INDEX(A$2:A$10,SMALL(IF(MMULT(--ISNUMBER(SEARCH(","&TRANSPOSE(B$2:B$3)&"/",","&A$2:A$10)),ROW(B$2:B$3)^0)=0,ROW(A$2:A$10)-ROW(A$2)+1),ROWS(C$2:C2))),"")
confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Upvote 0
Welcome to Mr Excel forum

Array formula in C2 copied down
=IFERROR(INDEX(A$2:A$10,SMALL(IF(MMULT(--ISNUMBER(SEARCH(","&TRANSPOSE(B$2:B$3)&"/",","&A$2:A$10)),ROW(B$2:B$3)^0)=0,ROW(A$2:A$10)-ROW(A$2)+1),ROWS(C$2:C2))),"")
confirmed with Ctrl+Shift+Enter, not just Enter
M.

Marcelo, thank you very much for the response. The actual sheet have 2552 rows in A, 309 rows in B. I edited your formula to be:
=IFERROR(INDEX(A$2:A$2552,SMALL(IF(MMULT(--ISNUMBER(SEARCH(","&TRANSPOSE(B$2:B$309)&"/",","&A$2:A$2552)),ROW(B$2:B$309)^0)=0,ROW(A$2:A$2552)-ROW(A$2)+1),ROWS(C$2:C2))),"")

This is just to confirm if I am doing it right because it takes long to reveal the values on C with given long lists of rows.
 
Upvote 0
Additionally, the actual values on Column A has preceding characters. Since it is a domain there would be http, https, subdomain (abc.abc.com), etc... before the abc.com. I would like to find the match of the actual domain (abc.com) regardless of any preceding characters. Thanks again.
 
Upvote 0
This is just to confirm if I am doing it right because it takes long to reveal the values on C with given long lists of rows.

Maybe a macro performs better.

Additionally, the actual values on Column A has preceding characters. Since it is a domain there would be http, https, subdomain (abc.abc.com), etc... before the abc.com. I would like to find the match of the actual domain (abc.com) regardless of any preceding characters. Thanks again.

Try to show us your real scenario. Simplifying your case too much leads to inadequate solutions.

M.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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