Sure is; you have two simple options -
1. take a look at the Find function; this is directly out of the online help:
With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = 5
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
Obviously, you'd just make the "2" the value of A2 and "5" the value of B2 in your example.
2. use the Replace function:
Cells.Replace What:="asdf", Replacement:="qwerty", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Hope that helps.
Bookmarks