Hello
I am working on a problem where I have to search the string in column B and if it contains a value say "C21" I want column C to input "Century 21" Here is the code I have so far below. Its not adding the values to column C for me any thoughs on this?
Sub BrandNames()
Dim R As Integer
R = 2
Do While Not (IsEmpty(Cells(R, 2)))
If InStr(1, Worksheets("REbrokerList").Cells(R, 2).Value, "C-21", vbTextCompare) Or _
InStr(1, Worksheets("REbrokerList").Cells(R, 2).Value, "C21", vbTextCompare) Or _
InStr(1, Worksheets("REbrokerList").Cells(R, 2).Value, "Century", vbTextCompare) <> 0 Then
Select Case Cells(R, 2)
Case "C21"
Cells(R, 3) = "Century 21"
Case "C-21"
Cells(R, 3) = "Century 21"
Case "Century"
Cells(R, 3) = "Century 21"
End Select
End If
R = R + 1
Loop
Moderators Note: Please follow forum rules and use code tags. Added for you this time, but please use them in the future…Thanks.
Bookmarks