Excel Formula

Jknightt

New Member
Joined
Aug 6, 2007
Messages
1
I need to create a formula that extracts the role/purpose of the server from the server name.

Example Server Names:
ttnetc10s13xth1
uk-bs-wr-1
ttnet-c3s12-wr2

In these examples, "XTH", "WR" and "WR" are the server roles. I would like to create a formula that examines the name and if the name contains "WR" then populate the field with WR. If the names contains "XTH" then populate the field with XTH. There will NEVER be a situation where a server name will contain 2 of the scenario's. The only issue is there are around 20 server role scenarios. I cannot file a "if contains" formula.

Any help would be greatly appreciated.

Thanks
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Say the server name is in A1, try this:

=if(isnumber(find("wr",A1,1)),"WR",if(isnumber(find("xth",A1,1)),"XTH",""))
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,734
Members
449,094
Latest member
dsharae57

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