+ Reply to Thread
Results 1 to 3 of 3

Vlookup with arrays and dictionary

  1. #1
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Vlookup with arrays and dictionary

    Hi all,
    I have one code, it works fine, but I have a feeling, that it can be improved/optimized somehow.
    Will appreciate all your comments/recommendations/hates/likes
    Tried to comment code as much as possible.
    Basically - it is a alternative to vlookup() function that works fast on large data sets.

    Form code:
    Please Login or Register  to view this content.

    Module code:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Vlookup with arrays and dictionary

    What is giving you this "feeling" your code needs to be changed. In what way is it failing you?
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Vlookup with arrays and dictionary

    For example I use many arrays: 1) Array with data to look in; 2) Array with values that should be matched to Array#1; 3) Array with results; 4) dictionary
    I tested it on 500k records, it works fine. On more records excel is Not responding for a while, but it still works. I'm afraid that one day this code will show me "Stack Overflow" )
    What I was looking for - some unusual solution, some recommendations to optimize my code.
    Right now code is quite straight forward: take data - load to array, loop, search, return.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Join 3 arrays/arraylist/ranges and pass them to dictionary
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2018, 07:49 AM
  2. Speed up vlookup with Scripting.Dictionary
    By dondada82 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-19-2017, 04:06 PM
  3. Scripting Dictionary (working as vlookup) and add calculated columns
    By mumsys in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2016, 04:49 AM
  4. [SOLVED] Dictionary or Scripting.Dictionary. Binding Referencing Dim-ing. Sub routines and Function
    By Doc.AElstein in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 07-12-2016, 08:28 AM
  5. [SOLVED] Comparing Arrays: What are tradeoffs b/w using a Dictionary vs a nested For-Each loops?
    By joe31623 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2016, 01:29 PM
  6. Dictionary - Using a dictionary of dictionaries to hold individual orders
    By wazimu13 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2015, 08:32 PM
  7. [SOLVED] Trying to search for list of strings using Arrays,Scripting Dictionary or FileSystemObject
    By downtown1933 in forum Excel Programming / VBA / Macros
    Replies: 42
    Last Post: 10-01-2013, 04:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1