Mar 20, 2024 02:48 AM
Hi All
I am looking for a formula to extract project status from a string with multiple response column. Criteria is IF "Market Single" is appear anywhere in the "Updated Status", then return as the 1st word in that particular string.
Example below: the output I am looking for in "Final Status" is:
- Row 1: Ongoing (Albania in Market single, Ongoing being the first word in the string)
- Row 2: Hold (Andorra in Market single, Hold being the first word in the string)
- Row 3: Cancelled (Antigua in Market single, Cancelled being the first word in the string)
Currently this is the formula I have - and it returns all three response as Ongoing - which is not what I am looking for:
Thanks a mil!
Mar 20, 2024 04:24 AM
Hmm the only way I can think of doing this is via a script I'm afraid. Hopefully someone else has a better idea!
Mar 20, 2024 10:09 AM - edited Mar 20, 2024 12:50 PM
Mar 20, 2024 05:26 PM
How about using Regex?
REGEX_EXTRACT({Updated Status}, "([^, ]*) " & {Market single})
In this case, return the status of the first match
Mar 20, 2024 07:54 PM
@pressGO_designOooh, what if you moved the "IF"s out and just did a "IF() & IF()" instead of nesting? That way it'd output all the iterations that matched the name?
Man if there was a kudos button I'd like both yours and @Sho 's posts; they're so elegant
Mar 21, 2024 02:50 AM
Thanks so much for the help @pressGO_design @Sho @TheTimeSavingCo
I realized that the database is not as "clean" - some of the strings has an additional space in between, and so the calculation could not work. Possible to address this from the formula itself?
Thanks again!
Mar 21, 2024 03:14 AM
Hmm, utilizing @pressGO_design 's solution, perhaps you could use a 'SUBSTITUTE' to replace the ' ' values with ' ' instead? i.e.
FIND("Ongoing "&Name, SUBSTITUTE({Updated Status}, " ", " ")), "Ongoing",