Here's a formula:
SUMPRODUCT((Sheet1!$D$2:$D$53736=1)*(Sheet1!$J$2:$J$53736=1)*(Sheet1!$N$2:$N$53736<=C5))
Columns D and J are just boolean 0 or 1. I tried the formula with those removed and it works fine. It's the last condition that appears to be causing problems. It's a date.
N2:N5376 on sheet one are dates and they are formatted as dates. C5 is also a date.
I cannot see or understand why I'm being returned #num?
SUMPRODUCT((Sheet1!$D$2:$D$53736=1)*(Sheet1!$J$2:$J$53736=1)*(Sheet1!$N$2:$N$53736<=C5))
Columns D and J are just boolean 0 or 1. I tried the formula with those removed and it works fine. It's the last condition that appears to be causing problems. It's a date.
N2:N5376 on sheet one are dates and they are formatted as dates. C5 is also a date.
I cannot see or understand why I'm being returned #num?