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: 215
Default Efficient Way of Copy/PasteSpecial of Non-Continuous Range in VBA

Hi;

1) On a w/s I have:
No. of rows: cell C34

2) In an existing macro, I need to Copy a range in col H, and Paste and
PasteSpecial/Values of every 2nd cells in the range to col K.
a. Copy range starts at cell H44, down C34 rows
H44:: 1.00
H45:: = H44
H46:: = $H$44 - $G$35*$G46
H47:: = H46
H48:: = $H$44 - $G$35*$G48
H49:: = H48
H50:: = $H$44 - $G$35*$G50
..............................

b. Paste range starts at cell K44, down C34 rows, with:
PasteSpecial/Values of cells: H44, H46, H48, ... to cells: K44, K46, K48, ...
Paste of cells: H45, H47, H49, ... to cells: K45, K47, K49, ...

3) The implementation of the above looked horrible! Too many FOR loops and
too much repetition, since PasteSpecial doesn't apply to a non-continuous
range.

Can someone please advise on how to do it efficiently ??
Thank you kindly.
 
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
efficient code to copy/paste Ivano Excel Programming 7 May 14th 08 05:21 PM
More efficient copy/paste?? Celt[_64_] Excel Programming 6 June 9th 06 07:21 PM
Efficient way to copy a range in numerous sheets within a workbook Steve O Excel Programming 2 September 15th 05 01:58 AM
Efficient Copy/Paste William Benson[_2_] Excel Programming 4 September 8th 05 07:42 PM
How To Copy & PasteSpecial: Range from Mult Wksht into SummarySheet Mike Taylor Excel Programming 2 April 13th 04 02:40 AM


All times are GMT +1. The time now is 09:32 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"