Subtotal occurrences by month with filters

JalopyJeep

New Member
Joined
Jul 13, 2016
Messages
4
I am currently trying to get a total number of entries made during each month within that year. I have been able to use the countifs function successfully i just need it to work with filters.

This is my current formula that i would like to work with filters.

=COUNTIFS(L19:L9994,">="&"5/1/2015",L19:L9994,"<="&"5/31/2015")

Below is an example of the spreadsheet i would like to have populate as the sheet is filtered.
20152016TOTAL
January0126126
February15105120
March3770107
April296695
May204464
June14037177
July16411175
August86086
September76076
Octover1330133
November1520152
December1100110
TOTAL9624591421

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

I have already used pivot tables but would like a different method for totaling.

Thank you in advance for any help and tips,

Jeremy
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I would recommend adding a helper column, say column M for example
In M19 and filled down to M9994 put
=SUBTOTAL(103,L19)

Then use
=COUNTIFS(L19:L9994,">="&"5/1/2015",L19:L9994,"<="&"5/31/2015",M19:M9994,1)
 
Upvote 0
I was not able to get this to work, i kept being returned a value of 0. also i cannot add to or modify the spreadsheet.

Thank you for the help Jonmo1.
 
Upvote 0
Don't see why that wouldn't work.
Did you put it in exactly as I posted? It was tailored specifically for the formula you posted. Don't change what I posted.



On a personal opinion note:

I'm always discouraged when I hear this
also i cannot add to or modify the spreadsheet.

Why Not?
Doesn't creating this very formula itself count as a modification to begin with?

It's not that you physically can't, excel gives you 16384 columns to work with, surely you haven't actually used them all already.
So it must be the old 'upper management says so'

Well, they've delegated the task to you, so assert yourself and say something like
"In my expert opinion (which you've tasked me to use), this is the best way to accomplish the task"

The extra used column can be hidden, and it doesn't even need to be on the same sheet.
 
Last edited:
Upvote 0
Got it to work.

And yeah its the old upper management excuse unfortunately. I dont make the rules i just play by them.

Thank you again for the help, really appreciate it.
 
Upvote 0
You're welcome.

Mind you, it CAN be done without the helper column. I know there are other formula gurus here that know how to do it.
But it's out of my wheelhouse, simply because I choose to not do it.
The helper column is far more efficient than the methods I've seen to incorporate it directly into one formula.

So stick around, someone else may come by and do it in one formula.
 
Upvote 0
If needed...
Rich (BB code):
=SUMPRODUCT(
    SUBTOTAL(2,OFFSET(L19,ROW(L19:L9994)-ROW(L19),0,1)),
    --(L9:L9994>="5/1/2015"+0),
    --(L9:L9994<="5/31/2015"+0))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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