View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default macro to copy columns from one sheet to another sheet

One way change destination sheet and fire from active sheet
Sub copycolumns1()
With Sheets("sheet20")
For i = 1 To Cells(1, Columns.Count) _
..End(xlToLeft).Column Step 3
Columns(i).Copy .Cells(1, .Cells(1, Columns.Count) _
..End(xlToLeft).Column + 1)
Next i
End With
End Sub


On Oct 13, 9:13*am, beginner wrote:
I have over 120 columns on one sheet and I would like to copy and
paste every 3rd column onto another sheet. *I started to "record"
macro, but was wondering if there was a way to write code for this?

so I have something like this:

x * * * * * *y * * * * *z * * * * * x * * * * *y * * * * *z ...
1
1
2
3
8
7,etc..

I would like to copy all of the "x" column values onto another sheet.
Any solutions?

Thanks!