floor and ceiling: round up and down to nearest multiple of 5

jmochs3

New Member
Joined
Nov 25, 2009
Messages
3
I have created a spreadsheet for a weight training program. In the sheet, I am using a max lift, then basing the workouts off of a percentage of the max lift.

I would like the end number to round up or down to the nearest multiple of 5. For example, have 212 round down to 210, have 213 round up to 215.

My problem is that I can't figure out what I am doing wrong. I have an IF scenario with a floor and a ceiling. Sometimes, it rounds the correct way, sometimes is does not (true and false).

Can you tell me what I am doing wrong based on the following formula:
=IF(CEILING((SUM(B4*$A$5)),0),CEILING((SUM(B4*$A$5)),5),FLOOR((SUM(B4*$A$5)),5))

If somebody needs more detail, please let me know! Thank you in advance for your help.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi and welcome to the board!!
Maybe
Rich (BB code):
=MROUND(B4*$A$5,5)
Anaylsis ToolPak required

lenze
 
Upvote 0
What formula?? What I posted will give you the Product of B4*$A$5 rounded to the nearest 5.

lenze
 
Upvote 0
Wow. That was easy enough. It looks like I was trying to overthink Excel! Thank you for your help! :)
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,605
Members
449,038
Latest member
Arbind kumar

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