# COUNTIF DATE RANGE in a Quarter

1. ## COUNTIF DATE RANGE in a Quarter

Hi there,

I have a formula to work out the quarter of a specific date, however, I would like to do a countif on a range. ``Please Login or Register  to view this content.``
How can I convert the above formula into a countifs, as I only get errors with the below ``Please Login or Register  to view this content.``
can you help me convert it into a countifs or sumproduct?  Register To Reply

2. ## Re: COUNTIF DATE RANGE in a Quarter

are you saying that your first formula is being used row by row to put the date in column D into a quarter?
then the next formula is supposed to count those results?  Register To Reply

3. ## Re: COUNTIF DATE RANGE in a Quarter

Sort of. I wanted the formula to directly countif from the date range, rather than having a "helper column". This is for a waterfall chart, so not from a pivot table.

I can upload a workbook if it is still not clear.  Register To Reply

4. ## Re: COUNTIF DATE RANGE in a Quarter

I don't know if this is what you want but lets say your dates are in column D, this will count the number of those for Q3... =SUMPRODUCT(--(MONTH(D12:D15)={7,8,9}))
you can extend the range but it will only count those with months 7 or 8 or 9 without regard to years.
does that get you closer? do you have data that spans years and need a year added to it?
if so this would give you a count based on year... =SUMPRODUCT(--(MONTH(D12:D16)={7,8,9})*(YEAR(D12:D16)=2019))  Register To Reply