Rounding Positive & Negative #'s to nearest .25

jdee

Active Member
Joined
Sep 10, 2003
Messages
276
Help again please.

I have this formula in H14: IF(I14=0,0,(SUM($I$8:$I$13)/COUNTIF($I$8:$I$13,"<>0"))) which works great from help received on this forum.

Now, I need to round the answer to the nearest .25 in cell H15. I want to see the number above in H14 and the new rounded number (score) in cell H15.

Example: My answer for the above using numbers 0, 0, 0, 1, 2, 2 = 1.67.
I need to round this number to 1.75
, but, the answer could also be a negative number if the numbers were to change to 0, 0, 0, -2, -2, 2 = negative 0.67, and I would want this rounded to negative .75.

Any formula you could provide me would be helpful. I again have searched the board but am now even more confused as to use round, a formula in cell H15 such as ceiling or ?. I can get ceiling to work but, does not work in both cases ie returns an error #num if negative.

Thank you in advance for your help.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
I have found the answer ( I think). I've used IF(H14>0,CEILING(H14,0.25),-CEILING(-H14,0.25)) and it seems to be working.

Again, thank you for previous help received. If my answer is not right, please feel free to correct me and point out where I'm going wrong.
 
Upvote 0
jdee said:
I have found the answer ( I think). I've used IF(H14>0,CEILING(H14,0.25),-CEILING(-H14,0.25)) and it seems to be working.

Again, thank you for previous help received. If my answer is not right, please feel free to correct me and point out where I'm going wrong.
Book15
ABCD
11.671.751.75
2-0.67-0.75-0.75
3
Sheet1


Alternative formulas...

=SIGN(A1)*MROUND(ABS(A1),0.25)

=ROUND(A1/0.25,0)*0.25
 
Upvote 0
Edit: saw after posting that Aladin had already addressed some of the points in what I had to say. Since I have some notes with my illustration, I am going to leave it in and not delete it.

jdee said:
I have found the answer ( I think). I've used IF(H14>0,CEILING(H14,0.25),-CEILING(-H14,0.25)) and it seems to be working.

Again, thank you for previous help received. If my answer is not right, please feel free to correct me and point out where I'm going wrong.
Hi jdee:

Your formulation is ROUNDing UP; not ROUNDing to the nearest quarter -- see the following illustration ...
y031230h1.xls
GHIJK
141.62
151.751.51.5
16RoundUpRoundToNearestRoundDown
17onequarter
18
Sheet5


formula in cell H15 is ... =IF(H14>0,CEILING(H14,0.25),-CEILING(-H14,0.25))
this is ROUNDing UP to 0.25

formula in cell I15 is ... =ROUND(H14/0.25,0)*0.25
this is ROUNDing to the nearest 0.25


formula in cell J15 is ... =IF(H14>0,FLOOR(H14,0.25),-FLOOR(-H14,0.25))
this is ROUNDing Down to 0.25

I hope this helps.
 
Upvote 0
Thank you both, I have saved these answers and will refer to them in the future. Your help is very much appreciated. I tell everyone I meet how great this forum is. It keeps one informed and learning new things each day. Thanks Again. J.Dee
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,974
Members
448,537
Latest member
Et_Cetera

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top