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
Check out the Formula Handbook template!