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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I tried and it seems to work except for "januari"... I checked it a view times but I do not understand why the calculation is not right for this month. Could it have something to do with an condition=0? (instead of "55" in the first condition I have "0")
 
Upvote 0
No, no blank cells... it's also more counted then records are on sheet2... (maybe it counts all conditions containing a zero like "10, 30..." ???)
 
Upvote 0
=AANTAL(ALS((debiteurnummer!F2:F5000=0)*(debiteurnummer!Q2:Q5000=MAAND(("1"&F22)+0)*(debiteurnummer!A2:A5000=H4));(debiteurnummer!A2:A5000)))
 
Upvote 0
For me (Excel 2003):

debiteurnummer!F2:F5000=0

returns TRUE for blanks and zeroes, but not text entries or entries containing a zero.
 
Upvote 0
Well, the data range is actually F2:F2278 but I picked range F2:F5000 to make sure all data will be counted as the data range is growing every day.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
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