PivotTable count blanks

martipe1

Board Regular
Joined
Mar 16, 2007
Messages
71
I have a table with products and dates:

Example:

Product Date 1 Date 2 Date 3 Date 4 Date 5
A January 02/02/14 BLANK 03/02/13 04/02/12
B January BLANK 02/02/12 03/02/12 BLANK
C January 02/02/13 BLANK 03/02/14 04/02/13
D January 02/02/12 03/02/14 BLANK 04/02/14

I want to count blank dates based on Date 1, this is the output I expect

Date 1 Date 2 Date 3 Date 4 Date 5
January 1 2 1 1


Any idea?

Thanks
 
Last edited:

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Thank you for your help

The formula could work, but I would have to manually set the range for every date 1 change, which in my case is not practical
 
Upvote 0
You could set one range, drag to apply it to all the fields you want. Like:

Data Set:

Excel 2010
ABCDEF
ProductMonthDate 1Date 2Date 3Date 4
AJanuaryBLANK
BJanuaryBLANKBLANK
CJanuaryBLANK
DJanuaryBLANK
EJanuaryBLANK
FJanuaryBLANKBLANK
GJanuaryBLANK
HJanuaryBLANK
IJanuaryBLANKBLANKBLANK
AFebruaryBLANK
BFebruaryBLANK
CFebruary
DFebruaryBLANK
EFebruary
FFebruaryBLANK
GFebruaryBLANKBLANK
HFebruaryBLANK
IFebruaryBLANKBLANKBLANK

<tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]2/2/2014[/TD]

[TD="align: right"]3/2/2013[/TD]
[TD="align: right"]4/2/2012[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]2/2/2012[/TD]
[TD="align: right"]3/2/2012[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]2/2/2013[/TD]

[TD="align: right"]3/2/2014[/TD]
[TD="align: right"]4/2/2013[/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]2/2/2012[/TD]
[TD="align: right"]3/2/2014[/TD]

[TD="align: right"]4/2/2014[/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]2/2/2014[/TD]

[TD="align: right"]3/2/2013[/TD]
[TD="align: right"]4/2/2012[/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]2/2/2012[/TD]
[TD="align: right"]3/2/2012[/TD]

[TD="align: center"]8[/TD]

[TD="align: right"]2/2/2013[/TD]

[TD="align: right"]3/2/2014[/TD]
[TD="align: right"]4/2/2013[/TD]

[TD="align: center"]9[/TD]

[TD="align: right"]2/2/2012[/TD]
[TD="align: right"]3/2/2014[/TD]

[TD="align: right"]4/2/2014[/TD]

[TD="align: center"]10[/TD]

[TD="align: right"]4/2/2012[/TD]

[TD="align: center"]11[/TD]

[TD="align: right"]2/2/2012[/TD]
[TD="align: right"]2/2/2012[/TD]
[TD="align: right"]4/2/2013[/TD]

[TD="align: center"]12[/TD]

[TD="align: right"]3/2/2013[/TD]
[TD="align: right"]4/2/2014[/TD]
[TD="align: right"]4/2/2013[/TD]

[TD="align: center"]13[/TD]

[TD="align: right"]3/2/2014[/TD]
[TD="align: right"]3/2/2012[/TD]
[TD="align: right"]2/2/2012[/TD]
[TD="align: right"]4/2/2014[/TD]

[TD="align: center"]14[/TD]

[TD="align: right"]3/2/2013[/TD]
[TD="align: right"]3/2/2014[/TD]

[TD="align: right"]3/2/2013[/TD]

[TD="align: center"]15[/TD]

[TD="align: right"]3/2/2012[/TD]
[TD="align: right"]7/9/2014[/TD]
[TD="align: right"]2/2/2012[/TD]
[TD="align: right"]3/2/2012[/TD]

[TD="align: center"]16[/TD]

[TD="align: right"]3/2/2014[/TD]
[TD="align: right"]3/2/2013[/TD]

[TD="align: right"]3/2/2014[/TD]

[TD="align: center"]17[/TD]

[TD="align: right"]3/2/2012[/TD]
[TD="align: right"]3/2/2014[/TD]

[TD="align: center"]18[/TD]

[TD="align: right"]4/2/2012[/TD]
[TD="align: right"]3/2/2014[/TD]
[TD="align: right"]3/2/2014[/TD]

[TD="align: center"]19[/TD]

[TD="align: right"]4/2/2013[/TD]

</tbody>
Sheet1





Outcome:

Cell: J2
=COUNTIFS($B$2:$B$19,$I2,C$2:C$19,"Blank")

It checks the array to make sure the month matches and that the text, "Blank" appears in the array. Drag to apply to all the ranges you want.

Excel 2010
HIJKLM
MonthDate 1Date 2Date 3Date 4
# of BlanksJanuary3532
February3133

<tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"][/TD]

</tbody>
Sheet1
 
Upvote 0

Forum statistics

Threads
1,225,477
Messages
6,185,215
Members
453,283
Latest member
Shortm88

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