98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA - Create Multiple Sheets with different strName
VBA - Create Multiple Sheets with different strName
Resolved · Low Priority · Version 2003
Andy has attended:
No courses
VBA - Create Multiple Sheets with different strName
Hi There
I am trying to apply the example worked through in training into our live environment.
I regularly have to split out seperate data from a central worksheet into multiple sheets based on the directorates within our trust (there are 27 different directorates).
Is there a way to automate the selection of strName based on a list that will then create a new sheet for each strName rather than to have to select each new strName individually/manually?(i.e. in the training example, to automatically create a new sheet/report for each salesperson)
Many Thanks
Andy
RE: VBA - Create Multiple Sheets with different strName
Hi andy
Thanks for your question
Create a procedure that loops through the list of names on the list page one at a time. It then sets the current name equal to strname and then calls the main report
So
For i = 1 to sheets("List Page").range("a1").currentregion.Rows.Count
strname = sheets("ListPage").cells(i,1).value
call mainspreport
Next i
Hope this helps
Stephen
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Adjusting the Elevation and Rotation in a 3-D ChartFor any 3-D chart you create, you can adjust the chart |