Reputation: 10094
Ive got a column of dates dd/mm/yyyy, im trying to summaries them by month and year. Eg. if i have 01/01/2012, 23/01/2012
i would like to have a summary table showing 01/2012 | 2
.
Is there a simple way to do this ? At the moment im trying to copy the full date, reformat it only to show mm/yyyy and then run a countif
formula, but it seems a complex way to do it, or is this the right way ?
Upvotes: 0
Views: 469
Reputation:
Use the COUNTIFS function with EDATE supplying the upper boundary.
With 01/01/2012
in C2 (with a cell format of mm/yyyy
) put this in D2,
=COUNTIFS(A:A, ">="&C2,A:A, "<"&EDATE(C2, 1))
Upvotes: 1