Search Formula?

marshak

Board Regular
Joined
May 28, 2007
Messages
65
Ok, I'm not sure if this is possible, but here's what I need.

I have data in cells A17:AC17

In AD17, I need a formula that will look up each cell in the range and give me the contents of that cell if a particular word is found in the cell.

For example:

I need a formula in AD17 that will scan A17:AC17. If the word Email is found in one of those cells in that range, I need the contents of that cell placed into cell AD17.

Hope it can be done. Please let me know.

Thanks so much!!
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
In AD17 enter:

=LOOKUP(9.99999999999999E+307,SEARCH("email",A17:AC17),A17:AC17)

This gives you the last entry that contains the substring "email" if any.

To get multiple entries, control+shift+enter, not just enter:

=TEXTJOIN(", ",TRUE,IF(ISNUMBER(SEARCH("email",A17:AC17)),A17:AC17,""))<strike></strike>
 
Upvote 0
For example:

I need a formula in AD17 that will scan A17:AC17. If the word Email is found in one of those cells in that range, I need the contents of that cell placed into cell AD17.
Can the word Email be found in more than one cell and, if so, what should the formula do?

Will the word Email be the only word in the cell or could it be in there with other text?
 
Upvote 0
Thanks, All!

Your formula worked for me:

=LOOKUP(9.99999999999999E+307,SEARCH("email",A17:AC17),A17:AC17)

THANK YOU!!!
 
Upvote 0
Thanks, All!

Your formula worked for me:

=LOOKUP(9.99999999999999E+307,SEARCH("email",A17:AC17),A17:AC17)

THANK YOU!!!

You are welcome. For possible multiple returns, if so desired, use the formula invoking TEXTJOIN, which is available since Excel 2016.
 
Upvote 0

Forum statistics

Threads
1,214,421
Messages
6,119,392
Members
448,891
Latest member
tpierce

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