Returning text using IF Function

Hello!

I am trying to return text from another column that has a lot of text in. I'm using the IF, FIND, and RIGHT functions.. but it's not working. The intent is to search the DAQ Comments column for the word "PCI".. if it's there I want to return only one part of the text starting with the word "Other". If there is no match I want it to be left blank

The current formula looks like:

=IF(CONTAINS("PCI", [DAQ Comments]@row), (FIND("Other", [DAQ Comments]@row), RIGHT([DAQ Comments]@row, 2000)), "")'


Thank you!!

Best Answer

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭
    edited 01/11/21 Answer βœ“

    Hi Christa,

    Try:

    =IF(CONTAINS("PCI", [DAQ Comments]@row), RIGHT([DAQ Comments]@row, LEN([DAQ Comments]@row)-FIND("Other", [DAQ Comments]@row)+1), "")

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

Answers

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭
    edited 01/11/21 Answer βœ“

    Hi Christa,

    Try:

    =IF(CONTAINS("PCI", [DAQ Comments]@row), RIGHT([DAQ Comments]@row, LEN([DAQ Comments]@row)-FIND("Other", [DAQ Comments]@row)+1), "")

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

  • Christa Brown
    Christa Brown ✭✭✭

    Thank you again! I got it using the MID Function and the FIND function to give MID a starting point. PHEW!!

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭

    Glad you solved it. Thank you for using the Community.

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!