O
ogopogo5
I was helped by Chip in getting a code that will find an alphanumeric
across columns. Having columns C5 to F5 with numbers or texts and have
G5 with a alphanumeric.
It is possible to rewrite the following code without the loop code?
'This code is to find an alphanumeric to the right column
Sub AAA()
Dim R As Range
Set R = Range("C1") '<<< SET TO YOUR CELL
Do Until False
If Len(R.Text) > 0 Then
If IsNumeric(R.Text) = False Then
Exit Do
Else
If R.Column < R.Worksheet.columns.Count Then
Set R = R(1, 2)
Else
Set R = Nothing
Exit Do
End If
End If
Else
If R.Column < R.Worksheet.columns.Count Then
Set R = R(1, 2)
Else
Set R = Nothing
Exit Do
End If
End If
Loop
R.Select
End Sub
Ogopogo5
*** Sent via Developersdex http://www.developersdex.com ***
across columns. Having columns C5 to F5 with numbers or texts and have
G5 with a alphanumeric.
It is possible to rewrite the following code without the loop code?
'This code is to find an alphanumeric to the right column
Sub AAA()
Dim R As Range
Set R = Range("C1") '<<< SET TO YOUR CELL
Do Until False
If Len(R.Text) > 0 Then
If IsNumeric(R.Text) = False Then
Exit Do
Else
If R.Column < R.Worksheet.columns.Count Then
Set R = R(1, 2)
Else
Set R = Nothing
Exit Do
End If
End If
Else
If R.Column < R.Worksheet.columns.Count Then
Set R = R(1, 2)
Else
Set R = Nothing
Exit Do
End If
End If
Loop
R.Select
End Sub
Ogopogo5
*** Sent via Developersdex http://www.developersdex.com ***