About
Pricing
Community
Teams
Start Free Trial
Log in
Jagwarman
asked on
9/8/2015
find Sheet but sheet name not known
sounds crazy but.
Can an expert help me out with vba code that will look into the sheets in my workbook and find GLOBAL RATES in cell A1
when it finds that I need to copy the sheet and copy it to a new sheet in a different workbook.
I am using the below code to do copy sheets to different workbooks
Sheets("Sheet Name").Copy After:=Workbooks("Weekly Metrics Template.xlsx").Sheets("Sh
eet Name")
many thanks
Visual Basic Classic
Microsoft Excel
Microsoft Office
VBA
5
1
Last Comment
Jagwarman
8/22/2022 - Mon
[ fanpages ]
9/8/2015
Will there be more than one worksheet with "GLOBAL RATES" in cell [A1]?
If so, do you want every matching worksheet to be copied or, perhaps, just the first located & then the searching stops?
Will "Weekly Metrics Template.xlsx" be open concurrently with the workbook that is executing the code required to search/copy the worksheet?
Jagwarman
9/8/2015
ASKER
hi Fan pages,
Will there be more than one worksheet with "GLOBAL RATES" in cell [A1]?
No there will only be one
Will "Weekly Metrics Template.xlsx" be open concurrently with the workbook that is executing the code required to search/copy the worksheet?
Yes it will
ASKER CERTIFIED SOLUTION
Ryan Chong
9/8/2015
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
[ fanpages ]
9/8/2015
Thanks
Jagwarman
.
Ryan
has already progressed making those assumptions, so I do not think I need to provide a suggestion.
PS. Just an afterthought; will any worksheets be Hidden (/VeryHidden)? If so, should they be ignored?
Your help has saved me hundreds of hours of internet surfing.
fblack61
Jagwarman
9/8/2015
ASKER
That's perfect Thank you both
If so, do you want every matching worksheet to be copied or, perhaps, just the first located & then the searching stops?
Will "Weekly Metrics Template.xlsx" be open concurrently with the workbook that is executing the code required to search/copy the worksheet?