I have written some VBA code that allows me to filter a spreadsheet to the data I require . I am now looking to add all of the values in a column that have the same unique ID. For example, if there are 4 rows with the same ID of "123456", I want to add up all of their corresponding values to a "sum" row. Any tips on how i might tackle this?
I also won't be able to simply apply a SumIF funciton, as the filter updates with either more or less rows and such.
I also won't be able to simply apply a SumIF funciton, as the filter updates with either more or less rows and such.
ID | Values |
123456 | 10 |
123456 | 12 |
123456 | 14 |
123456 | 16 |
Sum | 52 |
987654 | 20 |
987654 | 22 |
Sum | 42 |
456789 | 30 |
456789 | 50 |
456789 | 10 |
Sum | 90 |