PDA

View Full Version : IF Date falls within a Month - Help!



maxhayden
09-09-2009, 06:08 AM
Hi there,

I want to run an IF loop that checks if cells in Culumn A fall within a certain month. If they do, then it will count.

Is there a way of doing this. Eg. If Cells(i, 1) = Month(September) Then .....

nst1107
09-09-2009, 07:03 AM
The way you've got it constructed right now, just dim another variable to count the cells, and finish the If statement something like this:If Month(Cells(i,1) = 9 Then x = x + 1

Bob Phillips
09-09-2009, 02:48 PM
Use a formula

=SUMPRODUCT(--(MONTH(A2:A20)=9))