COUNTIFS(AND( help

SFCChase

Board Regular
Joined
Jun 25, 2013
Messages
107
Office Version
  1. 2016
Platform
  1. Windows
UNIT

ATTENDANCE
1
2
3
4
5
UNIT
1
2
3
4
5
28CSH

SCHEDULED
8
12
12
8
12
28CSH
ACTUAL
PRES
PRES
FTR
LV
PRES
601 ASMC
28CSH
SCHEDLED
12
12
12
8
8
ACTUAL
PRES
PRES
PRES
FTR
LV
601 ASMC
SCHEDULED
12
8
8
12
12
ACTUAL
PRES
FTR
LV
PRES
PRES

<tbody>
</tbody>
Looking for some help. I have a large spreadsheet that looks similar to the one above. I am trying to write a formula (in J2) that will count the number of times a 28CSH (Column A) person is PRESENT for work on the scheduled day (1,2,3,4,etc). Ideally the formula will scan A2:A7 for "28CSH" and count every time a person is PRES for a scheduled shift (so J2 would result 2, J3 would result 2, but J3 would only result 1). The formula will then be used to count for the other Units I have in the spreadsheet (like 601 ASMC). I was using COUNTIFS($A2:$A7,"28CSH",C2:C7,12)+COUNTIFS($A2:$A7,"28CSH",C2:C7,8) but it wasn't giving me actual attendance (only scheduled). Is there a way to add in some AND logic to count only those that are PRES?
 
Last edited:

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Try this in J2, then drag right and down.

=COUNTIFS($A$2:$A$7,$I2,$B$3:$B$8,"ACTUAL",C$23:C$8,"PRES")
 
Last edited:
Upvote 0
I just noticed a typo in the formula above, it should be

=COUNTIFS($A$2:$A$7,$I2,$B$3:$B$8,"ACTUAL",C$3:C$8,"PRES")

Note that the ranges used to count "actual" and "pres" start and finish one row below the type range.

If your real data is consistent with the pattern of your example, then you could also omit "actual" from the formula and just use

=COUNTIFS($A$2:$A$7,$I2,C$3:C$8,"PRES")
 
Upvote 0

Forum statistics

Threads
1,214,638
Messages
6,120,674
Members
448,977
Latest member
moonlight6

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