Return cell references to multiple matches (no macros, functions only)

SerenityNetworks

Board Regular
Joined
Aug 13, 2009
Messages
131
Office Version
  1. 365
Platform
  1. Windows
I can use the following to return the cell reference in Column-AA that has a match to the content in E2.
=SUBSTITUTE(ADDRESS(1,COLUMN(AA:AA),4),"1","")&MATCH("*"&E2&"*",AA:AA,0)

If E2 contained "fed oatmeal" and AA20 contained "Bob should be fed oatmeal twice daily" then AA20 would be returned.

But what if I have multiple occurrences of "fed daily"? Say I have: "Bob should be fed oatmeal twice daily" in AA20, "Babies should be fed oatmeal" in AA32, and "Tommy should never be fed oatmeal" in AA40. Is there a clean way to return AA20, AA32, and AA40 in a single cell?

I know I could do it by essentially concatenating the above formula to itself a bunch of times (starting the next concatenation at the row found in the previous), but it would only return a limited number of occurrences. It seems that an array formula could do it, but I'm not sure how to write it.

Any help would be appreciated.

Thanks,
Andrew
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Please note: As it has been a bit without a solution, I have cross posted at OzGrid. I will post back if a dialog begins there. I would not wish for folks to duplicate efforts. Thank you.
 
Upvote 0

Forum statistics

Threads
1,214,638
Messages
6,120,676
Members
448,977
Latest member
moonlight6

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