'Deal price at google sheets

I have a data of orders where there can be multiple products per one order. I struggle to automatically compute the total order price. Didn't find any formula for it. There is what I mean: table example

In the last column I want to see the sum of product prices with the same order number.



Solution 1:[1]

To avoid getting multiple duplicate values in Total Price column (D). enter image description here

My suggestion is to add another sheet to display Total Price by order number.

If you add Sheet2 and put the following formulas inside:

  1. in cell A1 put this formula
    ={"Order Number";UNIQUE(Sheet1!A2:A)}
    to look in Sheet1 and get only unique order numbers.
  2. in cell B1 put this formula
    ={"Total Price";ARRAYFORMULA(if(A2:A="","",SUMIF(Sheet1!A2:A, A2:A,Sheet1!C2:C)))}
    to calculate for each unique Order Number the total sum of all product prices.

You will get this clean table showing you the total price for each order number: enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Elad Ratson