Nearest 5 integer

phil133

Active Member
Joined
May 5, 2015
Messages
257
Office Version
  1. 365
Platform
  1. Windows
Hi. I'm trying to change this formula
Code:
IF(AND(MOD(ROW(),2)=0,B8<>"",C8<ROUND(C8,0)),ROUND(C8,0),IF(AND(MOD(ROW(),2)=0,B8<>"",C8>=ROUND(C8,0)),CEILING(C8,1),IF(AND(MOD(ROW(),2)=1,B8<>""),E7,"")))

to give results for the nearest 5. I used mround(c8,5) and round(c8/5,0)*5 like this
Code:
IF(AND(MOD(ROW(),2)=0,B4<>"",C4<MROUND(C4,5)),MROUND(C4,5),IF(AND(MOD(ROW(),2)=0,B4<>"",C4>=MROUND(C4,5)),CEILING(C4,1),IF(AND(MOD(ROW(),2)=1,B4<>""),E3,"")))

and it still gives me to the nearest integer.

Any help would be appreciated!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Nevermind I had to change ceiling(c4,1) to ceiling(c4,5)
 
Upvote 0

Forum statistics

Threads
1,215,742
Messages
6,126,601
Members
449,320
Latest member
Antonino90

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