MROUND with IF Satement

hshamdani

New Member
Joined
Jan 12, 2014
Messages
2
Hello Folks,
I'm trying to use the MROUND function with an IF statement. I need values in Column "A" to be rounded off to the next multiple of 3 if the value is less than or equal to 42. If the value exceceds 42 it needs to be rounded of to the next multiple of 6. The issue I have is that if the value in column "A" is 1 the formula rounds it down to 0.
4 becomes 3
7 becomes 6 so on and so forth.
Is there a way we can tweak the formula to keep the value in column "A" as a minimum instead or rounding it down to the closest multiple of 3 ? so the 4 stays as four instead of becoming a 3.

Please help! I am not sure if i'm explaining my problem clearly please let me know if there any questions. thanks

This is the formula i'm using =IF(A2<42,MROUND(A2,3),MROUND(A2,6))
[TABLE="class: grid, ******* 169"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Value[/TD]
[TD]Rounded Value[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD="align: right"]10[/TD]
[TD="align: right"]9[/TD]
[/TR]
[TR]
[TD="align: right"]11[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD="align: right"]12[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD="align: right"]13[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD="align: right"]14[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD="align: right"]15[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD="align: right"]16[/TD]
[TD="align: right"]15[/TD]
[/TR]
[TR]
[TD="align: right"]17[/TD]
[TD="align: right"]18[/TD]
[/TR]
[TR]
[TD="align: right"]18[/TD]
[TD="align: right"]18[/TD]
[/TR]
[TR]
[TD="align: right"]19[/TD]
[TD="align: right"]18[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD="align: right"]21[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try

Code:
=IF(A2<42,CEILING(A2,3),CEILING(A2,6))
 
Upvote 0

Forum statistics

Threads
1,223,238
Messages
6,170,939
Members
452,368
Latest member
jayp2104

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