Thanks for posting your solution!
Since you are starting down the slope with SumIF, there are times the SumProduct will be needed. Alternatively, a "helper" column could be created.
However, if the datasets are huge (e.g. 30K rows) with multiple columns, this can overwhelm the processor.
Just...