Round number up to nearest whole 5 or 9

ChalkyExcel

New Member
Joined
Jul 30, 2016
Messages
4
I have a sheet with the following numbers:

1012
2037
1083
1080

I would like the numbers above the be rounded up to the nearest 5 or 9. So for the example above the finished result would be:

1015
2039
1085
1079

Any help very much appreciated. Thank you.
 
Sorry!

=IF(RIGHT(A1,1)="9",A1+1,IF(RIGHT(A1,1)<="4",A1+(5-RIGHT(A1,1)),A1+(9-RIGHT(A1,1))))
Now it changes numbers that already end in 9 to numbers that end in 0.

In any case, I'd go for a formula with just 2 function calls rather than 6. :)
 
Upvote 0

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