# Round to nearest whole number divisible by 5

#### mblakley

##### New Member
Need to round numbers to the nearest whole number that's divisible by 5. Eg: if c3 = 331, it needs to round to 330; if c3 = 333, it needs to round to 335. Seems easy, but cannot figure it out. Pls. help.

### Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Use the MROUND Function from the Analysis Tool Pack

=MROUND(A1,5)

=ROUND(A1/5,0)*5

If you want to avoid using the analysis toolpack, then do this...

if unrounded mod 5 > 2 then
rounded = unrounded + 5 - unrounded mod 5
else
rounded = unrounded - unrounded mod 5
end if

or something to that extent

Replies
4
Views
441
Replies
1
Views
137
Replies
5
Views
99
Replies
4
Views
601
Replies
10
Views
2K

1,219,770
Messages
6,150,165
Members
450,937
Latest member
kattyg261

### 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.

### Which adblocker are you using?

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

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