total weekly shift hours as decimal number

ajm

Well-known Member
Joined
Feb 5, 2003
Messages
2,005
Office Version
  1. 365
Platform
  1. Windows
folks, this should be simple enough but has got me stumped. working out shift hours as decimal numbers. eg 19:30 (19 hours, 30 minutes) is 19.5. Using MOD formula gives the correct answer (MOD(Q6,1)*24) where Q6 holds the number of hours worked for the week. However, for total shift hours greater than 24, it returns the balance of hours not including the days. so, 43:00 hours returns 19.00 (instead of 43.00) and 48:30 hours, returns 0.50 instead of 48.50. what should i be doing?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Maybe like this

Q6*24
tried that in my current format and it didn't work. but, by changing the divisor from 1 to 60 worked. so, now my formula is MOD(Q6*24,60). interestingly, MOD(Q6,60)*24 also works.

thanks for helping out
 
Upvote 0
B4 is custom formatted [h]:mm

Date and Time 3.xlsm
ABC
1
219:3019.5
320:3020.5
440:0040.0
1f
Cell Formulas
RangeFormula
C2:C3C2=B2*24
B4:C4B4=SUM(B2:B3)
 
Upvote 0
Solution
Dave, so much simpler than mine. I must have messed up the particular custom format to begin with.
 
Upvote 0
that's better. thanks Dave. as i said above I must have muffed the cell formatting somehow to begin with. my last answer, prior to this one, does the job still. this is just easier.
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

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