Sub Test()
MyRanges = Array("D3:D12", "H3:H12", "L3:L12")
For Count = 0 To UBound(MyRanges)
With Range(MyRanges(Count))
'Is this a cell or a range?
If InStr(1, MyRanges(Count), ":") = 0 Then
'This is a Single Cell
SR = .Row
SC = .Column
LR = SR
LC = SC
Else
'This is a range
SR = .Row
SC = .Column
LR = .Rows(UBound(.Value)).Row
LC = .Columns(UBound(.Value, 2)).Column
End If
End With
For CCount = SC To LC
For RCount = SR To LR
If IsNumeric(Cells(RCount, CCount).Value) Then
If Cells(RCount, CCount).Value >= 1 And Cells(RCount, CCount).Value <= 10 And InStr(1, Cells(RCount, CCount + 1).Value, "-") > 0 And IsNumeric(Cells(RCount, CCount + 2).Value) Then
'If You get here then there is a match
'I do not understand what you want done here.
End If
End If
Next
Next
Next
End Sub
Bookmarks