Formula to return action if / in field, copy cell if no /

MRL
MRL ✭✭✭
edited 05/05/25 in Formulas and Functions

I have a Credit Line column that is set up to either have an individual name or an individual name/company. I am pulling this into a column that removes the company names and just returns the individual names. This formula is working for that purpose:

=IF(CONTAINS("/", [Credit Line]@row), LEFT([Credit Line]@row, FIND("/", [Credit Line]@row) - 1))

If there isn't a slash in the Credit Line, I want the original Credit Line text to be copied as-is into the second column with the formula.

None of my attempts to edit the above to include the second conditional have worked. (Tried IFERRORS, but was probably not getting the syntax right.)

Any ideas?

Best Answer

  • Adam Murphy
    Adam Murphy ✭✭✭✭✭✭
    Answer ✓

    Hi @MRL you are already very close. Try something like this:

    =IF(CONTAINS("/", [Credit Line]@row), LEFT([Credit Line]@row, FIND("/", [Credit Line]@row) - 1), [Credit Line@row))

    Would that work?

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!