# Summing a second column based on values in the first

#### giles007

##### New Member
Hey guys,

I am struggling to get this working for me. I want a sum of all the sales in December. I am struggling with the problem is selecting the month within the full date string.

 Date Sale Value 15 oct 2013 91.50 19 Oct 2013 70 4 Dec 2013 83.20 13 Dec 2013 50 17 Dec 2013 62.30 1 Jan 2013 90

<tbody>
</tbody>

So I am looking for an answer that looks like this

Oct = 161.50
Dec = 175.50
Jan = 90

Thanks a mil !

### Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

#### Trevor G

##### Well-known Member
Welcome to the Forum, I would suggest you use a helper column to find the month by a number (use Month() formula) then you can calculate the column based on that number using a SUMIF. Like this =SUMIF(\$D\$2:\$D\$7,10,\$B\$2:\$B\$7)
 Date Sale Value 15-Oct-13 91.5 19-Oct-13 70 04-Dec-13 83.2 13-Dec-13 50 17-Dec-13 62.3 01-Jan-13 90

<tbody>
</tbody>
 Date Sale Value Month Month Totals 15-Oct-13 91.5 10 Oct 161.5 19-Oct-13 70 10 Dec 195.5 04-Dec-13 83.2 12 Jan 90 13-Dec-13 50 12 17-Dec-13 62.3 12 01-Jan-13 90 1

<tbody>
</tbody><colgroup><col><col span="6"></colgroup>

#### giles007

##### New Member
Thanks Trevor! this is great. Is it very tricky to create a formula without a helper column?

#### Trevor G

##### Well-known Member
Try this using SUMPRODUCT and Date formula Date is used as year then month then number

Excel Workbook
ABCD
1DateSale ValueMonthTotal
215-Oct-1391.5Oct161.5
319-Oct-1370Dec195.5
404-Dec-1383.2Jan90
513-Dec-1350
617-Dec-1362.3
701-Jan-1390
Sheet1

Replies
5
Views
117
Replies
11
Views
474
Replies
2
Views
197
Replies
3
Views
124
Replies
5
Views
234

1,195,939
Messages
6,012,425
Members
441,698
Latest member
DaveTeo

### 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.

### Which adblocker are you using?

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

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