ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Break Total (SUM question) (https://www.excelbanter.com/excel-worksheet-functions/450385-break-total-sum-question.html)

[email protected]

Break Total (SUM question)
 
Dear all,

I what to sum up some value regarding different subjects, as below. Could anyone give solutions please?

Original:
Invoice No. Item Code Amount
I0001 A3823 $100
I0001 A4144 $100
I0001 A5344 $150
I0002 R6534 $200
I0002 R7521 $60
I0003 A8641 $70
I0004 A1130 $340
I0004 R8942 $600
I0004 R2135 $70
I0004 A4556 $70
I0004 A6683 $60
I0005 R4421 $210
I0005 R4462 $100

Expected:
Invoice No. Item Code Amount Total
I0001 A3823 $100 $350
I0001 A4144 $100
I0001 A5344 $150
I0002 R6534 $200 $260
I0002 R7521 $60
I0003 A8641 $70 $70
I0004 A1130 $340 $1140
I0004 R8942 $600
I0004 R2135 $70
I0004 A4556 $70
I0004 A6683 $60
I0005 R4421 $210 $310
I0005 R4462 $100


Claus Busch

Break Total (SUM question)
 
Hi,

Am Wed, 22 Oct 2014 11:19:12 -0700 (PDT) schrieb :

Invoice No. Item Code Amount Total
I0001 A3823 $100 $350
I0001 A4144 $100
I0001 A5344 $150
I0002 R6534 $200 $260
I0002 R7521 $60
I0003 A8641 $70 $70
I0004 A1130 $340 $1140
I0004 R8942 $600
I0004 R2135 $70
I0004 A4556 $70
I0004 A6683 $60
I0005 R4421 $210 $310
I0005 R4462 $100


in D2 try:
=IF(COUNTIF($A$2:$A2,A2)=1,SUMIF($A$2:$A$100,A2,$C $2:$C$100),"")
and copy down


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional

SalientAnimal

You could also try using SUMIFS for your solution.
E.G =SUMIFS(C2:C13,A2:A13,A2)
The above formula is assuming that Range A2:A13 is your Invoice Number. Range C2:C13 is values.

GS[_2_]

Complex Filtering Formula
 
I'm curious why you wouldn't do this with your data (or recordset)
*before* dumping it into a worksheet!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




All times are GMT +1. The time now is 07:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com