Obtain UPPER(LEFT with multiple FIND options
I'm very new to smartsheets and to function formulas. I have a list of server names and I'm trying to obtain the location from our naming standard. I got it to work for all servers that are Production, "pl" but now I have staging servers "sl".
Example server names in my Hostname column:
l1plservername
nap2plservername
sn3slservername
The function I got to work with just the "PL" names is:
=UPPER(LEFT(Hostname@row, FIND("pl", Hostname@row) - 1))
I've been banging my head for 2 days trying to figure this out. 😫 But I just can't figure out how to add in the new search criteria to include server names that have SL . If anyone has anything I could try, that would be great!
Also, any suggestions on how to best learn function formulas - seems like smartsheets loves these 😊
Best Answer
-
Try using an IF statement to say that if it contains "pl" then runt eh "pl" formula, otherwise run the "sl" formula.
=IF(FIND("pl", Hostname@row) > 0, UPPER(LEFT(Hostname@row, FIND("pl", Hostname@row) - 1)), UPPER(LEFT(Hostname@row, FIND("sl", Hostname@row) - 1)))
Answers
-
Try using an IF statement to say that if it contains "pl" then runt eh "pl" formula, otherwise run the "sl" formula.
=IF(FIND("pl", Hostname@row) > 0, UPPER(LEFT(Hostname@row, FIND("pl", Hostname@row) - 1)), UPPER(LEFT(Hostname@row, FIND("sl", Hostname@row) - 1)))
-
Thank you Paul! That worked perfectly.
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!