Sub Rows_Wt_Number_Formula()
Dim oNOCells
On Error GoTo Err_Hdlr
Set oNOCells = Range("B1:B5").Cells.SpecialCells(xlCellTypeFormulas, xlNumbers)
For Each ocell In oNOCells
MsgBox ocell.Address
Next ocell
Err_Hdlr:
If Err <> 0 Then
If Err.Description = "No cells were found." Then
MsgBox "No cells with number in forumula found"
End If
Err.Clear
End If
End Sub
If Type is either xlCellTypeConstants or xlCellTypeFormulas, this argument is used to determine which types of cells to include in the result. These values can be added together to return more than one type. The default is to select all constants or formulas, no matter what the type. Can be one of the following XlSpecialCellsValue constants:
No comments:
Post a Comment