I have a spreadsheet which logs the duration an employee spends in a city. An employee can visit a city multiple times like Peter in this example.
City Person Days
London Tom 6
London Peter 2
Brussels Josef 1
London Peter 8
Prague Ryan 5
Oslo Peter 4
I want to count the total number of days an employee spends in a city. The order should stay the same. So for every unique city-employee pair, all further occurrences get deleted and just the days' count gets summed up. The code should work as well if there are additional columns.
City Person Days
London Tom 6
London Peter 10
Brussels Josef 1
Prague Ryan 5
Oslo Peter 4