You may like this better.
Sub replacetickers()
For Each mc In Sheets("Sheet1").Range("f1:f6")'adjust to suit
With Worksheets("sheet2").Range("a1:a500")
Set c = .Find(mc, LookIn:=xlValues, LookAt:=xlWhole, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
If Not c Is Nothing Then
firstAddress = c.Address
Do
mc.Value = c.Offset(, 1)
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Next mc
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"straws" wrote in message
...
Please help!
I need to replace "Ticker Symbols" with the full name. I have the
tickers in column F sheet 1, and I have the table in sheet 2 with the
tickers in column A and the full name in column B. I have been using
vlookup formula, but now I need it in VBA. It should be simple, but I
am struggling. I just need it to replace the ticker in F sheet 1 with
the full name in sheet 2 B. The kicker is if the ticker in not in the
column A of sheet 2, then I need it to ignore it and just leave the
ticker as is. This can't be difficult - but I am having a hard time.
Any code would be greatly appreciated! - Thanks