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

    bassam.khalil2009@gmail.com

    ☑️ 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

  • 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

    bassam.khalil2009@gmail.com

    ☑️ 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"

  • SYSPK
    SYSPK ✭✭✭✭✭✭

    @Bassam Khalil Thank you that seems to be the right function.

    Now another problem- this column I had already make an integer column I guess by pressing the remove decimal button. Now I can't get it to reset. Even with this formula, I can only see integers. Is there any way I can reset that column so I can let the function do its work?



  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭

    @SYSPK

    Try the opposite by increasing the decimal

    PMP Certified

    bassam.khalil2009@gmail.com

    ☑️ 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"

  • SYSPK
    SYSPK ✭✭✭✭✭✭

    That didn't work but I was able to reset it by using the paintbrush from another column.

    Thanks

  • Bassam Khalil
    Bassam Khalil ✭✭✭✭✭✭

    @SYSPK

    Excellent.

    PMP Certified

    bassam.khalil2009@gmail.com

    ☑️ 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"

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!