Time sheet calculations Excel 2013

polarnavs

New Member
Joined
Feb 22, 2014
Messages
46
So I have a spreadsheet that I need to:

sum time for the week for the agent
sum time for the day of the week
count the number of agents that are scheduled during each half hour

AgentAgent ID MonTueWedThuFriSatSunTotal Hours
Jones, Charles1849 OFF9a-5p9a-5p10a-6p7a-3p8a-4pOFF
Smith, Karen1987 11P-7a10P-6a10p-6aOFFOFF3p-11p3p-11p
Bulfeeney, Mike1876 4p-9p9p-3a2p-10pOFFOFFOFF1a-8a
Edwards, Karl2098 6p-2a1a-9a5a-12p9a-5p9a-4pOFFOFF
Sanderson, Al2187 OFF9a-5p9a-5p10a-6p7a-3p8a-4pOFF
Kennedy, Sherry2287 11P-7a5a-12p1a-9a8a-4pOFF10a-6pOFF
Totals

<colgroup><col><col span="8"><col></colgroup><tbody>
</tbody>

I've done text to columns but can't get the split up cells to format to hours.
And I don't even know where to start on the calculation of how many agents scheduled for each half hour.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
text to columnformat-- > h:mmformula
TueTue
9a-5p9a5p8:00=MOD(TIMEVALUE(SUBSTITUTE(C4,RIGHT(C4,1)," "&RIGHT(C4,1)))-TIMEVALUE(SUBSTITUTE(B4,RIGHT(B4,1)," "&RIGHT(B4,1))),1)
10P-6a10P6a8:00=MOD(TIMEVALUE(SUBSTITUTE(C5,RIGHT(C5,1)," "&RIGHT(C5,1)))-TIMEVALUE(SUBSTITUTE(B5,RIGHT(B5,1)," "&RIGHT(B5,1))),1)
9p-3a9p3a6:00=MOD(TIMEVALUE(SUBSTITUTE(C6,RIGHT(C6,1)," "&RIGHT(C6,1)))-TIMEVALUE(SUBSTITUTE(B6,RIGHT(B6,1)," "&RIGHT(B6,1))),1)
1a-9a1a9a8:00=MOD(TIMEVALUE(SUBSTITUTE(C7,RIGHT(C7,1)," "&RIGHT(C7,1)))-TIMEVALUE(SUBSTITUTE(B7,RIGHT(B7,1)," "&RIGHT(B7,1))),1)
9a-5p9a5p8:00=MOD(TIMEVALUE(SUBSTITUTE(C8,RIGHT(C8,1)," "&RIGHT(C8,1)))-TIMEVALUE(SUBSTITUTE(B8,RIGHT(B8,1)," "&RIGHT(B8,1))),1)
5a-12p5a12p7:00=MOD(TIMEVALUE(SUBSTITUTE(C9,RIGHT(C9,1)," "&RIGHT(C9,1)))-TIMEVALUE(SUBSTITUTE(B9,RIGHT(B9,1)," "&RIGHT(B9,1))),1)
Total21:00=SUM(D4:D9)

<tbody>
</tbody>
 
Last edited:
Upvote 0
text to columnformat-- > h:mm formula
TueTue
9a-5p9a5p8:00=MOD(TIMEVALUE(SUBSTITUTE(C4,RIGHT(C4,1)," "&RIGHT(C4,1)))-TIMEVALUE(SUBSTITUTE(B4,RIGHT(B4,1)," "&RIGHT(B4,1))),1)
10P-6a10P6a8:00=MOD(TIMEVALUE(SUBSTITUTE(C5,RIGHT(C5,1)," "&RIGHT(C5,1)))-TIMEVALUE(SUBSTITUTE(B5,RIGHT(B5,1)," "&RIGHT(B5,1))),1)
9p-3a9p3a6:00=MOD(TIMEVALUE(SUBSTITUTE(C6,RIGHT(C6,1)," "&RIGHT(C6,1)))-TIMEVALUE(SUBSTITUTE(B6,RIGHT(B6,1)," "&RIGHT(B6,1))),1)
1a-9a1a9a8:00=MOD(TIMEVALUE(SUBSTITUTE(C7,RIGHT(C7,1)," "&RIGHT(C7,1)))-TIMEVALUE(SUBSTITUTE(B7,RIGHT(B7,1)," "&RIGHT(B7,1))),1)
9a-5p9a5p8:00=MOD(TIMEVALUE(SUBSTITUTE(C8,RIGHT(C8,1)," "&RIGHT(C8,1)))-TIMEVALUE(SUBSTITUTE(B8,RIGHT(B8,1)," "&RIGHT(B8,1))),1)
5a-12p5a12p7:00=MOD(TIMEVALUE(SUBSTITUTE(C9,RIGHT(C9,1)," "&RIGHT(C9,1)))-TIMEVALUE(SUBSTITUTE(B9,RIGHT(B9,1)," "&RIGHT(B9,1))),1)
Total45=SUM(D4:D9)*24
<colgroup><col width="101" style="width: 76pt; mso-width-source: userset; mso-width-alt: 3693;" span="3"> <col width="184" style="width: 138pt; mso-width-source: userset; mso-width-alt: 6729;"> <col width="6" style="width: 5pt; mso-width-source: userset; mso-width-alt: 219;"> <col width="1230" style="width: 923pt; mso-width-source: userset; mso-width-alt: 44982;"> <tbody> </tbody>
 
Upvote 0
text to columnanother approach
TueTue
9a-5p9a5p
10P-6a10P6a
9p-3a9p3a
1a-9a1a9a
9a-5p9a5p
5a-12p5a12p
TotalOne formula per day for all agents
45=SUMPRODUCT(MOD(--SUBSTITUTE(C4:C9,RIGHT(C4:C9,1)," "&RIGHT(C4:C9,1))---SUBSTITUTE(B4:B9,RIGHT(B4:B9,1)," "&RIGHT(B4:B9,1)),1))*24
<colgroup><col width="101" style="width: 76pt; mso-width-source: userset; mso-width-alt: 3693;" span="3"> <col width="1015" style="width: 761pt; mso-width-source: userset; mso-width-alt: 37120;"> <tbody> </tbody>
 
Upvote 0
First part is a huge help. Any idea on how to count the agents scheduled during a particular half hour.

12:00A - 12:30 A 3
12:30A - 1:00A 2

and so on
 
Upvote 0
Can I add an IFERROR to this to get a 0 for #VALUE issues

If error will not work, replace off with zero's in both cells.
<colgroup><col width="554" style="width: 416pt; mso-width-source: userset; mso-width-alt: 20260;"> <tbody> </tbody>
 
Upvote 0
=iferror(mod(timevalue(substitute(m2,right(m2,1)," "&right(m2,1)))-timevalue(substitute(l2,right(l2,1)," "&right(l2,1))),1),0)
 
Upvote 0

Forum statistics

Threads
1,214,817
Messages
6,121,720
Members
449,050
Latest member
MiguekHeka

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