#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default VBA Vlookup

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default VBA Vlookup

Hi,

This would be easier to answer if we could see the worksheet Vlookup your
using.

Mike

"straws" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default VBA Vlookup

On Sep 23, 7:08*am, Mike H wrote:
Hi,

This would be easier to answer if we could see the worksheet Vlookup your
using.

Mike

"straws" wrote:
Please help!


I need to replace "Ticker Symbols" with the full name. *I have the
tickers in column D Raw!, and I have the table in OrderLegend! 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 D Raw! with
the full name in OrderLegend! 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


=IF(ISNA(VLOOKUP(D2,OrderLegend!A:B,2,0)),D2,(VLOO KUP(D2,OrderLegend!
A:B,2,0)))

D2 "Raw!" sheet is the ticker (that needs to be replaced with the full
name), OrderLegend! A:B is the ticker (A) and full name(B)

Thanks!!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default VBA Vlookup

Test the VLookup for an error and ignore it if there is an error. here is an
excerpt from one of my codes:

If IsError(Application.VLookup(Mystr, rng2, 4, 0)) = True Then
' do nothing
Else
c.Value = Application.VLookup(Mystr, rng2, 4, 0)
End If

Mike F
"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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default VBA Vlookup

On Sep 23, 7:51*am, "Mike Fogleman" wrote:
Test the VLookup for an error and ignore it if there is an error. here is an
excerpt from one of my codes:

If IsError(Application.VLookup(Mystr, rng2, 4, 0)) = True Then
* * ' do nothing
Else
* * c.Value = Application.VLookup(Mystr, rng2, 4, 0)
End If

Mike F"straws" wrote in message

...

I need to replace "Ticker Symbols" with the full name. I have the
tickers in column D Raw!, and I have the table in OrderLegend! 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 D Raw! with
the full name in OrderLegend! 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


=IF(ISNA(VLOOKUP(D2,OrderLegend!A:B,2,0)),D2,(VLOO KUP(D2,OrderLegend!
A:B,2,0)))

D2 "Raw!" sheet is the ticker (that needs to be replaced with the full
name), OrderLegend! A:B is the ticker (A) and full name(B)

Thanks for your response - however, I am not even that far yet. I am
having trouble getting off the ground.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default VBA Vlookup

Hi,

This will work as worksheet or workbook code but I recommend workbok so:-
Alt+F11 to open Vb editor. double click 'This workbook' and paste this in on
the right and run it. If the lookup fails it will return the value of RAW D2

Sub marine()
Dim MyRange As Range
myvalue = Sheets("Raw").Range("D2").Value
Set MyRange = ThisWorkbook.Sheets("Orderlegend").Range("A:B")
If IsError(Application.VLookup(myvalue, MyRange, 2, False)) Then
res = myvalue
Else
res = Application.VLookup(myvalue, MyRange, 2, False)
End If
MsgBox res
End Sub

Mike
"straws" wrote:

On Sep 23, 7:51 am, "Mike Fogleman" wrote:
Test the VLookup for an error and ignore it if there is an error. here is an
excerpt from one of my codes:

If IsError(Application.VLookup(Mystr, rng2, 4, 0)) = True Then
' do nothing
Else
c.Value = Application.VLookup(Mystr, rng2, 4, 0)
End If

Mike F"straws" wrote in message

...

I need to replace "Ticker Symbols" with the full name. I have the
tickers in column D Raw!, and I have the table in OrderLegend! 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 D Raw! with
the full name in OrderLegend! 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


=IF(ISNA(VLOOKUP(D2,OrderLegend!A:B,2,0)),D2,(VLOO KUP(D2,OrderLegend!
A:B,2,0)))

D2 "Raw!" sheet is the ticker (that needs to be replaced with the full
name), OrderLegend! A:B is the ticker (A) and full name(B)

Thanks for your response - however, I am not even that far yet. I am
having trouble getting off the ground.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default VBA Vlookup

On Sep 23, 8:33*am, Mike H wrote:
Hi,

This will work as worksheet or workbook code but I recommend workbok so:-
Alt+F11 to open Vb editor. double click 'This workbook' and paste this in on
the right and run it. If the lookup fails it will return the value of RAW D2

Sub marine()
Dim MyRange As Range
myvalue = Sheets("Raw").Range("D2").Value
Set MyRange = ThisWorkbook.Sheets("Orderlegend").Range("A:B")
If IsError(Application.VLookup(myvalue, MyRange, 2, False)) Then
* * res = myvalue
Else
* * res = Application.VLookup(myvalue, MyRange, 2, False)
End If
MsgBox res
End Sub

Mike

"straws" wrote:
On Sep 23, 7:51 am, "Mike Fogleman" wrote:
Test the VLookup for an error and ignore it if there is an error. here is an
excerpt from one of my codes:


If IsError(Application.VLookup(Mystr, rng2, 4, 0)) = True Then
* * ' do nothing
Else
* * c.Value = Application.VLookup(Mystr, rng2, 4, 0)
End If


Mike F"straws" wrote in message


....


I need to replace "Ticker Symbols" with the full name. *I have the
tickers in column D Raw!, and I have the table in OrderLegend! 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 D Raw! with
the full name in OrderLegend! 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


=IF(ISNA(VLOOKUP(D2,OrderLegend!A:B,2,0)),D2,(VLOO KUP(D2,OrderLegend!
A:B,2,0)))


D2 "Raw!" sheet is the ticker (that needs to be replaced with the full
name), OrderLegend! A:B is the ticker (A) and full name(B)


Thanks for your response - however, I am not even that far yet. *I am
having trouble getting off the ground.


Thanks - we are very close. I think I need to add a loop to this, as
I have about 250 rows in Column D Raw that need replacing. Also - I
don't need the message box - I just need to replace the value in
column D Raw - For example - IBM Intentional Business Machine, GOOG
Google, MSFT Microsoft ect.


Again - thanks - you have done more in 30mins what I have done in 7
hrs!
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default VBA Vlookup

Maybe this

Sub marine()
Dim MyRange As Range, MyRange1 As Range
Set MyRange = ThisWorkbook.Sheets("Orderlegend").Range("A:B")
lastrow = Sheets("Raw").Cells(Rows.Count, "D").End(xlUp).Row
Set MyRange1 = Sheets("RAW").Range("D2:D" & lastrow)
For Each c In MyRange1
myvalue = c.Value
If IsError(Application.VLookup(myvalue, MyRange, 2, False)) Then
'do nothing
Else
c.Value = Application.VLookup(myvalue, MyRange, 2, False)
End If
Next
End Sub

Mike

"straws" wrote:

On Sep 23, 8:33 am, Mike H wrote:
Hi,

This will work as worksheet or workbook code but I recommend workbok so:-
Alt+F11 to open Vb editor. double click 'This workbook' and paste this in on
the right and run it. If the lookup fails it will return the value of RAW D2

Sub marine()
Dim MyRange As Range
myvalue = Sheets("Raw").Range("D2").Value
Set MyRange = ThisWorkbook.Sheets("Orderlegend").Range("A:B")
If IsError(Application.VLookup(myvalue, MyRange, 2, False)) Then
res = myvalue
Else
res = Application.VLookup(myvalue, MyRange, 2, False)
End If
MsgBox res
End Sub

Mike

"straws" wrote:
On Sep 23, 7:51 am, "Mike Fogleman" wrote:
Test the VLookup for an error and ignore it if there is an error. here is an
excerpt from one of my codes:


If IsError(Application.VLookup(Mystr, rng2, 4, 0)) = True Then
' do nothing
Else
c.Value = Application.VLookup(Mystr, rng2, 4, 0)
End If


Mike F"straws" wrote in message


....


I need to replace "Ticker Symbols" with the full name. I have the
tickers in column D Raw!, and I have the table in OrderLegend! 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 D Raw! with
the full name in OrderLegend! 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


=IF(ISNA(VLOOKUP(D2,OrderLegend!A:B,2,0)),D2,(VLOO KUP(D2,OrderLegend!
A:B,2,0)))


D2 "Raw!" sheet is the ticker (that needs to be replaced with the full
name), OrderLegend! A:B is the ticker (A) and full name(B)


Thanks for your response - however, I am not even that far yet. I am
having trouble getting off the ground.


Thanks - we are very close. I think I need to add a loop to this, as
I have about 250 rows in Column D Raw that need replacing. Also - I
don't need the message box - I just need to replace the value in
column D Raw - For example - IBM Intentional Business Machine, GOOG
Google, MSFT Microsoft ect.


Again - thanks - you have done more in 30mins what I have done in 7
hrs!

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default VBA Vlookup

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


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default VBA Vlookup

On Sep 23, 9:26*am, Mike H wrote:
Maybe this

Sub marine()
Dim MyRange As Range, MyRange1 As Range
Set MyRange = ThisWorkbook.Sheets("Orderlegend").Range("A:B")
lastrow = Sheets("Raw").Cells(Rows.Count, "D").End(xlUp).Row
Set MyRange1 = Sheets("RAW").Range("D2:D" & lastrow)
For Each c In MyRange1
* * myvalue = c.Value
* * If IsError(Application.VLookup(myvalue, MyRange, 2, False)) Then
* * *'do nothing
* * Else
* * * * c.Value = Application.VLookup(myvalue, MyRange, 2, False)
* * End If
Next
End Sub

Mike

"straws" wrote:
On Sep 23, 8:33 am, Mike H wrote:
Hi,


This will work as worksheet or workbook code but I recommend workbok so:-
Alt+F11 to open Vb editor. double click 'This workbook' and paste this in on
the right and run it. If the lookup fails it will return the value of RAW D2


Sub marine()
Dim MyRange As Range
myvalue = Sheets("Raw").Range("D2").Value
Set MyRange = ThisWorkbook.Sheets("Orderlegend").Range("A:B")
If IsError(Application.VLookup(myvalue, MyRange, 2, False)) Then
* * res = myvalue
Else
* * res = Application.VLookup(myvalue, MyRange, 2, False)
End If
MsgBox res
End Sub


Mike


"straws" wrote:
On Sep 23, 7:51 am, "Mike Fogleman" wrote:
Test the VLookup for an error and ignore it if there is an error. here is an
excerpt from one of my codes:


If IsError(Application.VLookup(Mystr, rng2, 4, 0)) = True Then
* * ' do nothing
Else
* * c.Value = Application.VLookup(Mystr, rng2, 4, 0)
End If


Mike F"straws" wrote in message


....


I need to replace "Ticker Symbols" with the full name. *I have the
tickers in column D Raw!, and I have the table in OrderLegend! 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 D Raw! with
the full name in OrderLegend! 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


=IF(ISNA(VLOOKUP(D2,OrderLegend!A:B,2,0)),D2,(VLOO KUP(D2,OrderLegend!
A:B,2,0)))


D2 "Raw!" sheet is the ticker (that needs to be replaced with the full
name), OrderLegend! A:B is the ticker (A) and full name(B)


Thanks for your response - however, I am not even that far yet. *I am
having trouble getting off the ground.


Thanks - we are very close. *I think I need to add a loop to this, as
I have about 250 rows in Column D Raw that need replacing. *Also - I
don't need the message box - I just need to replace the value in
column D Raw - For example - IBM Intentional Business Machine, GOOG
Google, MSFT Microsoft ect.


Again - thanks - you have done more in 30mins what I have done in 7
hrs!


Mike - If your name was Michelle I would send you flowers!! Thank you
very much.


  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default VBA Vlookup

Did you try using mine with vba instead of worksheet.functions?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"straws" wrote in message
...
On Sep 23, 9:26 am, Mike H wrote:
Maybe this

Sub marine()
Dim MyRange As Range, MyRange1 As Range
Set MyRange = ThisWorkbook.Sheets("Orderlegend").Range("A:B")
lastrow = Sheets("Raw").Cells(Rows.Count, "D").End(xlUp).Row
Set MyRange1 = Sheets("RAW").Range("D2:D" & lastrow)
For Each c In MyRange1
myvalue = c.Value
If IsError(Application.VLookup(myvalue, MyRange, 2, False)) Then
'do nothing
Else
c.Value = Application.VLookup(myvalue, MyRange, 2, False)
End If
Next
End Sub

Mike

"straws" wrote:
On Sep 23, 8:33 am, Mike H wrote:
Hi,


This will work as worksheet or workbook code but I recommend workbok
so:-
Alt+F11 to open Vb editor. double click 'This workbook' and paste this
in on
the right and run it. If the lookup fails it will return the value of
RAW D2


Sub marine()
Dim MyRange As Range
myvalue = Sheets("Raw").Range("D2").Value
Set MyRange = ThisWorkbook.Sheets("Orderlegend").Range("A:B")
If IsError(Application.VLookup(myvalue, MyRange, 2, False)) Then
res = myvalue
Else
res = Application.VLookup(myvalue, MyRange, 2, False)
End If
MsgBox res
End Sub


Mike


"straws" wrote:
On Sep 23, 7:51 am, "Mike Fogleman"
wrote:
Test the VLookup for an error and ignore it if there is an error.
here is an
excerpt from one of my codes:


If IsError(Application.VLookup(Mystr, rng2, 4, 0)) = True Then
' do nothing
Else
c.Value = Application.VLookup(Mystr, rng2, 4, 0)
End If


Mike F"straws" wrote in message


....


I need to replace "Ticker Symbols" with the full name. I have the
tickers in column D Raw!, and I have the table in OrderLegend!
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 D Raw!
with
the full name in OrderLegend! 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


=IF(ISNA(VLOOKUP(D2,OrderLegend!A:B,2,0)),D2,(VLOO KUP(D2,OrderLegend!
A:B,2,0)))


D2 "Raw!" sheet is the ticker (that needs to be replaced with the
full
name), OrderLegend! A:B is the ticker (A) and full name(B)


Thanks for your response - however, I am not even that far yet. I am
having trouble getting off the ground.


Thanks - we are very close. I think I need to add a loop to this, as
I have about 250 rows in Column D Raw that need replacing. Also - I
don't need the message box - I just need to replace the value in
column D Raw - For example - IBM Intentional Business Machine, GOOG
Google, MSFT Microsoft ect.


Again - thanks - you have done more in 30mins what I have done in 7
hrs!


Mike - If your name was Michelle I would send you flowers!! Thank you
very much.

  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default VBA Vlookup

Glad I could help and I'll pass on the flowers.

Just a point. I persisted with application.vlookup because that's what you
started with but it's not necessarily the best or most effecient. Check your
other response from Don G.

Mike

"straws" wrote:

On Sep 23, 9:26 am, Mike H wrote:
Maybe this

Sub marine()
Dim MyRange As Range, MyRange1 As Range
Set MyRange = ThisWorkbook.Sheets("Orderlegend").Range("A:B")
lastrow = Sheets("Raw").Cells(Rows.Count, "D").End(xlUp).Row
Set MyRange1 = Sheets("RAW").Range("D2:D" & lastrow)
For Each c In MyRange1
myvalue = c.Value
If IsError(Application.VLookup(myvalue, MyRange, 2, False)) Then
'do nothing
Else
c.Value = Application.VLookup(myvalue, MyRange, 2, False)
End If
Next
End Sub

Mike

"straws" wrote:
On Sep 23, 8:33 am, Mike H wrote:
Hi,


This will work as worksheet or workbook code but I recommend workbok so:-
Alt+F11 to open Vb editor. double click 'This workbook' and paste this in on
the right and run it. If the lookup fails it will return the value of RAW D2


Sub marine()
Dim MyRange As Range
myvalue = Sheets("Raw").Range("D2").Value
Set MyRange = ThisWorkbook.Sheets("Orderlegend").Range("A:B")
If IsError(Application.VLookup(myvalue, MyRange, 2, False)) Then
res = myvalue
Else
res = Application.VLookup(myvalue, MyRange, 2, False)
End If
MsgBox res
End Sub


Mike


"straws" wrote:
On Sep 23, 7:51 am, "Mike Fogleman" wrote:
Test the VLookup for an error and ignore it if there is an error. here is an
excerpt from one of my codes:


If IsError(Application.VLookup(Mystr, rng2, 4, 0)) = True Then
' do nothing
Else
c.Value = Application.VLookup(Mystr, rng2, 4, 0)
End If


Mike F"straws" wrote in message


....


I need to replace "Ticker Symbols" with the full name. I have the
tickers in column D Raw!, and I have the table in OrderLegend! 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 D Raw! with
the full name in OrderLegend! 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


=IF(ISNA(VLOOKUP(D2,OrderLegend!A:B,2,0)),D2,(VLOO KUP(D2,OrderLegend!
A:B,2,0)))


D2 "Raw!" sheet is the ticker (that needs to be replaced with the full
name), OrderLegend! A:B is the ticker (A) and full name(B)


Thanks for your response - however, I am not even that far yet. I am
having trouble getting off the ground.


Thanks - we are very close. I think I need to add a loop to this, as
I have about 250 rows in Column D Raw that need replacing. Also - I
don't need the message box - I just need to replace the value in
column D Raw - For example - IBM Intentional Business Machine, GOOG
Google, MSFT Microsoft ect.


Again - thanks - you have done more in 30mins what I have done in 7
hrs!


Mike - If your name was Michelle I would send you flowers!! Thank you
very much.

  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default VBA Vlookup

On Sep 23, 10:04*am, "Don Guillett" wrote:
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


No - Mike's worked fine, but I will also try yours. What is the
advantage of your? Thanks for you help.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLookUp - Does the VLookUp return the exact information? Cpviv Excel Worksheet Functions 2 October 28th 08 09:57 AM
Vlookup problem - unable to get the vlookup property Fred Excel Programming 2 August 22nd 08 05:23 PM
using a vlookup to enter text into rows beneath the vlookup cell Roger on Excel Excel Programming 1 November 29th 07 12:09 PM
Vlookup in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM


All times are GMT +1. The time now is 12:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"