Rounding Problem

Ride The Lightning

Board Regular
Joined
Jul 14, 2005
Messages
238
Hi

I have a set of data that contains values and I have the values rounded to 2 decimal places. However, I need a more expansive way of rounding the data. For example, if the value was 2.23, I'd want the data rounded to the nearest 0.02, so in this case it would be 2.24. I would categorise the rounding values as:

between 1.01 and 1.99, round to nearest 0.01
if it is between 2 and 2.98, round to nearest 0.02
if it is between 3 and 3.95, round to nearest 0.05.

Any help would be appreciated.

Regards

RTL
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
You could put that into an MROUND formula, e.g. with data in A2 use this formula in B2

=MROUND(A2,IF(A2>=3,5,IF(A2>=2,2,1))/100)

MROUND is a built-in function in Excel 2007 and later, in earlier versions it's an Analysis ToolPak add-in function
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

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