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
Thanks to all. Followed instructions and it works great.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.