Contains in formula

Hello all!

I am trying to use multiple "contains" functions in a formula. I would like to search multiple columns(@row) with several strings contained in them for certain "keywords" and return a value in another column (@row) based on that search.

So, for example I want to search the first row of the first three columns and return a value in the "Presentation" column based on that search.


So my formula in the Presentation column would need to contain search of all three rows and all three "keywords" as outlines above.

Thanks!

Bob

Best Answer

  • Cody Holmes
    Cody Holmes ✭✭✭✭
    Answer ✓

    =IF(CONTAINS("retirement", [HQY Live Webinar details]@row:RecordingDetails@row), "Retirement", IF(CONTAINS("LPFSA", [HQY Live Webinar details]@row:RecordingDetails@row), "LPFSA", IF(CONTAINS("HSA", [HQY Live Webinar details]@row:RecordingDetails@row), "HSA")))

    Try this formula out. Let me know if it worked or not. If so, give me a vote up! (Keep in mind that the contains function may not be case-sensitive. "Retirement" != "retirement".

Answers

  • Cody Holmes
    Cody Holmes ✭✭✭✭
    Answer ✓

    =IF(CONTAINS("retirement", [HQY Live Webinar details]@row:RecordingDetails@row), "Retirement", IF(CONTAINS("LPFSA", [HQY Live Webinar details]@row:RecordingDetails@row), "LPFSA", IF(CONTAINS("HSA", [HQY Live Webinar details]@row:RecordingDetails@row), "HSA")))

    Try this formula out. Let me know if it worked or not. If so, give me a vote up! (Keep in mind that the contains function may not be case-sensitive. "Retirement" != "retirement".

  • Thank you Cody, that worked great! I appreciate the quick reply.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!