Countifs to combine multiple variables

karin23

New Member
Joined
Sep 28, 2017
Messages
6
I have dates in column W and data in both Column AC and AD. I'd like to count how many "A"s are in both AC and AD prior to Dec 11. I know I'm missing something but can someone take a look at this for me?

=COUNTIFS(Data!W2:W53651,"<171211",Data!AC2:AC53651,"A",+Data!AD2:AD53651,"A")
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Try

=SUMPRODUCT(--(Data!W2:W53651< DATEVALUE("12/11/17")),--((Data!AC2:AC53651="A")+(Data!AD2:AD53651="A")))

without the space after the < (need to add that so the forum would not think it was HTML code).
 
Last edited:
Upvote 0
It came back with a result of True, not a total count.


Try

=SUMPRODUCT(--(Data!W2:W53651< DATEVALUE("12/11/17")),--((Data!AC2:AC53651="A")+(Data!AD2:AD53651="A")))

without the space after the < (need to add that so the forum would not think it was HTML code).
 
Upvote 0
It's returning a count for me.
Excel Workbook
WXABACAD
13
212/1/2017Ag
312/3/2017Al
412/15/2017AA
511/30/2017fh
611/1/2017gA
Sheet
 
Upvote 0
Thanks. That worked when I changed the dates to 4 digit year vs 2 digit.

How would you do it if it was a date range such as Dec 16-20?

It's returning a count for me.

WXABACAD
13
212/1/2017 Ag
312/3/2017 Al
412/15/2017 AA
511/30/2017 fh
611/1/2017 gA

<colgroup><col style="width:30px; "><col style="width:76px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
W1=SUMPRODUCT(--(Data!W2:W53651< DATEVALUE("12/11/17")),--((Data!AC2:AC53651="A")+(Data!AD2:AD53651="A")))

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0
Something like this, you could also put your date range into cells to make it easy to change (example in cell T3 below).
Excel Workbook
STUVWXABACAD
1Start Date12/16/20173
2End Date12/20/201712/19/2017Ag
3312/3/2017Al
412/18/2017AA
511/30/2017fh
612/11/2017AA
Sheet
 
Upvote 0
Thank you so much! Super helpful. I learn something new all the time on this board.

Karin

Something like this, you could also put your date range into cells to make it easy to change (example in cell T3 below).

STUVWXABACAD
1Start Date12/16/2017 3
2End Date12/20/2017 12/19/2017 Ag
3 3 12/3/2017 Al
4 12/18/2017 AA
5 11/30/2017 fh
6 12/11/2017 AA

<colgroup><col style="width:30px; "><col style="width:87px;"><col style="width:87px;"><col style="width:46px;"><col style="width:34px;"><col style="width:76px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
W1=SUMPRODUCT(--(Data!W2:W53651>DATEVALUE("12/16/17")),--(Data!W2:W53651< DATEVALUE("12/20/17")),--((Data!AC2:AC53651="A")+(Data!AD2:AD53651="A")))
T3=SUMPRODUCT(--(Data!W2:W53651>$T$1),--(Data!W2:W53651< $T$2),--((Data!AC2:AC53651="A")+(Data!AD2:AD53651="A")))

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0

Forum statistics

Threads
1,215,724
Messages
6,126,477
Members
449,315
Latest member
misterzim

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