Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have been scouring the web trying to find out why there is a difference in
the way Excel does some rounding. I am using this formula: =ROUNDUP(IF(A1B1,(B1+1-A1)*96,(B1-A1)*96),15) I have it pasted to three sets of cells (C1, C2, C3) My data is: A1 = 11:00 A2 = 12:30 B1 = 23:00 B2 = 00:30 C1 = 10:00 C2 = 11:30 Cells A1, A2, B1, B2, C1, C2 have the format of hh:mm. Cells C1, C2, C3 display the value out to 18 decimal places. In each situation we have 1 hour and 30 minutes of difference. But the value shown in the cells a C1 = 6.000000000000010000 C2 = 5.999999999999990000 C3 = 6.000000000000000000 Because of this difference in the way the rounding is accomplished the my larger formula gives different answers. My full formula is: =IF(E30="CB", IF(((ROUNDUP(IF(B30C30,(C30+1-B30)*96,(C30-B30)*96),0)/96*24) <= 0.5), 1, IF(AND(((ROUNDUP(IF(B30C30,(C30+1-B30)*96,(C30-B30)*96),0)/96*24)<=2),(0.500001<=(ROUNDUP(IF(B30C30,(C30+1-B30)*96,(C30-B30)*96),0)/96*24))), 2, IF(B30="","",IF(C30="","",ROUNDUP(IF(B30C30,(C30+ 1-B30)*96,(C30-B30)*96),0)/96*24)))), IF(B30="","",IF(C30="","",ROUNDUP(IF(B30C30,(C30+ 1-B30)*96,(C30-B30)*96),0)/96*24))) It should show the time interval in a decimal format to two decimal places. But the above full forulma gives these values: C1 = 1.75 (incorrect) C2 = 1.50 (correct) C3 = 1.50 (correct) Can you give me an idea how I can do a work around of this problem? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Averaging times (similar to lap times) | Excel Discussion (Misc queries) | |||
Calculating time difference then rounding down | Excel Discussion (Misc queries) | |||
Rounding times to the nearest 15 minutes in Excel | Excel Discussion (Misc queries) | |||
Calculating times | Excel Discussion (Misc queries) | |||
Avoiding typing similar formula 600 times | Excel Worksheet Functions |