Forum Discussion
SUMIF function error
So a few things:
"SPILL#" error is because the formula you wrote is returning more than 1 value (e.g. an array of answers) but those additional results would overlap one or more cells on the sheet that you already have something entered (even if that something is a space/blank)
SUMIF format uses a range to CHECK, the CONDITION that should be used to do the check, and then an optional range to do the sum on (otherwise it will some the range being checked). Your formula is giving the range to sum as the check range, the conditional is incorrectly formatted, and for the sum range you have where you want the output, which is also not going to work.
Here is the formula you want:
=SUMIF(R5C7:R15C7,"<="&Max_Due_Date,R5C9:R15C9)
So if you want a breakdown of what your formula is doing:
the conditional you have will return an array of results each being true or false. This array of true and false are then, one by one, being tested against the whole CHECK range and then the sum of the cells starting at R18C12 are being summed when a match is found. SO, if the first date comparison is TRUE then is looks for all the TRUE values in C9 and then will sum all the corresponding values in C12 (but shifted down to R18). Then it will repeat with the 2nd, 3rd, etc.. result of the conditional results. That is why you have a SPILL error because it is trying to return a range of results for all of those conditional results. Hope that helps.
- VelcroJP3Nov 03, 2025Copper Contributor
I had already corrected the formula, but without your intermediate " and &. Both my version and yours return "0"
The only difference between our tow versions are the inclusion of unnecessary but innocuous internal "()" pairs around the ranges. Any suggestions? (In the table in my previous correction, the final "20 Nov 2025" is the named item "Max_Due_Date", and Column 8 was hidden.)