LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default cell copy question

what's the best way to copy a column of data with data in every other row?

for example, this range could vary, but it's what i was trying to accomplish,
copy all cells at once

Range("B5,B7,B9,B11,B13,B15,B17,B19,B21,B23,B25"). copy
and then paste them into a different sheet

now this works, but does one cell at time

For Each cell In Range("b5:b25")
If cell.Row Mod 2 = 1 Then
Range("b" & cell.Row).Copy
End If
Next

and so does this:

For i = 5 To Lastrow Step 2
Sheets("sheet1").Range("b" & i).Copy

so how would you dynamically replace the odd numbers in my first example so all
cells are selected at once? and does it even matter if they're done all at once
or a cell at a time?

--


Gary



 
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
Copy/Paste cell down to next value- Easy question, can't figure it J. Catz. Excel Discussion (Misc queries) 2 November 4th 09 10:45 AM
copy down question [email protected] Excel Worksheet Functions 6 January 28th 09 12:56 AM
Copy/Paste Question DoubleZ Excel Discussion (Misc queries) 3 September 24th 08 11:13 PM
copy question Gary Keramidas[_4_] Excel Programming 7 October 8th 05 02:07 AM
Copy Paste Question lcannon Excel Discussion (Misc queries) 1 June 14th 05 12:48 AM


All times are GMT +1. The time now is 07:59 AM.

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

About Us

"It's about Microsoft Excel"