count records depending on selected month

smuller74

New Member
Joined
Sep 8, 2009
Messages
38
Hello all,

I'm getting confused looking for the correct formula :( and I hope somebody can help... :rolleyes:

I'm using this array formula currently to count records:

=COUNT(IF((sheet2!F2:F5000=55)*(D22="january")*(sheet2!Q2:Q5000=1);(sheet2!A2:A5000)))

(D22="january") - In box "D22" I placed a drop-down to select a month.

This formula is working for "january" (= sheet2!Q2:Q5000=1) but how do I adjust the formula to make sure the calculations are correct per month if I change the month in "D22"? :confused:

Thanks for any help or any idea.

Best regards
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Maybe try:

=COUNT(IF((sheet2!F2:F5000=55)*(sheet2!Q2:Q5000=MONTH(("1"&D22)+0));(sheet2!A2:A5000)))
 
Last edited:
Upvote 0
It seems to work but not if I select "january" (= sheet2!Q2:Q5000=1) and/or "february" (= sheet2!Q2:Q5000=2)...
 
Upvote 0
I have an additional question. I wanted to add another condition like
"(sheet2!A2:A5000);H4;". In H4 you can enter a customer number to see only results of this customer. Can we integrate it anyhow to the excisting formula?

=COUNT(IF((sheet2!F2:F5000=55)*(sheet2!Q2:Q5000=MONTH(("1"&D22)+0));(sheet2!A2:A5000)))

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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