count value based on different cell for multiple criteria with formula

trimiii

Board Regular
Joined
May 15, 2018
Messages
69
Office Version
  1. 365
Platform
  1. Windows
HI,

I need help... on column A2 I have the result of 6 drivers that are registered based on 6-course category (A1, A2, B1, B2, C1, C2). the daily attendance are listed from F4:k9)
On the column D4:d9, I have result of the daily attendance, weekly total for Absent only
On the column e4:e9, I have the result of the daily attendance, the weekly total for Duty only

Now, what I need is:
1. on the column B2, to count me how many days the student is absent based on the category A1, B1, C1 ( on the columns b4:b9), only for absent (result from column D4:D9), the correct result should be 4
2. on the C2, to count me how many days the student was on duty based on the result on columns E4:E9, the correct result should be 3


see the pic1 for more clarification.

thuoughts...
 

Attachments

  • pic1.PNG
    pic1.PNG
    23 KB · Views: 17

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
Hi Dear,

Just a clarification, for categories A1, B1 and C1 I can see (4,2,1). Why do you consider the correct result is 4 only?

With regards to the second part, you can simply use the following formula in cell C2 unless there is another requirement that renders this logic inappropriate
=SUM(E:E)

Regards
 
Upvote 0
Hi,

Well, correction in my part... 4,2,1 are the number of the days that students were absent, but the correct result is 3 not 4; that's mean three students were absent during this week.

the criteria for this count is course title (A1, B1, and C1) as you see in the picture, 3 of 6 students were absent during this week (1 or more absent, doesn't matter) the count is for the student, not for the days.

Any student that is enrolled in a different course (such as B2, C2 or C2) should not be counted against this result.
 
Upvote 0
In this case, please use the following formula in cell B2
=COUNTIF(D:D,">"&0)
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,315
Members
448,886
Latest member
GBCTeacher

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