Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Which is faster... or better programming

I was wondering which method people would recommend to do teh following.

There are two workbooks Old.xls and New.xls. I need to compare the
value/string in each cell in Column A in Old.xls with the cells in Column A
in New.xls. When matched then the value in Column I in Old.xls must be added
to the value in the corresponding row in Column I in New.xls

So...is it better to do row by row comparison and a single addition between
workbooks?

Or should I create an array from the Old.xls with just Column A and Column I
and then do the comparison and addition?

Or should I create ranges of Column A in the New.xls and do the comparison
with an Intersect function?

Or...?

There are always better ways to do things and I would like to see what
others have experienced.

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Which is faster... or better programming

Not sure if it is the fastest but my approach would be to put ColA New and
ColA Old into an array, scan the array for differences and write a new colI
value where the same. I experience faster response than reading each row in
directly from the sheet.

--
Cheers
Nigel



"Glen" wrote in message
...
I was wondering which method people would recommend to do teh following.

There are two workbooks Old.xls and New.xls. I need to compare the
value/string in each cell in Column A in Old.xls with the cells in Column
A
in New.xls. When matched then the value in Column I in Old.xls must be
added
to the value in the corresponding row in Column I in New.xls

So...is it better to do row by row comparison and a single addition
between
workbooks?

Or should I create an array from the Old.xls with just Column A and Column
I
and then do the comparison and addition?

Or should I create ranges of Column A in the New.xls and do the comparison
with an Intersect function?

Or...?

There are always better ways to do things and I would like to see what
others have experienced.

thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Which is faster... or better programming

Seconded.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Nigel" wrote in message
...
Not sure if it is the fastest but my approach would be to put ColA New and
ColA Old into an array, scan the array for differences and write a new

colI
value where the same. I experience faster response than reading each row

in
directly from the sheet.

--
Cheers
Nigel



"Glen" wrote in message
...
I was wondering which method people would recommend to do teh following.

There are two workbooks Old.xls and New.xls. I need to compare the
value/string in each cell in Column A in Old.xls with the cells in

Column
A
in New.xls. When matched then the value in Column I in Old.xls must be
added
to the value in the corresponding row in Column I in New.xls

So...is it better to do row by row comparison and a single addition
between
workbooks?

Or should I create an array from the Old.xls with just Column A and

Column
I
and then do the comparison and addition?

Or should I create ranges of Column A in the New.xls and do the

comparison
with an Intersect function?

Or...?

There are always better ways to do things and I would like to see what
others have experienced.

thanks





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
Help to run faster Esau[_3_] Excel Programming 3 July 29th 06 09:00 PM
Faster way to do this? Ed Excel Programming 1 November 14th 05 04:27 PM
Can faster CPU+larger/faster RAM significantly speed up recalulati jmk_li Excel Discussion (Misc queries) 2 September 28th 05 10:24 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 01:36 AM.

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"