![]() |
copy multiple unkowns
Ok here's a little detail. I one sheet(tab) I want all items merged from 11 other sheets(tabs). need all items on the 11 other sheets. The number of rows will be varie a specfic number of rows is unknown for each sheet. I do however kno that there are a specific number of columns that is 16, this is tru for each sheet. This is all within the same workbook. it needs to be refreshed type senerio each time ran not a continunce of the previou run. So each row of data on each of the 11 sheets needs to be brought ove to one common sheet with an unknown number of rows in the 11 sheets. Anyone help me out here? Thanks IN+Vance Michae -- Michael Wis ----------------------------------------------------------------------- Michael Wise's Profile: http://www.excelforum.com/member.php...nfo&userid=699 View this thread: http://www.excelforum.com/showthread.php?threadid=26561 |
copy multiple unkowns
Assuming "merge" sheet is Sheet1, others are Sheet2-
Sheet12, and that the data you need copy is in columns A-P starting on the 1st row: Dim CopyRange As Range, RowNo As Integer, i As Integer Sheets("Sheet1").Cells.Clear For i = 2 To 4 Set CopyRange = Sheets("Sheet" & i).Range ("A1").CurrentRegion CopyRange.Copy With Sheets("Sheet1") If .UsedRange.Count = 1 Then RowNo = 1 _ Else RowNo = .UsedRange.Rows.Count + 1 .Range("A" & RowNo).PasteSpecial xlPasteAll End With Next i -----Original Message----- Ok here's a little detail. I one sheet(tab) I want all items merged from 11 other sheets(tabs). I need all items on the 11 other sheets. The number of rows will be varied a specfic number of rows is unknown for each sheet. I do however know that there are a specific number of columns that is 16, this is true for each sheet. This is all within the same workbook. it needs to be a refreshed type senerio each time ran not a continunce of the previous run. So each row of data on each of the 11 sheets needs to be brought over to one common sheet with an unknown number of rows in the 11 sheets. Anyone help me out here? Thanks IN+Vance Michael -- Michael Wise ---------------------------------------------------------- -------------- Michael Wise's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=6998 View this thread: http://www.excelforum.com/showthread...hreadid=265613 . |
copy multiple unkowns
Forgot to modify my test code for 12 sheets; that For loop
should be For i = 2 to 12, of course. -----Original Message----- Assuming "merge" sheet is Sheet1, others are Sheet2- Sheet12, and that the data you need copy is in columns A- P starting on the 1st row: Dim CopyRange As Range, RowNo As Integer, i As Integer Sheets("Sheet1").Cells.Clear For i = 2 To 4 Set CopyRange = Sheets("Sheet" & i).Range ("A1").CurrentRegion CopyRange.Copy With Sheets("Sheet1") If .UsedRange.Count = 1 Then RowNo = 1 _ Else RowNo = .UsedRange.Rows.Count + 1 .Range("A" & RowNo).PasteSpecial xlPasteAll End With Next i -----Original Message----- Ok here's a little detail. I one sheet(tab) I want all items merged from 11 other sheets(tabs). I need all items on the 11 other sheets. The number of rows will be varied a specfic number of rows is unknown for each sheet. I do however know that there are a specific number of columns that is 16, this is true for each sheet. This is all within the same workbook. it needs to be a refreshed type senerio each time ran not a continunce of the previous run. So each row of data on each of the 11 sheets needs to be brought over to one common sheet with an unknown number of rows in the 11 sheets. Anyone help me out here? Thanks IN+Vance Michael -- Michael Wise --------------------------------------------------------- - -------------- Michael Wise's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=6998 View this thread: http://www.excelforum.com/showthread...hreadid=265613 . . |
All times are GMT +1. The time now is 09:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com