Double Shifts Breakdown

tezza

Active Member
Joined
Sep 10, 2006
Messages
375
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
  2. Web
Hi All,

I've looking into creating a sheet that breaks down double staffed / single staffed calls and was hoping someone has already created one that pretty much does what I need.

I've made a start but not getting the results I require.

As a care company, there are many clients that staff go to and some of the reports needed is to breakdown how many staff went there, but it needs to capture when two staff go to the call.

For example:

1 member of staff goes to a client on 20/07 for 6 hours

2 members of staff go to a client on the 21/07 at 14:00 for 4 hours each.

The sheet I'm working on will have columns something like:

Client 1 Duration Client 2 Duration

So for the above examples it would show:

Client 1...........Duration........................Client 2...........Duration................................Total Visits................Total Duration
....1....................6...............................................................................................1.............................6
....1....................4..............................1.....................4........................................2.............................8

Sorry about the dots, I'm not sure how to put in hard spaces.

The list can comprise of hundreds of rows.

Hope that makes sense, any suggestions to guide me are very welcome.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Here's a visual example, I'm looking for AU:BB to auto populate into another sheet

TimesheetExtract.csv
ABCWXYZARASATAUAVAWAXAYAZBABB
1Client TitleClient First NameClient Last NameDate of CallCall Start TimeCall End TimeCall DurationClientVisit 1Visit Hours in DecimalVisit 2 (if duplicate client, date & start time)Visit Hours in DecimalTotal VisitsTotal Hours in Decimal
2MiCoPh22/06/202315:4519:1503:30Mi Co Ph618:00412:001030:00
3MiCoPh22/06/202315:4519:1503:30Ma Da Ha104:00104:00208:00
4MiCoPh23/06/202315:4518:1502:30Ma Fr Ro106:00103:00209:00
5MiCoPh23/06/202315:4518:1502:30Mr Te Je414:00414:00
6MiCoPh28/06/202315:4519:1503:301242:00619:001861:00
7MiCoPh05/07/202315:4519:1503:30
8MiCoPh05/07/202315:4519:1503:30
9MiCoPh07/07/202315:4518:1502:30
10MiCoPh14/07/202315:4518:1502:30
11MiCoPh14/07/202315:4518:1502:30
12MaDaHa25/06/202314:0018:0004:00
13MaDaHa09/07/202314:0018:0004:00
14MaFrRo25/06/202310:0016:0006:00
15MaFrRo16/07/202313:0016:0003:00
16MrTeJe17/07/202315:4519:1503:30
17MrTeJe18/07/202314:0018:0004:00
18MrTeJe19/07/202315:4519:1503:30
19MrTeJe20/07/202313:0016:0003:00
201861:00
TimesheetExtract
Cell Formulas
RangeFormula
AV2AV2=Z2+Z4+Z6+Z7+Z9+Z10
AY2AY2=Z3+Z5+Z8+Z11
BA2BA2=COUNTA(C2:C11)
BB2BB2=SUM(Z2:Z11)
BA6:BB6,AX6:AY6,AU6:AV6AU6=SUM(AU2:AU5)
C20C20=COUNTA(C2:C19)
Z20Z20=SUM(Z2:Z19)
 
Upvote 0
Is there anything else I need to clarify for support with this?
 
Upvote 0
You can try this, but I'm not seeing the logic behind the second Ma Da Ha and Ma Fr Ro being "Visit 2" besides the color.

Book4
ABCWXYZAAATAUAVAXAYBABB
1Client TitleClient First NameClient Last NameDate of CallCall Start TimeCall End TimeCall DurationClientVisit 1Visit Hours in DecimalVisit 2 (if duplicate client, date & start time)Visit Hours in DecimalTotal VisitsTotal Hours in Decimal
2MiCoPh22-Jun-2315:4519:1503:301Mi Co Ph618:00412:001030:00
3MiCoPh22-Jun-2315:4519:1503:302Ma Da Ha208:00000:00208:00
4MiCoPh23-Jun-2315:4518:1502:301Ma Fr Ro209:00000:00209:00
5MiCoPh23-Jun-2315:4518:1502:302Mr Te Je414:00000:00414:00
6MiCoPh28-Jun-2315:4519:1503:3011449:00412:001861:00
7MiCoPh05-Jul-2315:4519:1503:301
8MiCoPh05-Jul-2315:4519:1503:302
9MiCoPh07-Jul-2315:4518:1502:301
10MiCoPh14-Jul-2315:4518:1502:301
11MiCoPh14-Jul-2315:4518:1502:302
12MaDaHa25-Jun-2314:0018:0004:001
13MaDaHa09-Jul-2314:0018:0004:001
14MaFrRo25-Jun-2310:0016:0006:001
15MaFrRo16-Jul-2313:0016:0003:001
16MrTeJe17-Jul-2315:4519:1503:301
17MrTeJe18-Jul-2314:0018:0004:001
18MrTeJe19-Jul-2315:4519:1503:301
19MrTeJe20-Jul-2313:0016:0003:001
201861:00
Sheet1
Cell Formulas
RangeFormula
AU2:AU5AU2=SUM(IF(($A$2:$A$19&" "&$B$2:$B$19&" "&$C$2:$C$19=AT2)*($AA$2:$AA$19=1),1,0))
AV2:AV5AV2=SUM(IF(($A$2:$A$19&" "&$B$2:$B$19&" "&$C$2:$C$19=AT2)*($AA$2:$AA$19=1),$Z$2:$Z$19,0))
AU6:AV6,BA6:BB6,AX6:AY6AU6=SUM(AU2:AU5)
AX2:AX5AX2=SUM(IF(($A$2:$A$19&" "&$B$2:$B$19&" "&$C$2:$C$19=AT2)*($AA$2:$AA$19=2),1,0))
AY2:AY5AY2=SUM(IF(($A$2:$A$19&" "&$B$2:$B$19&" "&$C$2:$C$19=AT2)*($AA$2:$AA$19=2),$Z$2:$Z$19,0))
BA2:BB5BA2=AU2+AX2
AA2:AA19AA2=COUNTIFS($A$2:$A2,A2,$B$2:$B2,B2,$C$2:$C2,C2,$W$2:$W2,W2,$X$2:$X2,X2)
C20C20=COUNTA(C2:C19)
Z20Z20=SUM(Z2:Z19)
 
Upvote 0
Solution
You can try this, but I'm not seeing the logic behind the second Ma Da Ha and Ma Fr Ro being "Visit 2" besides the color.

Book4
ABCWXYZAAATAUAVAXAYBABB
1Client TitleClient First NameClient Last NameDate of CallCall Start TimeCall End TimeCall DurationClientVisit 1Visit Hours in DecimalVisit 2 (if duplicate client, date & start time)Visit Hours in DecimalTotal VisitsTotal Hours in Decimal
2MiCoPh22-Jun-2315:4519:1503:301Mi Co Ph618:00412:001030:00
3MiCoPh22-Jun-2315:4519:1503:302Ma Da Ha208:00000:00208:00
4MiCoPh23-Jun-2315:4518:1502:301Ma Fr Ro209:00000:00209:00
5MiCoPh23-Jun-2315:4518:1502:302Mr Te Je414:00000:00414:00
6MiCoPh28-Jun-2315:4519:1503:3011449:00412:001861:00
7MiCoPh05-Jul-2315:4519:1503:301
8MiCoPh05-Jul-2315:4519:1503:302
9MiCoPh07-Jul-2315:4518:1502:301
10MiCoPh14-Jul-2315:4518:1502:301
11MiCoPh14-Jul-2315:4518:1502:302
12MaDaHa25-Jun-2314:0018:0004:001
13MaDaHa09-Jul-2314:0018:0004:001
14MaFrRo25-Jun-2310:0016:0006:001
15MaFrRo16-Jul-2313:0016:0003:001
16MrTeJe17-Jul-2315:4519:1503:301
17MrTeJe18-Jul-2314:0018:0004:001
18MrTeJe19-Jul-2315:4519:1503:301
19MrTeJe20-Jul-2313:0016:0003:001
201861:00
Sheet1
Cell Formulas
RangeFormula
AU2:AU5AU2=SUM(IF(($A$2:$A$19&" "&$B$2:$B$19&" "&$C$2:$C$19=AT2)*($AA$2:$AA$19=1),1,0))
AV2:AV5AV2=SUM(IF(($A$2:$A$19&" "&$B$2:$B$19&" "&$C$2:$C$19=AT2)*($AA$2:$AA$19=1),$Z$2:$Z$19,0))
AU6:AV6,BA6:BB6,AX6:AY6AU6=SUM(AU2:AU5)
AX2:AX5AX2=SUM(IF(($A$2:$A$19&" "&$B$2:$B$19&" "&$C$2:$C$19=AT2)*($AA$2:$AA$19=2),1,0))
AY2:AY5AY2=SUM(IF(($A$2:$A$19&" "&$B$2:$B$19&" "&$C$2:$C$19=AT2)*($AA$2:$AA$19=2),$Z$2:$Z$19,0))
BA2:BB5BA2=AU2+AX2
AA2:AA19AA2=COUNTIFS($A$2:$A2,A2,$B$2:$B2,B2,$C$2:$C2,C2,$W$2:$W2,W2,$X$2:$X2,X2)
C20C20=COUNTA(C2:C19)
Z20Z20=SUM(Z2:Z19)
Apologies for the late reply, been busy.

I've just run this and it works really well, thank you :)
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

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