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: 34
Default Using an Array instead of a Vlookup to improve speed

I have an two dimensional array (MyArray) that describes 5000 invoices.

MyArray(i, 1) is the PRODUCT
MyArray(i, 2) is the VOLUME
MyArray(i, 3) is the REVENUE
MyArray(i, 4) is the TYPE

I am using Application.Vlookup to lookup the PRODUCT in a named range on a
worksheet to see if this is a product I sold in the previous period. If the
Vlookup is successful, I put "Existing Product" in MyArray(i, 4). If the
vlookup returns an error (using FALSE as the last argument), then I put "New
Product" in MyArray(i, 4).

The Application.Vlookup is a bit slow. Can someone point me to a VBA
example where the author wrote the target range into a second Array and then
used a For Next loop to perform the same basic logic as the vlookup would?

Thanks,

Frank Hayes


 
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
Trying to improve efficiency of array formula Anthony[_4_] Excel Worksheet Functions 8 November 25th 08 10:23 AM
Improve speed of saving a large Excel file Elmer Excel Discussion (Misc queries) 3 February 5th 07 07:15 AM
Speed up performance for very big array Cool Sport Excel Programming 10 December 15th 04 09:53 AM
How can I Improve query speed? John[_60_] Excel Programming 5 October 12th 04 01:00 PM
Howto Improve speed? Andy Excel Programming 0 January 19th 04 04:39 PM


All times are GMT +1. The time now is 11:44 PM.

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"