Countin Dates

S

Steve J

Hi

I have a colum which contains dates in format mmm-yy format
In the first row, I would like to count the number of instances where the
month and year is equal to the current month and year.

Is this possible please?

Tks
S
 
N

Nick

Steve

Enter this as an array formula (Ctrl+Shift+Enter)

=SUM(IF(MONTH(B5:B34)=MONTH(NOW()),IF(YEAR(B5:B34)=YEAR(NOW()),1,0),0))

dates in range B5:B34
This formula will count the number of dates that have the same month and
year as today.

Hope this helps.
nick
 
D

Daniel.M

Hi Steve,

Just another one,

=SUMPRODUCT(--(A1:A20-DAY(A1:A20)=TODAY()-DAY(TODAY())))

Regards,

Daniel M.
 
Top