# Round to zero?

Options
edited 09/13/23

Hi,

I am creating an inventory sheet for toner. I have it set up so it let's us know when we need to order. But when we have above par the order line will have a negative number in the "Order" column. (ex. -3) To avoid confusion I want to round all negative numbers to show 0. How can I do this. I have search but nothing seems to work.

Current formula: =Par@row - [Current Count]@row

I tried =IF(SUM(Par@row - [Current Count]@row)) >0,"0" but this does not seem to work.

Scott

• ✭✭✭✭✭✭
Options

Try:

=IF(Par@row - [Current Count]@row<0, 0, par@row-[current count]@row)

Help?

Mark

I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

• ✭✭✭✭✭✭
Options

Try:

=IF(Par@row - [Current Count]@row<0, 0, par@row-[current count]@row)

Help?

Mark

I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

• Options

Amazing! That worked perfect! Thanks for getting back so quickly. Sorry to bother but if you have a minute can you explain the logic behind? Why the duplicate equation? Just so I understand for the future. Still learning the language.

Scott

• ✭✭✭✭✭✭
edited 12/20/20
Options

IF statements are one of the most used functions. The Syntax is:

IF( logical_expression, value_if_true, [ value_if_false ])

If the logical expression is true it returns the answer after the ","; if false the next answer.

You wanted to know if Par - [Current Count] <0 (the logical expression) and if it was you wanted the result to be 0; if it wasn't you wanted the result to be Par-[current count].

Happy to help anytime. Thanks for using the community.

Be Well,

Mark

I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

• Options

Ah, ok. That makes more sense. Now I can see it. Just like the Matrix. haha So the comma is basically “do this function first, then 0, if not do this function.” That’s where I was confused. Seriously appreciate the help and explanation. Thank you!

Scott

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!