Hi kalak, I've discovered my mistake, see screen shot from my test sheet;
Testr_screenshot.jpg
The first array of 2's with active cell A1 works great, however as you move horizontally away from A1 the start of the diagonal is offset from the active cell by the same amount and of course when I tested it before my active cell was CQ so the deleted cells were way off screen....the formula for my array is "=IF($A6=0,0,IF($H6=$B$7,IF($D$7=4,$D$7,0),0))" copied across and down for 994 cells. Hope this helps.