Originally Posted by

**Rewcifer**
Yes, assume that B1 and B2 are in the Matrix tab. Unsure why Excel is doing that.

If so, care to explain what the first IF formula is intended to do, which is made readable by removing the sheet name Matrix, reducing **Gap Analysis data Pull** to just **Gap**, and replacing the star syntax with the equivalent comma syntax?

Code:

**=IF($B$1="Total",
SUMPRODUCT(--(Gap!$J$2:$J$362=$B$2),--(Gap$D$2:$D$362>$A6),(Gap!$D$2:$D$362<=$B6),--(Gap!$D$2:$D$362<>""))/
SUMPRODUCT(--(Gap!$A$2:$A$362<>""),--(Gap!$D$2:$D$362<>"")),
SUMPRODUCT(--(Gap!$J$2:$J$362=$B$2),--(Gap!$I$2:$I$362=$B$1),--(Gap!$D$2:$D$362>$A6),--(Gap!$D$2:$D$362<=$B6),--(Gap!$D$2:$D$362<>""))/
SUMPRODUCT(--(Gap!$A$2:$A$362<>""),--(Gap!$D$2:$D$362<>"")))
**

## Like this thread? Share it with others