I have 2 columns in a Google Sheet
C = order number
N = shipping cost
If a customer order has more than one line item, the order number & shipping cost are listed twice — but I just need to sum the "unique" shipping cost, ignoring the duplicate line entries
| COLUMN C | COLUMN N |
|---|---|
| Order1 | £10.00 |
| Order1 | £10.00 |
| Order1 | £10.00 |
| Order2 | £5.00 |
| Order3 | £5.00 |
My expected result from the sample above would be £20.00.
Order 1 was £10 postage, Order 2 was £5, Order 3 was £5.
I can get this to work using =UNIQUE(C3:C) in a helper column then doing VLOOKUP(N1, C3:N, 12, FALSE) — then summing that but I was hoping to have one formula in one cell (C1)
>Solution :
Here is a formula that should work for you:
=sum(iferror(arrayformula(VLOOKUP(unique($C$3:$C), $C$3:$N, 12, 0))))
You had all the pieces, they just needed to be put together.
Please let me know if you have any issues with this
