CountIf must match two criteria

Laird

New Member
Joined
Sep 13, 2008
Messages
13
I have a ss of days, with hours worked.

I wish to count the completed rows for normal working days in the month.

Col B contains the day of the week ("Mon","Tue","Sat" etc) or "STAT"

Col G contains the number of hours worked (a formula that shows "" if blank)

I wish to count the rows where Col G is not "" and where Col B is "Mon" "Tue" "Wed" "Thu" or "Fri"

PS - For the curious, Col C and D are arrive/depart times; Col E and F are "Amount of Break" and "Hours worked off-site that day"
 
Last edited:

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I have a ss of days, with hours worked.

I wish to count the completed rows for normal working days in the month.

Col B contains the day of the week ("Mon","Tue","Sat" etc) or "STAT"

Col G contains the number of hours worked (a formula that shows "" if blank)

I wish to count the rows where Col G is not "" and where Col B is "Mon" "Tue" "Wed" "Thu" or "Fri"

Code:
=SUMPRODUCT(
  --ISNUMBER(MATCH($B$2:$B$400,{"Mon","Tue","Wed","Thu","Fri"},0)),
  --ISNUMBER($G$2:$G$400),
  --($G$2:$G$400 > 0))
 
Upvote 0

Forum statistics

Threads
1,215,616
Messages
6,125,865
Members
449,266
Latest member
davinroach

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