• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Sum of irregular amount of numbers

oktavina

New Member
Hi everyone, I'm new here and have basic knowledge of excel, my question will probably be a piece of cake to some of you guys but is monstrous to me since I will have to sum each ID's one by one without a formula. So here's my question:

[pre]
Code:
A                      ID              	     SUM
756,000
737,835
83,700
124,831
12,156                BSB001                        ?
327,927
185,568
27,900
41,610
8,104                 BSB001                        ?
809,058
142,516
192,568
101,566               BPS001                        ?
8,331,892
259,309
0                     BOR001                        ?
1,925,679
151,500               BPS003                        ?
1,925,679
76,548                BPS002                        ?
1,925,679
68,795                BPS001                        ?
[/pre]
I want to know the sum from column A of each ID's (1st no in the row after the previous ID up to the last no adjacent to the next ID)

I hope I get my question clear. Thank you so much.
 
Hi ,


I am not sure I have understood you correctly , but try this :


=IF(B2="","",SUM($A$2:A2)-SUM($C$1:C1))


I have assumed your numbers are in column A , IDs in column B , and the totals in column C ; row 1 is a header row. Put the above formula in C2 , and copy down.


Narayan
 
Hi oktavina,


with your data in A1:B24, try this:


=IF(ISBLANK(B2)=TRUE,"",SUM(INDIRECT("A"&SMALL(IF(ISBLANK($B$1:$B$24)=FALSE,ROW($B$1:$B$24)),COUNTA($B$1:B1))+1&":"&"A"&SMALL(IF(ISBLANK($B$1:$B$24)=FALSE,ROW($B$1:$B$24)),COUNTA($B$1:B1)+1))))


Press Ctrl+Shift+Enter and drag down.


Regards,

Faseeh
 
Hi everyone! Thank you so much for your answers

Narayank, your formula totally works,so Thank You!

Faseeh, I tried yours but it returns #NUM, probably it's because I'm using Mac and the Ctrl+Shift+Enter didn't work

But thank you very much for your help guys =D
 
Back
Top