Countif with multiple criteria

wezzy28

New Member
Joined
Mar 12, 2018
Messages
9
Hello!

I'm running a file where I put down the number of hours an employee worked on a certain day - I then color-code it to differentiate between night and day shifts. I'm using the colorfunction for that.

I then run a count to calculate how many men worked on day shift and night shift - from B16 to B28
HTML:
=colorfunction($A$16, KF$3:KF$14, false)

Then I do a count of how many shifts a day are being run - B34 to B38
HTML:
=countif(kf16:kf22, ">0")



Now I've just added a new criteria - green cells mean the operative worked full day - both day and night shift.

What I want is when I do the count of shifts per day, I want the formula to compare whether the cell color is green - if it is, then add 1 to both day and night shift count. If the cell is not green then count only.

Just a few more explanations about my screenshot - I have three shades of yellow which mean 3 crews worked the morning shift.

The blue shades indicate the number of crews who worked night.

When I do the count for the number of crews per day, I do it separately for day and night.

Thank you in advance for any assistance provided on this issue.
 
Last edited:

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,223,885
Messages
6,175,180
Members
452,615
Latest member
bogeys2birdies

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