Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata
Public Sub ForEachRng()

Dim rcell As Range, rng As Range

Set rng = Application.ActiveSheet.Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Offset(1).Row)

For Each rcell In rng.Cells
 If Not IsError(rcell.Value) Then
  If rcell.Value <> "" Then
   If IsNumeric(rcell.Value) = True Then
    MsgBox "It's a Number!"
   End If
  End If
 End If
Next rcell

End Sub
  • No labels