SUMIF row is equal to test value and row below is '-'
Hello,
I have a numbers spreadsheet where one column has a list of names that are mixed up with repeats, and another column that has a list of profit values relating to that name.
Now, I want to determine the total profit made from each of the names so I can see the total profit per name.
That part is easy, I just have a SUMIF function that checks if the name matches a specific name and then adds that profit to the total.
The problem I am having is that in the names column, sometimes I will have a name and then the next few rows are just '-' indicating that they are the same name. The SUMIF function I use does not take into account these values because they obviously don't match the name of interest.
So my question is: Is it possible to create a function that will check for a matching name, and then if the next row is '-', then add that value to the total as well. This has to work with multiple rows of '-' following a name.
The following screenshot is an example of what I mean since I realise that this may not make much sense.
So in this case, Jess's total profit would be = 5 + 35 + 15 + 5 + 15 = 75
and Gill's profit = 30 + 30 + 20 + 40 = 120
I hope I've made this clear enough. Thank you in advance!
Oscar