Date array count calculation in a month

sachinviki

New Member
Joined
Jul 21, 2017
Messages
3
Hi Experts,

I have a request here, I have employee attendance who logs their presence and absence, we want to monitor their weekly availability of each individual, based on which the jobs will be allocated for them. Meantime we are bringing this data to the dashboard. what i need is to calculate the availability dynamically for each month

October01-10-202102-10-202103-10-202104-10-202105-10-202106-10-202107-10-202108-10-202109-10-202110-10-2021
AAAAAAAAABWOWOBBBBBWOWO
BBBBBBBBBBBLWOWOBBBBVWOWO
CCCCCCCCCBWOWOBBBBBWOWO
DDDDDDDDBWOWOBBBBBWOWO
EEEEEEEEEEEBWOWOSLSLBBBWOWO
FFFFFFFFFFFSLWOWOSLSLSLSLSLWOWO
GGGGGGGGBWOWOAAAAAWOWO
HHHHHHHHAWOWOBBBBBWOWO

So, above is the table and "A" is the general shift, "B"is the second shift. I want to count both "A&B" for each week, Eg: 1st Oct 2021 to 3rd Oct 2021 and 4th Oct 2021 to 8th Oct 2021.

=COUNTIFS($B$2:$J$9,">=04-10-2021,$B$2:$J$9"&,"<="&08-10-2021,B4:AF9,"B",A:A,"ÄAAAAAAAA")

The above formula isn't working kindly help!

Regards,
Vignesh
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi Vignesh

You could use the following formula in A14.

=SUMPRODUCT(--(IF((IF((B1:K1>=A12)*(B1:K1<=A13),B2:K9,"")="A")+(IF((B1:K1>=A12)*(B1:K1<=A13),B2:K9,"")="B"),IF((B1:K1>=A12)*(B1:K1<=A13),B2:K9,0),"")<>""))

1633989432198.png


Kind regards

Saba
 
Upvote 0
Hi Vignesh

You could use the following formula in A14.

=SUMPRODUCT(--(IF((IF((B1:K1>=A12)*(B1:K1<=A13),B2:K9,"")="A")+(IF((B1:K1>=A12)*(B1:K1<=A13),B2:K9,"")="B"),IF((B1:K1>=A12)*(B1:K1<=A13),B2:K9,0),"")<>""))

View attachment 48845

Kind regards

Saba
Hi Saba,

Thanks for the response and the solution, but i forgot to provide one more condition in that i.e. for the Person "ÄAAAAAA" what is the count in the specific range. Can you help me to complete the formula?
 
Upvote 0
You could use the following formula in B16 and copy it down.

=SUMPRODUCT(--(IF((IF(($B$1:$K$1>=$A$12)*($B$1:$K$1<=$A$13)*($A$2:$A$9=A16),$B$2:$K$9,0)="A")+(IF(($B$1:$K$1>=$A$12)*($B$1:$K$1<=$A$13)*($A$2:$A$9=A16),$B$2:$K$9,0)="B"),IF(($B$1:$K$1>=$A$12)*($B$1:$K$1<=$A$13)*($A$2:$A$9=A16),$B$2:$K$9,0)<>"")))


Can you please update our Excel version so that we can provide right solution for your Excel problem?

Kind regards

Saba

1634331421986.png
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,537
Members
449,088
Latest member
RandomExceller01

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