If, then formula help

WinaHath ✭✭✭✭
edited 09/19/23 in Formulas and Functions

I need to replace the first 4 characters in a text string if the range has any of the criteria.

="0000" + "-" + [Function Code]@row + "-" + [Dept Code]@row + "-" + [Object Code]@row + "-" + SubObject

above is my current formula and an example of the output code is: 0000-10-3459-4500-4502


0000" if column SP Code and Column AG Code are both blank but Dept Code is not blank

"0010" if column SP Code is not blank but AG Code and Dept Code are blank

"0080" if column AG Code is not blank but SP & Dept Codes are blank


Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!