Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Specifying Range.Select in a loop
I need to do something equivalent to the example below - primarily copy from
a nominated cell in one Workbook and paste to a specific cell in another. However the cell that I copy from will vary with each pass through the loop - how can I specify the Range (??).Select? ' Count the number of rows in the column ' Choose the worksheet - need to put the accound worksheet name here Worksheets("Super").Activate ' Select the column Range("A5").Select ' Select all rows in column Range(Selection, Selection.End(xlDown)).Select For i = 1 To Selection.Rows.Count Range("A"+i).Select ' in workbook one Selection.Copy Range("D4").Select ' in Workbook two ActiveSheet.Paste Next i |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Compare a selected Range with a Named range and select cells that do not exist | Excel Programming | |||
How to select columns in loop | Excel Programming | |||
How to select columns in loop | Excel Programming | |||
Select Sheet then Select Range | Excel Programming | |||
select column cell in same row as loop result? | Excel Programming |