Macro Code to Select All Non Blank Cells
Sub NonBlankCells()
'Macro Code to Select All Non Blank Cells
On Error Resume Next
Union(Cells.SpecialCells(xlCellTypeFormulas, 23), Cells.SpecialCells(xlCellTypeConstants, 23)).Select
If Err.Number <> 0 Then
Cells.SpecialCells(xlCellTypeFormulas, 23).Select
Else
Exit Sub
End If
If Err.Number <> 0 Then
Cells.SpecialCells(xlCellTypeConstants, 23).Select
Else
Exit Sub
End If
On Error GoTo 0
End Sub
'Macro Code to Select All Non Blank Cells
On Error Resume Next
Union(Cells.SpecialCells(xlCellTypeFormulas, 23), Cells.SpecialCells(xlCellTypeConstants, 23)).Select
If Err.Number <> 0 Then
Cells.SpecialCells(xlCellTypeFormulas, 23).Select
Else
Exit Sub
End If
If Err.Number <> 0 Then
Cells.SpecialCells(xlCellTypeConstants, 23).Select
Else
Exit Sub
End If
On Error GoTo 0
End Sub
Comments
Post a Comment