Search for text

undemane

Board Regular
Joined
Nov 19, 2007
Messages
75
Group Name
Result
xxx-global-hds-xxx
hds
xxx-network-xxx-xxx
network
xxx-xxx-orcl-xxx-xxx
orcl

<tbody>
</tbody>
I have a table with the column on the left. I want to scan the column A (Group Name) for key words like HDS or Network or ORCL, and if I find them, then paste them to the column B. How do I do this?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,425
Office Version
  1. 2019
You're just searching for those three words ONLY?

in B1
=IF(ISNUMBER(SEARCH("hds",A1)),"hds","")&IF(ISNUMBER(SEARCH("network",A1)),"network","")&IF(ISNUMBER(SEARCH("orcl",A1)),"orcl","")
 

undemane

Board Regular
Joined
Nov 19, 2007
Messages
75
For now, yes. Thank you for your help

You're just searching for those three words ONLY?

in B1
=IF(ISNUMBER(SEARCH("hds",A1)),"hds","")&IF(ISNUMBER(SEARCH("network",A1)),"network","")&IF(ISNUMBER(SEARCH("orcl",A1)),"orcl","")
 

maheshmaxi

Active Member
Joined
Dec 16, 2008
Messages
252
You can also use this following formula by creating a table in C & D columns like given below. Formula =LOOKUP(2^15,SEARCH(C1:C10,A2),D1:D10) where A2 is the cell contains Group Name "xxx-global-hds-xxx", just drag up to the end.

C

hds
D

hds
networknetwork
orclorcl

<tbody>
</tbody>
 

maheshmaxi

Active Member
Joined
Dec 16, 2008
Messages
252
If you want to search more words like those three words you have provided, you can simply add those in the C:D table and expand the range (rows) in lookup formula.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,627
Messages
5,838,440
Members
430,548
Latest member
hh_dh2001

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