Forum Discussion
Herrmenan
Aug 24, 2019Copper Contributor
Help with Excel formula
I need help with Excel to return the sum of the values in a column if certain condition. In the table below, the in the cell next to Month 1, I need to add a formula that will tell Excel to return th...
- Aug 24, 2019
Hi,
You can use this formula:
=SUMPRODUCT((YEAR($A$2:$A$16)=E7)*(MONTH($A$2:$A$16)=F7),$B$2:$B$16)
Hope that helps
Detlef_Lewin
Aug 24, 2019Silver Contributor
A more complicated solution would be a pivot table.
Put "Date" in the rows area and "Value" in the values area.
Group "Date" by year and month.
- HerrmenanAug 24, 2019Copper Contributor
Detlef_Lewin Thanks Lewin. A pivot table is a great idea. But I like the formula bc I can copy accross and my sheet structure will remain the same. Thank you anyway.