Return Cell references of specific text in range

glynn1969

Board Regular
Joined
Nov 24, 2018
Messages
80
Office Version
  1. 365
Platform
  1. Windows
Hello i will try to keep my query simple.

I have a tab called Data and in column A i have 1000's of surnames (in no particular order).

i would like to be able to enter a search text in cell d2 and then next my search box (so in e2 and across - to then return ALL the cell references that contain that surname - eg it may show A12 A432 A634 A6443

i can do this to return the first occurrence of the surname but can't seem to get all occurrences displayed as a list.

Is this possible.

Thank you in advance
 
Last edited:

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You don't mean filter to show only those rows matching a value?

You mean actually return the cell references for a match such as $A$42 ? if so I assume you are using CELL with INDEX and MATCH (although I dont know if they are available in Excel 2016)?
 
Upvote 0
You don't mean filter to show only those rows matching a value?

You mean actually return the cell references for a match such as $A$42 ? if so I assume you are using CELL with INDEX and MATCH (although I dont know if they are available in Excel 2016)?
hi i am using
=CELL("address",INDEX(Data!E:E,MATCH("*"&$D$1&"*",Data!E:E,0))) (formulae references are slightly different to my simplified query)


i am using office 365 - have updated my profile now to reflect
 
Last edited:
Upvote 0
Can you post a sample data? Just making sure I get your layout correctly.
 
Upvote 0
Sorry I have just shut down my PC to go to sleep..in uk and its 01.51, replying on phone.

My list simplified list is essentially a list of names in column A...thousands long.

I want to enter a name in cell D2 of the same tab and then show in cells e2,f2,g2 etc all the cells my my search name ,do, is found.

Will try to post example in morning.
 
Upvote 0
Are the surnames in column A appear exactly like the search cell D2 or do they need to return similar results i.e. searching for "May" will return "May", "Mayhem", and "Maybe"?
 
Upvote 0
Are the surnames in column A appear exactly like the search cell D2 or do they need to return similar results i.e. searching for "May" will return "May", "Mayhem", and "Maybe"?
Exact would be fine...I know my formula does partial, but a full list of exact matches would be great if it is possible
 
Upvote 0
Maybe something like this?
Book1
ABCDEFGH
1NamesSearch
2AppleApple$A$2$A$9$A$10$A$11
3Bonnie
4Carol
5Dave
6Egg
7Friend
8Ghee
9Apple
10Apple
11Apple
12Bonnie
13Bonnie
14Egg
15Egg
16Egg
17
Sheet1
Cell Formulas
RangeFormula
E2:H2E2=TOROW(FILTER(BYROW(A2:A16,LAMBDA(r,CELL("address",r))),A2:A16=D2))
Dynamic array formulas.
 
Upvote 0
Perhaps:

Book1
ABCDEFGH
1NamesSearch
2AppleAppleA2A9A10A11
3Bonnie
4Carol
5Dave
6Egg
7Friend
8Ghee
9Apple
10Apple
11Apple
12Bonnie
13Bonnie
14Egg
15Egg
16Egg
Sheet1
Cell Formulas
RangeFormula
E2:H2E2=TOROW("A"&FILTER(ROW(A2:A16),A2:A16=D2))
Dynamic array formulas.
 
Upvote 0
@Scott Huish
I like your solution more than mine because it doesn't use CELL() which is volatile. I might add CHAR() & COLUMN() to make it more dynamic in case the columns shift. Not sure if you have a shorter way.

Excel Formula:
=TOROW(CHAR(COLUMN(A2:A16)+64)&FILTER(ROW(A2:A16),A2:A16=D2))
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,601
Members
449,109
Latest member
Sebas8956

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