+ Reply to Thread
Results 1 to 6 of 6

Script Dictionary Not Matching

  1. #1
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Script Dictionary Not Matching

    Good Day,

    I'm learning (experimenting) with the Script Dictionary, but I'm unable to use the Exists Method (probably the way I want it to work). I'm using the script dictionary like a lookup, but script dictionary is not giving me unique items, and it is not indicating the items exist in the dictionary.

    Sheet1 collects the items for the script dictionary, and Sheet2 should give me the result after running the macro.

    I've uploaded a file with the test data.

    I'd appreciate your help assisting me in understanding this area of VBA.

    Thanks,
    Xrull
    Attached Files Attached Files
    Last edited by Xrull; 06-18-2011 at 12:08 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,621

    Re: Script Dictionary Not Matching

    Not sure what it is you're trying to do but maybe:

    Please Login or Register  to view this content.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Re: Script Dictionary Not Matching

    TM Shucks,
    I'm try to use the script dictionary to match each name on Sheet2 with a Information from Sheet1, and place it in column B of Sheet2. I'm trying to use the script dictionary instead of a vlookup.
    I'll be tinkering with your code (save me from myself!).
    I've tried this, but it doesn't work
    Please Login or Register  to view this content.
    Thanks,
    Xrull
    Last edited by Xrull; 06-17-2011 at 08:14 PM.

  4. #4
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Re: Script Dictionary Not Matching (vlookup)

    Good Day,
    Bumped.

    I'm still experimenting:
    This works.
    Please Login or Register  to view this content.
    This does not:
    Please Login or Register  to view this content.
    What am I doing wrong?
    Thanks,
    Xrull

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Script Dictionary Not Matching

    Try this:-
    You need to lop through both ranges to compare them !!

    Please Login or Register  to view this content.
    Regards Mick

  6. #6
    Forum Contributor
    Join Date
    07-29-2008
    Location
    New York
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    145

    Re: Script Dictionary Not Matching

    MickG,
    I didn't know I had to use an array and then loop through.
    Well, everyday you live and learn. I'm adding to my repertoire (add 1 lose 2; that what happens when you get old).
    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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