Macro to move between sheets

  • Thread starter Thread starter Pete JM
  • Start date Start date
P

Pete JM

Hi,

I would like to have a macro that would look at a value in cell A5 and
then go to the Worksheet that has the same name.

For example if i typed Sheet 1 in cell A1 then clicked on the macro i
would automatically be taken to Sheet 1.

Is this possible?

Regards

Pete
 
How about a fully automatic way. NO clicking necessary
Right click sheet tab>view code>insert this.
Now when you type sheet1 in cell a1 you will goto sheet1

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.address <> "$A$1" Then Exit Sub
Sheets(Target.Value).Select
End Sub
 
Thank you very much for your reply its very useful.

thanks again

Pet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top