-
All replies
-
Helpful answers
-
Sep 2, 2016 9:39 PM in response to abunceby Wayne Contello,ad an extra column and use the function month() to get just the month
then summarize by month by using the countif() function... like this:
In the table on the left (named "Data") add a column (column B) and add the formula...
B2=IF(COUNTA(A2)>0, MONTH(A2), "")
this is shorthand for... select cell B2 then type (or copy and paste from here) the formula:
=IF(COUNTA(A2)>0, MONTH(A2), "")
select cell B2, copy
select cells B2 thru the end of column B, paste
now add second table (on the right in the screenshot above, titled "Date Summary")
in column place the month number as shown
B2=COUNTIF(Data::B, A2)
select cell B2, copy
select cells B2 thru the end of column B, paste
-
Sep 3, 2016 6:37 PM in response to abunceby SGIII,If you like a compact approach you can do this with one formula, no extra columns, like this:
The formula in B2, filled down, is:
=COUNTIFS(Table 1::A,">="&A2,Table 1::A,"<"&EDATE(A2,1))
COUNTIFS works with column-condition pairs. In this case it counts values in column A of Table 1 that are greater than or equal to the date to its left in the second table, and less then a month after the date to its left. (The EDATE simply adds 1 month here).
When you enter a month name column A the smart date recognition in Numbers interprets it as the beginning of the month. Note that this works "within the same year". If you change years you'll want to enter a full date in column A (i.e. including year, month, and date) then format so just the month name is showing.
SG

