Does the real life matrix contain Blanks or Nulls ? The latter is likely if the table is populated via Formulae...
If you find what you believe to be a blank cell test with:
=COUNTBLANK(xy) where xy is cell reference of expected blank
If answer is 0 then it's a Null ("") .. if 1 it's a blank and I would not expect the code to bug.
You can handle Nulls easily enough if the values are result of formulae using an approach such as:
Public Sub FillBlanks()
Sheets("temp").Range(Cells(3, "B"), Cells.Find("*", SearchDirection:=xlPrevious)).SpecialCells(xlCellTypeFormulas,xlTextValues).Value = 99999
End Sub
A Null is a Text value (non-numeric) so can be identified relatively easily if the other results are all numeric.
Bookmarks