Totalling costs based on date column

rgreig

New Member
Joined
Jul 26, 2009
Messages
2
Hello, new here.
I am not sure if this is possible but I thought it was worth asking.

I have a spreadsheet with items and costs limited, as well as the date of the expense.

<table style="border-collapse: collapse; width: 195pt;" border="0" cellpadding="0" cellspacing="0" width="259"><col style="width: 17pt;" width="22"> <col style="width: 81pt;" width="108"> <col style="width: 37pt;" width="49"> <col style="width: 60pt;" width="80"> <tbody><tr style="height: 15pt;" height="20"> <td colspan="4" class="xl69" style="height: 15pt; width: 195pt;" align="center" height="20" width="259">Costs</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl68" style="height: 15pt;" height="20">
</td> <td class="xl67">Item</td> <td class="xl67">Cost</td> <td class="xl66">Date</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl70" style="height: 15pt;" height="20">1</td> <td>Item1</td> <td class="xl71">£5</td> <td class="xl65" align="right">01/08/2009</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl70" style="height: 15pt;" height="20">2</td> <td>Item2</td> <td class="xl71">£1</td> <td class="xl65" align="right">01/09/2009</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl70" style="height: 15pt;" height="20">3</td> <td>Item3</td> <td class="xl71">£2</td> <td class="xl65" align="right">02/09/2008</td> </tr> </tbody></table>
What I am trying to do now:
I would like the months of the year listed, and have some excel magic find costs for that month and total them.

For example, for the month of September, I would like Excel to recognise the items purchased in September (2 and 3) from the date column and total those costs, which would be £3.

I hope I am being clear and I would appreciate any help someone could give me.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi There

Welcome to the Board

Sounds like you need help from our good friend the Pivot Table

Highlight your data and goto Data>>Pivot Table>>Finish

Drag date to Row Field and drag cost to value field (you may need to right click and select Sum as I think the default is Count)

Now right click the date column and select Group then highlight month.

That's you I reckon 20-30 seconds tops
 
Upvote 0
try this
Excel Workbook
ABCDEFG
1ItemCostDate
21Item1501-Aug-2009Sep-093
32Item2101-Sep-2009
43Item3202-Sep-2009
Sheet1
Cell Formulas
RangeFormula
G2=SUMPRODUCT(--(TEXT($D$2:$D$4,"mmm-yy")=TEXT(F2,"mmm-yy")),C2:C4)
 
Upvote 0
Fantastic. Thanks for your very prompt reply.

Edit: Just noticed second reply. That also works! Thank you both of you :)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,823
Members
449,470
Latest member
Subhash Chand

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