Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
jd jd is offline
external usenet poster
 
Posts: 91
Default distribute rows from one workbook to other workbooks

I need to distribute the rows from a master workbook to other workbooks. I
need to do this one row (or small group of rows) at a time. To make the
distribution even, I cannot take the total number of rows and diveid it by
the number of sheets I need (9). IS ther a way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default distribute rows from one workbook to other workbooks

JD,

Do you have a criteria that you will base the row distrubution upon?

HTH,
Bernie
MS Excel MVP


"JD" wrote in message
...
I need to distribute the rows from a master workbook to other workbooks. I
need to do this one row (or small group of rows) at a time. To make the
distribution even, I cannot take the total number of rows and diveid it by
the number of sheets I need (9). IS ther a way to do this?



  #3   Report Post  
Posted to microsoft.public.excel.misc
jd jd is offline
external usenet poster
 
Posts: 91
Default distribute rows from one workbook to other workbooks

No, the file just needs to be distributed across the 9 users. It could be as
first row to the first user, second row to second user, etc... When the
tenth row cam around, it would be assigned to the first user. Other than
just trying to be even, there are really no criteria that will be used for
the distribution of rows.

"Bernie Deitrick" wrote:

JD,

Do you have a criteria that you will base the row distrubution upon?

HTH,
Bernie
MS Excel MVP


"JD" wrote in message
...
I need to distribute the rows from a master workbook to other workbooks. I
need to do this one row (or small group of rows) at a time. To make the
distribution even, I cannot take the total number of rows and diveid it by
the number of sheets I need (9). IS ther a way to do this?




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default distribute rows from one workbook to other workbooks

JD,

Try the macro below. This assumes that the data table starts in A1, with headers in row 1.

If you need to change the number of new workbooks or the names used, change the coded values:

ShtCnt = 9
ShtName = "Split "


HTH,
Bernie
MS Excel MVP

Option Explicit
Dim i As Long
Dim r As Long
Dim j As Integer
Dim ShtCnt As Integer
Dim ShtName As String
Dim Wkbk As Workbook
Dim Sht As Worksheet

Sub SplitSheet()

ShtCnt = 9
ShtName = "Split "

Set Wkbk = ActiveWorkbook
Set Sht = ActiveSheet
r = Sht.Cells(Rows.Count, 1).End(xlUp).Row

For i = 1 To ShtCnt
Worksheets.Add.Name = ShtName & i
Sht.Rows(1).Copy _
Sheets(ShtName & i).Cells(1, 1).EntireRow
Next i

For i = 2 To r
j = ((i - 2) Mod ShtCnt) + 1
Sht.Rows(i).Copy _
Sheets(ShtName & j).Cells(Rows.Count, 1).End(xlUp)(2).EntireRow
Next i

For i = 1 To ShtCnt
Wkbk.Activate
Wkbk.Sheets(ShtName & i).Move
ActiveWorkbook.SaveAs ThisWorkbook.Path & "\" & ShtName & i & ".xls"
Next i

End Sub


"JD" wrote in message
...
No, the file just needs to be distributed across the 9 users. It could be as
first row to the first user, second row to second user, etc... When the
tenth row cam around, it would be assigned to the first user. Other than
just trying to be even, there are really no criteria that will be used for
the distribution of rows.

"Bernie Deitrick" wrote:

JD,

Do you have a criteria that you will base the row distrubution upon?

HTH,
Bernie
MS Excel MVP


"JD" wrote in message
...
I need to distribute the rows from a master workbook to other workbooks. I
need to do this one row (or small group of rows) at a time. To make the
distribution even, I cannot take the total number of rows and diveid it by
the number of sheets I need (9). IS ther a way to do this?






Reply
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
Distribute a secure Workbook scott56hannah Excel Discussion (Misc queries) 1 June 25th 07 02:09 PM
distribute data to every other cell mikeweasel Excel Discussion (Misc queries) 2 March 30th 07 08:08 PM
"Adding" rows from one workbook to another, and expanding workbooks by row The Third Man Excel Discussion (Misc queries) 2 July 25th 06 05:50 PM
Distribute Total Fable Excel Discussion (Misc queries) 0 July 25th 05 05:28 PM
How to randomely distribute non-numerical values across rows? Dimmer Excel Worksheet Functions 3 June 30th 05 08:26 AM


All times are GMT +1. The time now is 02:29 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"