Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying and skipping (adding) rows
Hi.
I have a column of data that runs from row 2:53. I want to paste this data into another worksheet, but for each line of data I want to skip down ten rows. Here's a illustration of the data (immigration data): Worksheet 1 (Year 1995) State Afghanistan Alabama 500 Alaska 100 Arizona 900 .. . .. . .. . Worksheet 2 1995-2005 State Year Afghanistan Alabama 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 Alaska 1995 1996 .. . .. . .. . So, I want to paste the Alabam's 1995 from the 1st worksheet into the 1995 year in the 2nd worksheet, skip ten rows down paste Alaska, and so on... Thanks for any help. Matt Hall Penn State |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying and skipping (adding) rows
i = 2
for each cell in Worksheets("Sheet1").Range("A2:A53") Worksheets("Sheet2").Cells(i,1) = cell yr = 1995 for j = i to i + 11 worksheets("Sheet2").Cells(i,2) = yr yr = yr + 1 Next i = i + 12 Next Worksheets("Sheet2").Range("A1:C1").Value = _ Array("State","Year","Afghanistan") -- Regards, Tom Ogilvy wrote in message oups.com... Hi. I have a column of data that runs from row 2:53. I want to paste this data into another worksheet, but for each line of data I want to skip down ten rows. Here's a illustration of the data (immigration data): Worksheet 1 (Year 1995) State Afghanistan Alabama 500 Alaska 100 Arizona 900 . . . . . . Worksheet 2 1995-2005 State Year Afghanistan Alabama 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 Alaska 1995 1996 . . . . . . So, I want to paste the Alabam's 1995 from the 1st worksheet into the 1995 year in the 2nd worksheet, skip ten rows down paste Alaska, and so on... Thanks for any help. Matt Hall Penn State |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding Rows and copying cells | New Users to Excel | |||
Copying a formula but 'skipping' a cell | New Users to Excel | |||
Copying values but skipping empty cells | Excel Worksheet Functions | |||
copying and skipping consecutive row data | Excel Programming | |||
Skipping empty rows when copying a formula down a column | Excel Programming |