View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
somethinglikeant somethinglikeant is offline
external usenet poster
 
Posts: 94
Default Select cells copy/paste and repeat x times

Hi Mike

This routine, if I have acknowledged the structure of your spreadsheet
should do the trick.
It will Copy column for Column into a destination sheet in my example
until it reaches the last header label in the 'Home' sheet.

See if this might work for you.

Any problems let me know and I'll help you out further.

:=====================

Sub CopyVariableNumberColumns()

Sheets("Main").Select
[A1].Select
i = 1

Do Until IsEmpty(ActiveCell)
Columns(i).copy Sheets("Destination").Columns(i)
i = i + 1
ActiveCell.Offset(0, 1).Select
Loop

End Sub

:======================

somethinglikeant
http://www.excel-ant.co.uk