How to count a text field that is not blank as a number in another column?

Emerald
Emerald
edited 06/17/22 in Formulas and Functions

Call log question.

When contact attempt 1 is made and the text result is logged, I want the 1st Contact Attempt Method text field to count as "1' and get added to the Total number of call attempts for the row and show as "1".

When contact attempt 2 is made and the text result is logged, I want the 2nd Contact Attempt Method text field to count as "1" and get added to the Total number of call attempts for the row and and show as "2".

When call attempt 3 is made and text result is logged I want the 3rd Contact Attempt Method text field to count as "1" and added get

to the Total number of call attempts for the row and and show as "3".

Answers

  • Jeff Reisman
    Jeff Reisman ✭✭✭✭✭✭

    @Emerald

    The easiest way to do this on a row is to just use three different IF Statements with the ISTEXT function in the logical expression portion of the formula, adding them all together like so:

    =IF(ISTEXT([1st Contact Attempt Method]@row), 1, 0) + IF(ISTEXT([2nd Contact Attempt Method]@row), 1, 0) + IF(ISTEXT([3rd Contact Attempt Method]@row), 1, 0)

    Each IF checks to see if there is a text value in its Contact Attempt Method field; if there is, the result is 1, if there is not, the result is 0. We do this 3 times, adding the results together.

    Regards,

    Jeff Reisman

    Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages

    If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!

  • Brilliant! Thank you!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!