I have an Excel worksheet with several columns, where 3 of them form a "unique key".
If I have fruits in column A (Apple, Banana, Orange), some name in column B (John, Peter) and something like Yes/No in column C, I want to be able to get sums of values from rows where the values in these columns are the same.
For instance, the sum of all the values in column D for rows where columns A, B and C are Apple,John,Yes.
Sorry for the confusing text, but I don't know how to express my question more clearly. I've never done anything in VBA so I'm a bit lost here...
Here's an example of the expected result.
It is also possible to go to the data tab -> remove duplicates. You can then select which columns you would like to compare in removing the dulicates.
No Formulas/VBA required. Use a Pivot table for a summary of all combinations. See screenshot
If you still want VBA then that can also be done :)
EDIT
I quickly wrote this