Combination of formula - SUMIF/IF and colour count

Kate Smith
Occasional Visitor

So I'm trying to combine a colour count formula with another, I got the colour count formula from here; https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_win10/how-can-i-use-sumif-with...


I'd like to combine it with a SUMIF or IF formula, to say if something is one one column, then look for the colours and count what it in the cells.


So the colour count formula that works is; =SUMBYCOLOR('Cohort 1'!O:O,10,FALSE)

A SUMIF that also works is; =SUMIF('Cohort 1'!D:D, "Medical Physics", 'Cohort 1'!O:O)


Essentially I'm trying to group together costs for certain programmes in certain academic years. The programme name is in a column, the fee is in the cell of a different column and the academic year is signified by colour.


Open to any suggestions on other ways to do it as well. The only other way I thought was to do an IF AND – IF it’s Medical Physics AND the colour is X, but I can’t find a way of including the colour is X (I’ve used the Color Palette).