I have a worsheet labeled "test". In column A1 through A100 I have codes such as A1=00100, A2=0230, etc. I am looking to use the select case method and a loop to find the various corresponding descriptions that go with the code. So A1 = original code as entered and B1 = description found using the below select case.
Problem: I am not able to get the loop and select case to work together.
Any help would be appreciated...
Problem: I am not able to get the loop and select case to work together.
Any help would be appreciated...
Code:
Sub Search()
'
' Objective: to find code one by one and align code with corresponding parent ID
' Example: code 00102 = ABC, cod 00349 = DEF, code 00500 = "Go Look"
Dim rRange As Range
Dim rCell As Range
Set rRange = Sheets("test").Range("A1", Range("A65536").End(xlUp))
For Each rCell In rRange
Select Case rCell
Case 100 To 222
rCell.Offset(1, 1).Select = "ABC"
Case 300 To 352
rCell.Offset(1, 1).Select = "DEF"
Case Else
rCell.Offset(1, 1).Select = "Go Look"
End Select
Next rCell
End Sub