LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

This will add one sheet for every 30 items in your master list.

Assume you master list starts in A2 and extends down without blanks
intervening.

Public Sub AddSheetForEach30()
Dim nNumSheets As Long
Dim nLastRow As Long
Dim i As Long

nLastRow = Range("A" & Rows.Count).End(xlUp).Row - 1
nNumSheets = Application.Ceiling(nLastRow / 30, 1)
Do While nNumSheets 0
Worksheets.Add Count:=Application.Min(nNumSheets, 256)
nNumSheets = nNumSheets - 256
Loop
End Sub

In article ,
"Daniel" wrote:

automate creation of sheets in excel

is there anyway to automate creation of sheets in excel? I would like to
have one sheet that has a master list of all items. then a have sheets which
are automaticaly generated, 1 sheet for every 30 items on the master sheet.
can this be done? is there some vba built into excell that i could use to do
this?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Append the data given in diff sheets of an Excel File to one sheet sansk_23 Excel Worksheet Functions 3 May 10th 05 02:00 AM
saving excel with multiple sheets, but won't save to proper sheet jimlead1 Excel Discussion (Misc queries) 0 May 4th 05 06:36 PM
How can I delete similar rows in excel workbook with many sheets? JSchrader Excel Worksheet Functions 1 April 26th 05 06:40 PM
excel should have a function to count sheets carlos sosa Excel Worksheet Functions 7 April 24th 05 08:29 PM
need an advice in excel sheets.... | m o [] Excel Discussion (Misc queries) 0 November 27th 04 10:36 PM


All times are GMT +1. The time now is 08:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"