Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
Adding Rows and copying cells Jeff S. New Users to Excel 2 September 5th 08 06:16 PM
Copying a formula but 'skipping' a cell Mike Langensiepen New Users to Excel 2 May 3rd 07 06:17 AM
Copying values but skipping empty cells Handyy Excel Worksheet Functions 1 February 9th 06 01:41 AM
copying and skipping consecutive row data archie Excel Programming 0 November 15th 04 10:05 PM
Skipping empty rows when copying a formula down a column Rachel Jones Excel Programming 1 July 31st 03 03:55 AM


All times are GMT +1. The time now is 12:50 PM.

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

About Us

"It's about Microsoft Excel"