itsalexclark wrote:
How do I do this same thing if instead of it listed as a month I have a date entered.
for example:
instead of APRIL
I have Apr 12, 2010
How can I extract the month and the find the sum of the amounts?
Assuming you want to sum all of the amounts in April, you'll need to extract the Month (number) from each date, then use the SUMIF function suggested by Jerry to sum the amounts.
If all your dates are in the same year, or if you want to include all of the amounts from April (eg.) without regard to the year, SUMIF will do the job correctly. If you have dates in more than one year, and are interested in the monthly sums for only one year at a time, you'll also need to extract the Year from the date and use SUMIFS.
Formulas:
Columns A and B on both tables are entered directly. Column B on the Summary table is not necessary to the calculations. Columns D and E on the Data table may be hidden.
Data table:
Column D: =MONTH(A)
Column E: =YEAR(A)
Summary table:
Column C (C2): =SUMIF(Data :: 'Month #',"=1",AMT)
Numbers automatically changes the "A" and "B" references in the formula to the names in the column headers, and specifies the table for the first (Month #) as there are columns with this name on both tables.
Note that the April sum in this column includes the three amounts in 2010 and the three amounts in 2011.
Column D (D2): =SUMIFS(AMT,Data :: 'Month #',"=1",Year,"=2010")
Note that the sums in this column include only the amounts where the date is in 2010.
For either of these formulas, the "=1" comparison must be changed manually for each row to match the Month number for the appropriate month.
For the second formula, change the second comparison to the appropriate year.
The quotation marks enclosing the comparison expression are necessary.
Regards,
Barry