Round to zero?
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.
Thanks in advance.
Scott
Best Answer
-
Hi @Scott Abitante ,
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.
Answers
-
Hi @Scott Abitante ,
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.
-
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
-
Hi @Scott Abitante,
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.
Please mark my answer as accepted to close this discussion.
Be Well,
Mark
I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.
-
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
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!