Hi All,
I am trying to write a VBA that clear contents if cells contain #N/A from a Range of cells? The Below VBA ran without error but did not clear the cells with #N/A.
Dim arange As Range
Range("A5:F29").Select
Application.CutCopyMode = False
Selection.Copy
Range("A38").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Set arange = Range("A38:F62")
For Each Cell In arange
If IsError(arange) Then
arange.ClearContents
End If
Next
End Sub
Bookmarks