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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
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.
 

Forum statistics

Threads
1,181,925
Messages
5,932,822
Members
436,863
Latest member
ajlauten

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
Top