Summing Column A based on dates from Column B

nurikabe

New Member
Joined
Sep 22, 2002
Messages
10
Is it possible to sum one column based on the month and year of values in another? I have tried this:

=SUMIF(G8:G17,"=2002-10",C8:C17)

Without any luck. This will only work when the dates have been entered as the first of the month.

Is there a better way to do this than with SUMIF?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
On 2002-10-12 04:50, nurikabe wrote:
Is it possible to sum one column based on the month and year of values in another? I have tried this:

=SUMIF(G8:G17,"=2002-10",C8:C17)

Without any luck. This will only work when the dates have been entered as the first of the month.

Is there a better way to do this than with SUMIF?

=SUMIF($G$8:$G$17,"="&MONTH(E1)&"-"&YEAR(E1),$C$8:$C$17)

where $G$8:$G$17 houses true dates and E1 the date value 10/01/2002 in the mm/dd/yy format.

Try this to see whether it works. If not, there is a different, but expensive, formula you can use.
 
Upvote 0

Forum statistics

Threads
1,215,731
Messages
6,126,535
Members
449,316
Latest member
sravya

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top