Count blanks, in a range defined by criteria outside range

AndrewPhoenix

New Member
Joined
May 16, 2016
Messages
3
Hello

I am trying to create a sheet to calculate available resources week by week based on a gant chart, I have simplified the sheet below-

ABCDEFGHIJKL
1Week 22Week 23
2NameJob role30/0531/0501/0602/0603/0606/0607/0608/0609/0610/06
3JohnPMHolHolHol
4StevePM
5StuartBA
6AndrewPMOff siteOff siteOff site
7DebbiePA
8JulieBA
9
10W/C30/0506/0613/06
11PM
12BA
13PA

<colgroup><col style="width: 37px"><col width="101"><col width="58"><col width="58"><col width="58"><col width="58"><col width="58"><col width="58"><col width="58"><col width="58"><col width="58"><col width="58"><col width="58"></colgroup><tbody style="margin: 0px; padding: 0px; border: 0px;">
</tbody>


The top table will be populated with peoples availability, a blank cell will represent when an employee is available. So in the lower table I am looking to populate cells B11:D13 with a formula that will calculate the number of resources available for that week, for the corresponding job type. I am hoping that the formula can look across the whole table so can be easily reproduced for the next week in the lower table, and will react if an employers job role changes in the upper table. I have previously created similar formulas to what I require with SUMIFS functions, but the difference to these is I now need to COUNTIF, and this function will not let me COUNTIF based on criteria outside the range/cells that are actually being counted.


So broken down, the formula that I would like in cell B11 would ideally look something like this- COUNTIFS(C3:L8,"=""",$B3:$B8,"<wbr>="&A11,C$2:G$2,AND(>=B10,<B10+<wbr>5))


I understand that the above formula will no work for a number of reason, but I hope that the idea of it gives a clearer idea of what I am trying to achieve. I am looking to return the number of cells that are blank, that correspond to the week commencing 30/05, and that have the job role of a PM.


Any help would be greatly appreciated.


Andrew








 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hi Andrew

Welcome to Mr Excel forum

See if this formula does what you need

B11
=SUMPRODUCT(($C$2:$L$2>=B$10)*($C$2:$L$2<=B$10+4)*($B$3:$B$8=$A11)*($C$3:$L$8=""))
copy across and down

Hope this helps

M.
 
Upvote 0
W21W22W23
PM24135811369
BA24246810246
PA1212345123
PM2212233333
BA2222222222
PA1111111111
NameJob roleW21W21W22W22W22W22W22W23W23W23
JohnPMHolHolHol1111111
StevePM1111111111
StuartBA1111111111
AndrewPM11Off siteOff siteOff site11111
DebbiePA1111111111
JulieBA1111111111
col Bcol M
I used 1 to mean available
the helper rows are all automated
the table below pulls the data using offset match
if this way wd be acceptable I will post the formulas
WeekW21W22W23
PM4119formula giving PM W21 = 4
BA4106
PA253=OFFSET($C$1,MATCH($B37,$C$2:$C$4,0),MATCH(C$36,$D$1:$M$1,0))

<colgroup><col width="64" span="15" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,030
Messages
6,122,762
Members
449,095
Latest member
m_smith_solihull

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