Search Formula?

marshak

Board Regular
Joined
May 28, 2007
Messages
64
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

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
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

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
38,150
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
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

marshak

Board Regular
Joined
May 28, 2007
Messages
64
Unfortunately, the word Email is not be the only word in the cell.
 
Upvote 0

marshak

Board Regular
Joined
May 28, 2007
Messages
64
Thanks, All!

Your formula worked for me:

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

THANK YOU!!!
 
Upvote 0

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
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,190,694
Messages
5,982,337
Members
439,774
Latest member
InfinityMrsn

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
Top