+ Reply to Thread
Results 1 to 5 of 5

What to use as a key in a Dictionary

  1. #1
    Registered User
    Join Date
    08-30-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    30

    What to use as a key in a Dictionary

    Hi

    I've just started trying to understand Collections and Dictionaries. My question is;

    If I had 50 thousand employees names and I wanted them in a Dictionary, with no unique key like a Dictionary requires. How would I go about assigning a unique key to them soo I could put them in a Dictionary rather than a Collection?

    Thanks

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: What to use as a key in a Dictionary

    no unique key
    So how you can manage each of them in the database ???
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    08-30-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: What to use as a key in a Dictionary

    In a database I would add it as an autonumber and set to a primary key.

  4. #4
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: What to use as a key in a Dictionary

    I am having trouble understanding what you are trying to do. Are you saying you have 50,000 names and that is it... no other associated data with them? If so, what is your ultimate goal for these names? To me, a simple array might seem like the proper vehicle for them. By the way, where are these 50,000 names located at... on a worksheet, in a text file, somewhere else?

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: What to use as a key in a Dictionary

    Among 50,000 names, there are surely duplicates, but each has a unique employee ID.
    Entia non sunt multiplicanda sine necessitate

+ 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. Why dictionary very slow ,is dictionary have maksimum data
    By daboho in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-30-2018, 03:57 PM
  2. Adding dictionary into dictionary and retrieving data
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-08-2018, 06:52 AM
  3. [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
  4. [SOLVED] How to compare keys in one dictionary to keys in another dictionary
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2015, 02:27 PM
  5. Storing a Dictionary into a Dictionary Object
    By pago_boss in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-16-2015, 03:04 AM
  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. vba dictionary
    By kieranbop in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2011, 06:06 AM

Tags for this Thread

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