Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Rani Singh   on Dec 12 In MS Office Category.

  
Question Answered By: Binge Fischer   on Dec 12

Something else you may want to consider (since we're learning new
approaches here).

I've got a case where I have nearly 20,000 rows (ok, it's only
19,687) and have to lookup values from a report that contains over
70,000 rows.
Now, back when the table I'm reading from was only 60,000 rows, I
used Vlookups. The calculate function  at times took several minutes.
On top of that, I had to add a column to the table that concatenated
two cells in each row (requisition and item number) so that I then
could concatenate the same fields in the Data table for the vlookup.

With the help of a friend, I discovered the wonder of the Dictionary.
CreateObject("Scripting.Dictionary")

Let's say, I needed to Look Up three different columns.
I first created three Dictionaries, read in the data and load the
dictionaries using the requisition & item Number as the key field.

Then instead of a vlookup, I just look up the entry in the dictionary.

This made my overall report generation time go from 43 minutes down
to 14 !!!

Just something to think about...

Share: