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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
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,144,510
Messages
5,724,782
Members
422,578
Latest member
annsalinas

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