Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Faster way to do this?

I periodically extract data from report files to populate a worksheet.
Every week or so, I rerun this to create an updated workbook. It's starting
to get rather large - each update adds a few more new rows. My problem is
that the data in any row can change from the previous workbook.

I can check for changes by comparing the values of certain cells between the
workbooks. Right now, the method I'm thinking of would look like:
For Each cell in Book1ColA
Get Book1ColA Value
Get Book1ColA Row#
Find Book1ColA Value in Book2ColA
Get Book2ColA Row#
If Value Book1ColC Row# < Value Book2ColC Row# Then
MsgBox or something
End If
Next cell

Is there a faster way to accomplish this, versus iterating through every
cell in the column?

Ed


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Faster way to do this?

Ed,
I don't think there is a faster approach than comparing each cell;
however, you can make the comparison (much) faster by reading the data
(ranges) into arrays and comparing the arrays rather than looping through
the ranges.

HTH

"Ed" wrote:

I periodically extract data from report files to populate a worksheet.
Every week or so, I rerun this to create an updated workbook. It's starting
to get rather large - each update adds a few more new rows. My problem is
that the data in any row can change from the previous workbook.

I can check for changes by comparing the values of certain cells between the
workbooks. Right now, the method I'm thinking of would look like:
For Each cell in Book1ColA
Get Book1ColA Value
Get Book1ColA Row#
Find Book1ColA Value in Book2ColA
Get Book2ColA Row#
If Value Book1ColC Row# < Value Book2ColC Row# Then
MsgBox or something
End If
Next cell

Is there a faster way to accomplish this, versus iterating through every
cell in the column?

Ed



Reply
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 this be done faster? Frank Excel Discussion (Misc queries) 7 August 9th 07 10:02 PM
Can faster CPU+larger/faster RAM significantly speed up recalulati jmk_li Excel Discussion (Misc queries) 2 September 28th 05 10:24 AM
better/faster way than sum products? alex Excel Worksheet Functions 2 November 17th 04 10:56 AM
Is there a faster way Jim May Excel Programming 3 September 19th 04 04:42 AM
Which one is faster? Syed Zeeshan Haider[_4_] Excel Programming 14 December 4th 03 05:28 PM


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