excel - Get a Sum of ONLY duplicate values -
If a method of using a safe is combined with counting?
For example if I have
not a transaction. Number to toce 1 1 | 9 2 6 3. 3 4 | 4 | 4 5 6 6 | 4 7 | 7 | 9 8. 7 9. 4 10. 10 | 1 11 | 3 12 6
My result will be: 23
Because value 1,4,7, 10
has been duplicated, so I need the amount of NumberToSum
in this case
Ideally I If somethings like but Note: is sorted by not data as it appears in my example. If I want to do it in VBA, then there may be a quick way: Then use the supporting column, but I hope there is a simple formula in the same cell Can do. I'm really searching for a quick formula that can be inserted into a cell without the need for any additional calculations. = SumIf (A: A, Calculation> > 1.
= SUMIF (A: A, COUNT (A: A)> 1, B: B)
does not work.
sub rim () dim range as the RNG dim dim rng2 range dim sum Set long in rng = [A2: A17] for each RNG 2 in RGN if worksheet function. Contraag (Range ("A1: A17"), RNG 2. value) & gt; 1 then yoga = yoga + rng2.offset (0, 1). If there is one more option I have tried, add a formula to the formula
= IF (COUNTIF (A: A, A2)>
= SUMPRODUCT (1 * (COUNTIF (A1: A100, A) 1: A100)> (B1: B100))
or for the whole column (slightly slower):
= SUMPRODUCT (1 * (COUNTIF (A: A, A: A)> 1), (B: B))
Comments
Post a Comment