Fiscal year COUNTIF formula

mprusin

New Member
Joined
Nov 23, 2015
Messages
16
Need help tweaking my formula...will work on one spreadsheet but not my current one.

Current formula is =COUNTIFS($G$7:$AJ$115,"AK",$D$7:$D$115,">"&DATEVALUE("9/30/17"),$D$7:$D$115,"<"&DATEVALUE("1/1/18"))

G7:AJ115 is the full range (all State abbreviations are located here)

D7:D115 is the full range of Rpt (report date)

I need my formula to look through G7:AJ115 for "AK" and then tell me how many times "AK" shows up in either 1,2,3 or 4th QTRs. The DATEVALUE portion above is to catch all 1ST QTR "AK".

Excel is showing the error is with my DATEVALUE and dates. I don't know why. I've tried CTRL H to fit date format, that didn't work

Snipet of full spreadsheet is below.

B C D E F G
[TABLE="width: 1280"]
<tbody>[TR]
[TD]Class[/TD]
[TD]16 Day[/TD]
[TD]Rpt[/TD]
[TD]Start[/TD]
[TD]End[/TD]
[TD="colspan: 14"]Quota Allocation[/TD]
[/TR]
[TR]
[TD]001[/TD]
[TD]27-Sep-17[/TD]
[TD]10/13/2017[/TD]
[TD]10/14/17[/TD]
[TD]10/27/17[/TD]
[TD]PA[/TD]
[TD]AR[/TD]
[TD]PA[/TD]
[TD]CT[/TD]
[TD]CT[/TD]
[TD]WI[/TD]
[TD]NY[/TD]
[TD]RI[/TD]
[TD]NJ[/TD]
[TD]PA[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]002[/TD]
[TD]15-Nov-17[/TD]
[TD]12/1/2017[/TD]
[TD]12/02/17[/TD]
[TD]12/15/17[/TD]
[TD]IN[/TD]
[TD]PA[/TD]
[TD]PA[/TD]
[TD]PA[/TD]
[TD]PA[/TD]
[TD]PA[/TD]
[TD]PA[/TD]
[TD]CT[/TD]
[TD]OH[/TD]
[TD]NY[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]003[/TD]
[TD]03-Jan-18[/TD]
[TD]1/19/2018[/TD]
[TD]01/20/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TD]
[TD]NGB[/TD]
[TD]NGB[/TD]
[TD]NY[/TD]
[TD]NH[/TD]
[TD]MI[/TD]
[TD]NJ[/TD]
[TD]NJ[/TD]
[TD]NJ[/TD]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]008[/TD]
[TD]20-Jun-18[/TD]
[TD]7/6/2018[/TD]
[TD]07/07/18[/TD]
[TD]07/20/18[/TD]
[TD]PA[/TD]
[TD]PA[/TD]
[TD]MD[/TD]
[TD]MD[/TD]
[TD]MD[/TD]
[TD]NJ[/TD]
[TD]NJ[/TD]
[TD]NJ[/TD]
[TD]NJ[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]009[/TD]
[TD]18-Jul-18[/TD]
[TD]8/3/2018[/TD]
[TD]08/04/18[/TD]
[TD]08/17/18[/TD]
[TD]CT[/TD]
[TD]CT[/TD]
[TD]NH[/TD]
[TD]MD[/TD]
[TD]MD[/TD]
[TD]MD[/TD]
[TD]MD[/TD]
[TD]OH[/TD]
[TD]NY[/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]010[/TD]
[TD]22-Aug-18[/TD]
[TD]9/7/2018[/TD]
[TD]09/08/18[/TD]
[TD]09/21/18[/TD]
[TD]ME[/TD]
[TD]ME[/TD]
[TD]MD[/TD]
[TD]MD[/TD]
[TD]MD[/TD]
[TD]MD[/TD]
[TD]NY[/TD]
[TD]NY[/TD]
[TD]NJ[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody><colgroup><col><col span="4"><col><col span="10"><col><col span="2"></colgroup>[/TABLE]
 
Try using DATE instead of DateValue
DATE(yyyy,mm,dd)

So change
DATEVALUE("9/30/17")
to
DATE(2017,9,30)
 
Upvote 0
Also, should have seen this first...

Countifs requires all the ranges to be of similar dimensions.
You have $G$7:$AJ$115 which is multi column and multi row
Then $D$7:$D$115 which is just a single column.
That won't work.

You will probably need to use sumproduct, hang on.
 
Upvote 0
Try

=SUMPRODUCT(($G$7:$AJ$115="AK")*($D$7:$D$115>DATE(2017,9,30))*($D$7:$D$115<DATE(2018,1,1)))
 
Upvote 0
IT WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I spent a full day off an on trying to figure this out. My HERO!
 
Upvote 0

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