The easiest way to exclude the rows from printing is to hide them. With the
desired sheet active, select Edit >> Go To >> Special. Select Formulas,
uncheck everything except Errors, and click OK. All the cells with formulas
returning #N/A (or any other error) should be selected. Select Format >> Rows
Here is the same procedure in a macro.
Sub HideErrorRows()
'Selects all cells with formulas reutrning an error
'on the active worksheet, then hides the rows containing
'those cells.
Selection.SpecialCells(xlCellTypeFormulas, 16).Select
Selection.EntireRow.Hidden = True
End Sub
Hope this helps,
Hutch