Sheets reference change variable

  • Thread starter Thread starter Francois via OfficeKB.com
  • Start date Start date
F

Francois via OfficeKB.com

Is it possible to have the sheets reference read the contents of a cell eg
Sheets(A1) where A1 contains JUN06 and would change if I altered A1 to
JUL06 ?

Sheets("JUN06").Range("E5:AO10000").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("E1:F2"), CopyToRange:=Range("C6:AJ6"), Unique:
=False
rows("6:6").Copy

rest of macro etc
 
something like

sheets(range("A1").value).range....

would be what you want I think
 
something like

sheets(range("A1").value).range....

would be what you want I think
Is it possible to have the sheets reference read the contents of a cell eg
Sheets(A1) where A1 contains JUN06 and would change if I altered A1 to
[quoted text clipped - 6 lines]
rest of macro etc


I'll give it a try.

Thanks for the info
 
something like

sheets(range("A1").value).range....

would be what you want I think
Is it possible to have the sheets reference read the contents of a cell eg
Sheets(A1) where A1 contains JUN06 and would change if I altered A1 to
[quoted text clipped - 6 lines]
rest of macro etc


Wonderful, Thanks again
 

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