Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I hope you can help as Im new to this programming lark!
I have a spreadsheet with data in Rows A to DI. What I would like to do is copy the data from each row into a separate new sheet and rename the sheet with the value in the second row. I think this should work on a loop but I am not sure how. Thanks in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think you menat Columns A to DI. This code will copy the columns to column
A on each new worksheet. change "A:A" to a different column as required. Sub newsheet() LastColumn = Cells(2, Columns.Count).End(xlToLeft).Column oldsheetname = ActiveSheet.Name Set sheetnames = Sheets(oldsheetname). _ Range(Cells(2, "A"), Cells(2, LastColumn)) For Each cell In sheetnames If cell < oldsheetname Then Worksheets.Add ActiveSheet.Name = cell cell.EntireColumn.Copy Destination:=ActiveSheet.Columns("A:A") End If Next cell End Sub "Chris" wrote: I hope you can help as Im new to this programming lark! I have a spreadsheet with data in Rows A to DI. What I would like to do is copy the data from each row into a separate new sheet and rename the sheet with the value in the second row. I think this should work on a loop but I am not sure how. Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Matching Columns in work sheets and copying both rows to new | Excel Discussion (Misc queries) | |||
copying sheets | Excel Programming | |||
Copying columns from multiple sheets in a single sheet based on a column value. | Excel Programming | |||
Copying sheets | Excel Programming | |||
Copying Sheets | Excel Programming |