Forum Discussion
GregDC
Jan 17, 2024Copper Contributor
Using Sumif with a table
Using a table with two Columns: Transaction date(M/D/Y) and amount, sorted by Transaction Date. I need to report on the total amount for each month. Month Month Total 1 ...
Lorenzo
Jan 17, 2024Silver Contributor
Hi GregDC
The issue has nothing to do with the fact that you use a Table instead of a Range. In a nutshell what you would need to do is:
=SUMIF(MONTH(Table8[Transaction Date]), J8, Table8[Amount($)])but that's not possible as MONTH(Table8[Transaction Date]) returns an Array where SUMIF expects a Range
Alternatives exist (depends on the Excel version you run). Assuming you won't want to add a calculated [Month] column to your table, below is one with a PivotTable (sample attached):
- Drop the [Transaction Date] field to the Rows area. Excel will auto. group dates by Days, Months...
- Remove all but Months (Transaction Date)
- Drop the [Amount ($)] field to the Values area
GregDC
Jan 17, 2024Copper Contributor
Ok, I have done Pivot tables in the past (many years ago!) So I will dust off those brain cells and see what I can do. Thanks