# Sum values based on date

#### KPAW

##### New Member
I have a spreadsheet where I tack daily expenditure. On a given day I could spend on several items. At the end of that day I want the total of that day's spending in the last row that bear the same date.

For example in the table below, I have the date, amount and total columns.

I want to be able to have a formula in the totals column that look at the dates in the date column, and where the date in a row is different from the date in the row immediately below, sum the values of amounts in rows with the same date and give the total in the last row with the same date.
 Date Amount Total 10-Mar-12 100 10-Mar-12 112 10-Mar-12 124 10-Mar-12 136 10-Mar-12 220 692 11-Mar-12 232 11-Mar-12 244 476 13-Mar-12 256 13-Mar-12 268 524

<tbody>
</tbody>

I would be grateful for any assistance to find a solution.

### Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Maybe with a pivot table.
Excel Workbook
FGHIJ
2Gegevens
3dateSum amountcount amountAvarage amountSum total
410-Mar-126925138,4692
511-Mar-124762238476
613-Mar-125242262524
7Eindtotaal169291881692

I have a spreadsheet where I tack daily expenditure. On a given day I could spend on several items. At the end of that day I want the total of that day's spending in the last row that bear the same date.

For example in the table below, I have the date, amount and total columns.

I want to be able to have a formula in the totals column that look at the dates in the date column, and where the date in a row is different from the date in the row immediately below, sum the values of amounts in rows with the same date and give the total in the last row with the same date.
 Date Amount Total 10-Mar-12 100 10-Mar-12 112 10-Mar-12 124 10-Mar-12 136 10-Mar-12 220 692 11-Mar-12 232 11-Mar-12 244 476 13-Mar-12 256 13-Mar-12 268 524

<tbody>
</tbody>

I would be grateful for any assistance to find a solution.

C2, copied down:

=IF(A2<>A3,SUMIF(\$A\$2:A2,A2,\$B\$2:B2),"")

I have a spreadsheet where I tack daily expenditure. On a given day I could spend on several items. At the end of that day I want the total of that day's spending in the last row that bear the same date.

For example in the table below, I have the date, amount and total columns.

I want to be able to have a formula in the totals column that look at the dates in the date column, and where the date in a row is different from the date in the row immediately below, sum the values of amounts in rows with the same date and give the total in the last row with the same date.
 Date Amount Total 10-Mar-12 100 10-Mar-12 112 10-Mar-12 124 10-Mar-12 136 10-Mar-12 220 692 11-Mar-12 232 11-Mar-12 244 476 13-Mar-12 256 13-Mar-12 268 524

<TBODY>
</TBODY>

I would be grateful for any assistance to find a solution.
Try this...

Enter this formula in C2:

=IF(A2=A3,"",B2)

Enter this formula in C3 and copy down as needed:

=IF(A3=A4,"",SUMIF(A\$2:A3,A3,B\$2:B3))

Thanks very much for the assistance.

Replies
3
Views
207
Replies
3
Views
224
Replies
3
Views
164
Replies
3
Views
175
Replies
2
Views
241

1,211,696
Messages
6,103,357
Members
447,861
Latest member
LllopezXC

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