Sum unique values

creative999

Board Regular
Joined
Jul 7, 2021
Messages
85
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
Trying to do a sum of column B if col A = Finished (and where col c value is unique).
For example

'Finished' should = 350

Book3
ABC
1STATUSSELL PRICEREF
2START300RET5644403
3FINISHED200RET77600004
4FINISHED150RET5644403
5TBC200RET5644403
6FINISHED 200RET77600004
7FINISHED150RET5644403
8TBC200RET77600004
Sheet2
 
Unique is just that, a one of a kind, the distinct values are those you will get if you use the unique function on col C.
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Ok, there are no unique values and two distinct values. How does that make the Post any clearer when referencing that against Column A as requested by the OP.
 
Upvote 0
When there are duplicates in column C, will the corresponding values in B also be the same? So, B3 will be the same as B6 because the C columns are the same?
yes, which is why I only want to sum where col c has distinct value else I’ll be double counting
 
Upvote 0
What about this?

Book5
ABCDE
1STATUSSELL PRICEREF
2START300RET56444033350
3FINISHED200RET77600004
4FINISHED150RET5644403
5TBC200RET5644403
6FINISHED200RET77600004
7FINISHED150RET5644403
8TBC200RET77600004
9FINISHED1000RET9999
10FINISHED2000RET99990
11XXXX1000RET123456
12FINISHED1000RET9999
13FINISHED2000RET99990
Sheet1
Cell Formulas
RangeFormula
E2E2=SUM(INDEX(UNIQUE(FILTER(A2:C13,A2:A13="FINISHED")),,2))
 
Upvote 0
Found a problem with the formula. The actual data has additional columns between A-B and B-C (date / timestamp) which i didnt think were necessary to include here. In most cases the timestamp is the same for the REF and 'Finished' but there are some exceptions where its different and the calculation is picking this as unique and adding the SELL PRICE value to the final sum calculation. How can i ignore the timestamp?
 

Attachments

  • Untitled 7.jpg
    Untitled 7.jpg
    74.7 KB · Views: 4
Upvote 0
Example here:

unique example.xlsx
ABCDEFG
1STATUSSELL PRICEREF
2START1/4/22300RET56444033550
3FINISHED1/2/22200RET77600004
4FINISHED1/4/22150RET5644403
5TBC1/5/22200RET5644403
6FINISHED1/3/22200RET77600004this is being included in the formula
7FINISHED1/4/22150RET5644403
8TBC1/6/22200RET77600004
9FINISHED1/8/221000RET9999
10FINISHED1/8/222000RET99990
11XXXX1/1/221000RET123456
12FINISHED1/8/221000RET9999
13FINISHED1/8/222000RET99990
Sheet3
Cell Formulas
RangeFormula
G2G2=SUM(INDEX(UNIQUE(FILTER(A2:E13,A2:A13="FINISHED")),,3))
 
Upvote 0
Do you have any data in col D?
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,267
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top