Macros in excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can you use the contents of a cell with a "Pick List" as the destination
sheet address in a macro?

I am new to macros and have a 15 page spreadsheet that I am writing a data
entry form for.
 
John,

Sure, just use the value of that cell to target the worksheet, along the lines of this, (assuming
the cell is named "PickList" - it could be a cell address, as well).

Worksheets(Range("PickList").Value).Range("A1").Value = "I'm on the sheet that was picked"

HTH,
Bernie
MS Excel MVP
 
Thanks for this Bernie. Can I ask an associated question? As I am new to
macros how do I write the macro to "Goto" the "Picklist" address?
 
John,

Sure, but the specifics depend on what your PickList values are - are they sheet names, cell
addresses, or combined? Post some examples....

HTH,
Bernie
MS Excel MVP
 
Berenie they are all sheet names that I wish to use. They are in a "Pick
List" format because I add new sheets as needed.

Examples will be Terr1, terr2,terr3 etc.
 
John,

If the cell with the list is named "PickList" then you could use:

Worksheets(Range("PickList").Value).Select

HTH,
Bernie
MS Excel MVP
 
Many thanks and please forgive a rank amateur.

You're welcome. We all started as amateurs - time and needs changes that.

Bernie
MS Excel MVP
 

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