Home > database >  Deal price at google sheets
Deal price at google sheets

Time:02-04

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: enter image description here

Note:

At time of writing Sumifs can't be used this way so you can't add an additional condition to the formula.

CodePudding user response:

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

  •  Tags:  
  • Related