Subtotalling multiple data groups

redjay

New Member
Joined
May 9, 2008
Messages
46
Hi Guys<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
Wonder if any of you are able to help with this one. I have attached a JPG of what I have in mind.<o:p></o:p>
<o:p></o:p>
I have a simple sales worksheet showing Customer Name in Column A, Date of sale in Column B and Quantity in Column C. The data is sorted in that order.<o:p></o:p>
<o:p> </o:p>
I want some way of subtotalling the quantities by Name and Date. In other words, I want to be able to see how much each customer ordered on each date and for that value to be returned in Column D. Hopefully the attached image will make it clearer.

hrk27o.jpg
<o:p></o:p>

<o:p> </o:p>
I don’t think the Excel subtotals function would work for this and I don’t wish to use filters or pivot tables as I need all the data visible at the same time. Ideally I would like some code or a formula (or indeed an Excel function im not aware of!).<o:p></o:p>
<o:p> </o:p>
Many thanks <o:p></o:p>
 
Hi jrabi,

After re-reading the original post, and using the data provided this seems to work...

Excel Workbook
ABCDE
1NameDateQuantityTotal
2Jones01/01/20102 
3Jones01/01/20102
4Jones01/01/201026
5Jones01/08/20113
6Jones01/08/201136
7Smith01/01/20102
8Smith01/01/20102
9Smith01/01/201026
10Smith13/08/20103
11Smith13/08/20103
12Smith13/08/20103
13Smith13/08/20103
14Smith13/08/2010315
15Andrew14/05/20102
16Andrew14/05/20102
17Andrew14/05/201026
18Andrew03/06/20103
19Andrew03/06/20103
20Andrew03/06/201039
21Andrew05/05/20114
22Andrew05/05/20114
23Andrew05/05/2011412
Sheet1


But, I could be wrong, again :rofl:
If you think this formula is flawed, would you care to provide one so that I can see where I am going wrong?

Ak
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Yes an IF(And will work since it views col a and b and not just B as your original, one does not need the absolutes(see below) which makes it easier to migrate from WS to WS:

=IF(AND(A2=A3,B2=B3),"",SUMPRODUCT(--(A:A=A2),--(B:B=B2),C:C))
 
Upvote 0
Hi jrabi,

Thanks very much for putting me on the right track, much appreciated.
I'll save that formula for future reference.

Ak
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,896
Members
452,948
Latest member
Dupuhini

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