• 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.

Array, Group, Sub-total?

dgm511

New Member
Hi

I'm struggling to find the correct method for totalling many rows of data where the common link is a reference number. Example attached from a list of over 10,000 rows. Each reference number will have between 1 and 12 values and I'm looking for a quick way to sum the totals by reference number and display for example <Ref>000015 <Total>995.41.

Any help pointing me in the right direction would be gratefully received.
Many thanks
 

Attachments

  • Array,Group,Subtotal.xlsx
    9.2 KB · Views: 6
for the ref use
=UNIQUE(A:.A)
for the sum
=SUMIF(A:.A,G3,B:.B)

OR a pivot table
Various other methods

what version of excel are you using
 

Attachments

  • Array,Group,Subtotal-ETAF.xlsx
    10.9 KB · Views: 0
in 1 cell you can put

=HSTACK(UNIQUE(A:.A),SUMIFS(B:.B,A:.A,UNIQUE(A:.A)))
 

Attachments

  • Array,Group,Subtotal-ETAF-1.xlsx
    11 KB · Views: 0
and SUMIFS
and also the .
this removes empty cells - like trimrange

i came across the video , on my subscription , which explains the .DOT
B:.B


its worth watching the whole video - BUT the text has shortcuts to parts of the video , covering various info

5:59 Dot operator in Excel (Trim Refs)
 
Alternatively you can use Power Query or the GroupBy Function. Both are demonstrated in the attached file.
 

Attachments

  • Array,Group,Subtotal.xlsx
    18.1 KB · Views: 0
Back
Top