Forum Discussion

JGA74's avatar
JGA74
Copper Contributor
Aug 29, 2022
Solved

The sum os the weight of the same shipment.

Good morning all,

Please i need help. How can i make the sum of different values of the same reference number?

I have an excel line with information about each package. But I need to have the sum of the packages' weight  per shipment (customer order).

Client order number

Ship to Country

Weight (KG)

1234

NL

1.034

1234

NL

2

1235

DE

0.356

1236

BE

0.25

1237

LU

9

1235

DE

1.545

1238

AT

2.93

1236

BE

1.205

1236

BE

2.96

1239

NL

1

1210

FI

5

1237

LU

6

 

Thanks in advance for your help.

 

 

  • JGA74 Try below dynamic array formula to spill results automatically. Download the attached file.

    =CHOOSE({1,2},UNIQUE(A2:A13),SUMIFS(C2:C13,A2:A13,UNIQUE(A2:A13)))

    If you do not have Microsoft365 then try below formula.

    =SUMIFS($C$2:$C$13,$A$2:$A$13,H2)

     

     

  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor

    JGA74 Purpose of this complicated formula is to find sum of unique clients then show dynamically so that when new clients entered, formula can spill results automatically by a single cell formula.

    By SUMIFS(C2:C13,A2:A13,UNIQUE(A2:A13)) we find sum of unique values. And this UNIQUE(A2:A13) will list unique values of client everyone knows. By CHOOSE() function we have aggregate those clients unique values and their sums. CHOOSE({1,2}... will dynamically select those two columns will return as output. I will suggest to search on web for details about these formulas.

    • JGA74's avatar
      JGA74
      Copper Contributor
      Thanks Harun24HR.

      But one more question, whats means {1,2} on the Dynamic array approach formula?
      The Dynamic formula will be better for me, Because i receive new DATA every day.
  • Harun24HR's avatar
    Harun24HR
    Bronze Contributor

    JGA74 Try below dynamic array formula to spill results automatically. Download the attached file.

    =CHOOSE({1,2},UNIQUE(A2:A13),SUMIFS(C2:C13,A2:A13,UNIQUE(A2:A13)))

    If you do not have Microsoft365 then try below formula.

    =SUMIFS($C$2:$C$13,$A$2:$A$13,H2)

     

     

    • JGA74's avatar
      JGA74
      Copper Contributor
      Harun24HR, Hello,
      I would like to understand the formula
      =CHOOSE({1,2},UNIQUE(A2:A13),SUMIFS(C2:C13,A2:A13,UNIQUE(A2:A13)))

      Please, can you explain this formula to me?
      My DATA(excel sheet) has almost 35.250 rows. I tried this formula, but the result that i got was the "Client order number" instead the total of KG.
      HansVogelaar maybe you can also explain the formula to me?
      Thanks in advance,
      • JGA74 

        I'll leave it to Harun24HR to explain that formula. To be honest, it seems overkill to me - the SUMIFS formula is shorter, easier and works in all recent versions of Excel.

    • JGA74's avatar
      JGA74
      Copper Contributor
      THANKS A LOT Harun24HR!!!!!
      I used the SUMIFS and it worked!!! Thank you Thank You Thank you!!

Resources