Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel formula help in rounding numbers 3

Status
Not open for further replies.

jlbCodeman

Technical User
Oct 25, 2004
2
US
I am trying to round a number following rounding rules. However, I find that when the number is a negative result I would like all negative numbers to be zero. I can get the answer to round properly but I cannot figure out how to get the negative answer number to always be zero. ex: 0 - 4.2 = -4.2 want the -4.2 to be zero.
=ROUND(C27-D27,0) is the formula I currently have in the cell.

Any help would be appreciated.
 
Hi,

Can't do that with only the ROUND() function. Also use the IF() function.

[tt]
=IF(C27-D27>0,ROUND(C27-D27,0),0)

[/tt]
 
Thank you so much. That did what I wanted. I kind of thought something like an IF would be involved but I am not that math savvy with developing formulas. You guys are a great help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top