I would like to achieve the following in Excel:
The formula should sum all the values of a column in case the values in the reference column are duplicates, and if there are duplicates, then only the value of the second duplicate should be summed:
Column A (reference IDs)
A1: abc
A2: ade
A3: afe
A4: age
A5: age
Column B (values for Sum)
B1: 2
B2: 3
B3: 4
B4: 5
B5: 800
The result of the formula should be: 2 + 3 + 4 + 800 = 809
and not 2 + 3 + 4 + 5 = 14
.
This is because the references in cell A4
and A5
are duplicates, and only the second duplicate in the reference column should be used.