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

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
-
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
-
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?
-
@Adam Murphy : Thank you so much! It initially returned a syntax error, but I just had to remove the final parentheses.
=IF(CONTAINS("/", [Credit Line]@row), LEFT([Credit Line]@row, FIND("/", [Credit Line]@row) - 1), [Credit Line]@row)
Appreciate your help!
Help Article Resources
Categories
Check out the Formula Handbook template!