how do i automate parsing a workbook

G

Guest

i have to parse out tabs from a workbook every month. is there a way to
automate that parsing in a macro? i am not a programmer. thanks!
 
G

Guest

Ok. I get a workbook with about 60 tabs monthly. I have to separate several
tabs at a time not (in sequence) and copy them to a new work book that I
rename according to which tabs it contains. there are about 15 of these
workbooks. the tabs correspond to areas of responsibility and i have to then
send each workbook to the corresponding manager. Is that any clearer?
 
C

Chip Pearson

You could begin with the following code. It doesn't do exactly what you
want, but should point you in the right direction.

Sub MoveSheets()
Dim SheetsToMove(1 To 3)
Dim WorkbookToMoveSheetsTo As Workbook

SheetsToMove(1) = "Sheet1"
SheetsToMove(2) = "Sheet3"
SheetsToMove(3) = "Sheet5"

Set WorkbookToMoveSheetsTo = Workbooks("Book3.xls")
With WorkbookToMoveSheetsTo.Worksheets
Worksheets(SheetsToMove).Move after:=.Item(.Count)
End With
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 
G

Guest

Great thanks.

Chip Pearson said:
You could begin with the following code. It doesn't do exactly what you
want, but should point you in the right direction.

Sub MoveSheets()
Dim SheetsToMove(1 To 3)
Dim WorkbookToMoveSheetsTo As Workbook

SheetsToMove(1) = "Sheet1"
SheetsToMove(2) = "Sheet3"
SheetsToMove(3) = "Sheet5"

Set WorkbookToMoveSheetsTo = Workbooks("Book3.xls")
With WorkbookToMoveSheetsTo.Worksheets
Worksheets(SheetsToMove).Move after:=.Item(.Count)
End With
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 

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

Top