Another Macro Question

  • Thread starter Thread starter Scottmk
  • Start date Start date
S

Scottmk

Hey everyone. I am still really new to macros (I don't know how to
write the code at all) and was hoping someone would have a suggestion
for me. I have a bunch of Mutual funds with Ticker symbols and their
data. I would like the user of the spreadsheet to be able to type in
the Ticker symbol, and then click on the macro so that the cell
containing that ticker is selected.
I appreciate everyones help on this.
 
right click on the sheet tab>view code>insert this>save workbook
Change $I$8 to suit you desired cell

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$I$8" Then Exit Sub
Application.Goto Cells.Find(Target, after:=Target)
End Sub
 
Thanks...that did the job. The only thing is that it doesn't show up in
my list of macros. I was hoping to put a button there.

Thanks again for all your help.
 
That's because it's AUTOMATIC. Whenever you type in a symbol in the cell,
the cursor will goto the symbol in another cell on the worksheet.

IF you want to bother with having assigned to a button/shape, just change to

Sub gotosymbol()
Application.Goto Cells.Find([i8], after:=[i8])
End Sub
 
Thanks alot. You have helped a great deal. by the way, where do you
guys learn all this about visual basic codes. I have gotten ok at
excel through using it and it is obviously a little easier to
understand. I would like to get better at VB...any suggestions. PS,
schooling is not an option. I have spent far too much time in college
already.
 
Hang around here. Learn by trial and error. Get books by John Walkenbach and
others.
 
Back
Top