Formula errors solution

A

Ashley Frank

Dim CurrentCell As Object, NextCell As Object
ActiveWorkbook.Sheets("Sheet1").Select
Set CurrentCell = Range("A7")
Do Until IsEmpty(CurrentCell)
Set NextCell = CurrentCell.Offset(1, 0)
CurrentCell.EntireRow.Select
For Each CELL In Selection
If IsError(CELL) Then
CELL.ClearContents
Else
End If
Next
Set CurrentCell = NextCell
Loo
 
B

Bernie Deitrick

Ashley,

No need to loop:

Sub Macro1()
On Error Resume Next
Range("A7:IV65536").SpecialCells(xlCellTypeFormulas, 16).ClearContents
Range("A7:IV65536").SpecialCells(xlCellTypeConstants, 16).ClearContents
End Sub

HTH,
Bernie
MS Excel MVP


"Ashley Frank" <[email protected]>
wrote in message
news:[email protected]...
 
A

Ashley Frank

Bernie,

A neat solution - far better. I only posted this I had this problem
last year and thought that it may be useful

Thanks

ashley
 

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.

Ask a Question

Top