IF is Integer?

SYSPK
SYSPK ✭✭✭✭✭✭

I have a formula column that is constantly changing and bringing in live information. If the numbers are integers, I want to see them rounded with no decimal point. If the numbers do have decimals, I want to see only 1 decimal place. Pressing the increase/decrease decimal button doesn't help, since I need it to depend on if the number is an integer or not.

For example, I want to see the cells on the left column in the picture, not the ones on the right:


These cells are live and always changing so I can't use the increase/decrease decimal buttons.

Can I use the INT function for this? Or do I need to do something fancy with RIGHT and LEN?

Thank you

Best Answer

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭
    Answer ✓

    Hi @SYSPK

    Hope you are fine, please try to use the following formula and convert it to column format formula:

    =IF(ISBLANK(Original@row), "", IF(FIND(".", Original@row) >= 1, Original@row, INT(Original@row)))

    the following screenshot shows the result:


    PMP Certified

    [email protected]

    www.mobilproject.it

    ☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!