Rounding based on looking up decimals in an array

mikeronni

New Member
Joined
Mar 16, 2011
Messages
11
I have a table of numbers:
00 minutes 0
05 minutes 0.08
10 minutes 0.17
15 minutes 0.25
20 minutes 0.33
25 minutes 0.42
30 minutes 0.5
35 minutes 0.58
40 minutes 0.67
45 minutes 0.75
50 minutes 0.83
55 minutes 0.92

As you can see, each decimal reflects the portion of minutes per hour.
If I have 36.39 hours and I want to round that to the 5 minute increment (36 hours and 20 minutes), it needs to be 36.42. I always need to round to the closest number (up or down). Also, it may mean rounding to the nearest hour, which may increase the hour value.

I tried =round(cell containing 36.39, vlookup referring to cell and array above) to no avail.
Can you suggest another method?
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Here are a few options. Maybe these will help:

Data and formulas (formulas in green):
Excel Workbook
ABCD
1160minutes
20.9255minutes
30.8350minutes
40.7545minutes
50.6740minutes
60.5835minutes
70.530minutes
80.4225minutes
90.3320minutes
100.2515minutes
110.1710minutes
120.085minutes
1300minutes
14
15sourceNormal Rounding To 5 MinsRound Up to 5 MinsRounded according to lookup table
1636.3936.4236.4236.42
1739.9539.924040
1836.12536.1736.1736.17
1937.12437.0837.1737.17
2038.16738.1738.2538.17
2140404040
220.330.330.330.33
...
Excel Workbook
BCD
1636.4236.4236.42
...
Cell Formulas
RangeFormula
B16=ROUND(INT(A16)+MROUND(MOD(A16,1)*60,5)/60,2)
C16=ROUND(INT(A16)+CEILING(MOD(A16,1)*60,5)/60,2)
D16=ROUND(INT(A16)+INDEX($B$1:$B$13,MATCH(ROUND(MOD(A16,1),2),$A$1:$A$13,-1))/60,2)
 
Upvote 0
=MROUND(36.39, 1/12) ~ 36.417 (requires the Analysis ToolPak for Excel 2003-)

Or

=ROUND(36.39*12, 0)/12
 
Upvote 0
If you are after the integer and decimal part rounded to five minutes, this is Excel mastery:

=MROUND(36.39, 1/12)<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
=ROUND(36.39*12, 0)/12<o:p></o:p>
 
Upvote 0

Forum statistics

Threads
1,224,570
Messages
6,179,608
Members
452,930
Latest member
racefanjtd

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