Formula - Calculating current headcount based on punch clock times

gd6noob

Board Regular
Joined
Oct 20, 2017
Messages
170
Office Version
  1. 2016
Platform
  1. Windows
Hi guys,

Just a little help.

Using below table, I need to count how many people on onsite using their SOS(Start of Shift) and EOS. If they have only 1 time under SOS, then it would mean they are onsite. If they have 2 punches, 1 under SOS and 1 under EOS, then they are not onsite.
For calculating how many are on break headcount, I assume it would be almost similar formula? If they have a break out time, it means they are on break.

Green Badge Sign-In Sheet.xlsb
CDEFGHIJKLMN
2Sunday
3LoginSOSBreak OutBreak InEOSTotal Hous
4Test 1 
5Test 2 
6Test 3 
7Test 4 
8Test 5 
9Dashboard SummaryTest 6 
10DaysHeadcountBreakTotal HoursTest 7 
11Sunday Test 8 
Week 42
Cell Formulas
RangeFormula
F11F11=IF(SUM(N4:N28)=0,"",SUM(N4:N28))
N4:N11N4=IF(J4="","",IF(M4="","",IF(J4>M4,M4+1,M4)-J4))


Thanks for any help.
 
Apparently you missed the part where I expressed that concern back up in post 4:


You never addressed that concern, so I thought then maybe it was not really a concern.
But based on your last post, I am guessing it really is.
That is why when posting sample data, you want to do your best to catch all the different scenarios to make sure that they have all been addressed.
Ohh I thought I did in Post #5. My Apologies.
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Ohh I thought I did in Post #5. My Apologies.
In looking at the history of the post, it looks like you made edits to post 5 after I had already posted post 6, so I did not see them.

See if these updates work for you:

D11: =COUNTIFS(J3:J11,">0",M3:M11,"",K3:K11,">0",L3:L11,">0") + COUNTIFS(J3:J11,">0",M3:M11,"",K3:K11,"",L3:L11,"")
E11: =COUNTIFS(J3:J11,">0",M3:M11,"",K3:K11,">0",L3:L11,"")
 
Upvote 0
Solution
In looking at the history of the post, it looks like you made edits to post 5 after I had already posted post 6, so I did not see them.

See if these updates work for you:

D11: =COUNTIFS(J3:J11,">0",M3:M11,"",K3:K11,">0",L3:L11,">0") + COUNTIFS(J3:J11,">0",M3:M11,"",K3:K11,"",L3:L11,"")
E11: =COUNTIFS(J3:J11,">0",M3:M11,"",K3:K11,">0",L3:L11,"")
Yes, after posting it originally, it did not clarify what I wanted so I edited it.

Thank very much you, this is working how I expected now.
 
Upvote 0
You are welcome.
Glad we got it all sorted and working the way you want!
:)
 
Upvote 0
In looking at the history of the post, it looks like you made edits to post 5 after I had already posted post 6, so I did not see them.

See if these updates work for you:

D11: =COUNTIFS(J3:J11,">0",M3:M11,"",K3:K11,">0",L3:L11,">0") + COUNTIFS(J3:J11,">0",M3:M11,"",K3:K11,"",L3:L11,"")
E11: =COUNTIFS(J3:J11,">0",M3:M11,"",K3:K11,">0",L3:L11,"")
Hi @Joe4

Just had a follow up question on this, I would like to know if someone has a start time before 18:00 in column J or after. I would like to separate this from a Day Shift and Night Shift.

ie.
in D11, if someone has start before 18:00, then it would continue with your formula.
in D12, if someone has start after 18:00, then it would continue with your formula.

I hope this makes sense.
 
Upvote 0
Hi @Joe4

Just had a follow up question on this, I would like to know if someone has a start time before 18:00 in column J or after. I would like to separate this from a Day Shift and Night Shift.

ie.
in D11, if someone has start before 18:00, then it would continue with your formula.
in D12, if someone has start after 18:00, then it would continue with your formula.

I hope this makes sense.
That is really a whole new question, and should be posted to its own new thread.
 
Upvote 0

Forum statistics

Threads
1,215,067
Messages
6,122,949
Members
449,095
Latest member
nmaske

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