Please fill in the blank ("___") below with a function name or tell me there is no such function:
SUM(range) is to SUMIF(range1,criteria,range2) as COUNT(range) is to ___(range1,criteria,range2)
COUNTIF would seem to be the logical answer but I don't think it supports the third parameter and thus it is not analogous to COUNT.
I'm wanting to use it as follows:
=IF(___(A$3:A7,A7,Q$3:Q7)=___(A$3:A7,A7,R$3:R7),SUM(A$3:A7,A7,R$3:R7)-SUM(A$3:A7,A7,Q$3:Q7),"Error 4")
Where Error 4 means that the start miles in Q$3:Q7 and end miles in R$3:R7 are not properly paired and thus the miles driven on date A7 cannot be determined.
I realize that I can add two columns (e.g. AA and AB) such that the content of their cells (AA$3:AA7 and AB$3:AB7) is 1 if the corresponding cell in column Q or R respectively contains a number (otherwise it's a zero length string). Then I could use SUMIF(…,AA$3:AA7)=SUMIF(…,AB$3:AB7) as the condition within the IF(condition,true,false) construct in my formula.