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: 3
Default Looking for faster method for Copy & Paste

Hi,

I have a sheet with references to workbooks, sheets, cell addresses and
values whose values need to be copied to the aforementioned workbook, sheet
and address reference.

Ref_sheet looks something like the following...
workbook worksheet address value
1.xls Sheet1 $A$1 Hello
1.xls Sheet1 $A$2 World
2.xls Sheet1 $J$10 10
2.xls Sheet2 $Z$100 32,000

Current method loops through above rows and copies and pastes each value to
location (i.e. copy "Hello" to book "1.xls", sheet "sheet1" to range
"$A$1").
(Needs to be copy & paste to preserve formatting)

For i = row_min To row_max
ref_sheet.Cells(i, 4).Copy
Destination:=Workbooks(CStr(ref_sheet.Cells(i,
1))).Worksheets(CStr(ref_sheet.Cells(i, 2))).Range(ref_sheet.Cells(i, 3))
Next i

where ref_sheet references above sheet... works well but I think it's a
little slow; averaging about 588 records per second (10,000 records taking
about 17 seconds) on a P4 Celeron 2.4 in Excel 97.
Since any of workbook, sheet and address could change row by row, IMHO, need
to evaluate each book, sheet and address reference. (yuck!)

Any suggestions gratefully appreciated.

Thanks in advance,

David Copp








 
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
can you change the default paste method? (paste values) David A Brown Excel Discussion (Misc queries) 3 December 18th 07 09:59 AM
Which method is faster matpoh Excel Discussion (Misc queries) 2 October 21st 05 03:12 PM
Can faster CPU+larger/faster RAM significantly speed up recalulati jmk_li Excel Discussion (Misc queries) 2 September 28th 05 10:24 AM
a faster method in changing cell value? Nick Excel Programming 7 August 17th 04 04:05 PM
Which method is faster? Layman Excel Programming 1 February 27th 04 05:22 PM


All times are GMT +1. The time now is 01:24 PM.

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

About Us

"It's about Microsoft Excel"