Results 1 to 22 of 22

Scripting.Dictionary Code Returning Incorrect Results

Threaded View

  1. #1
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Scripting.Dictionary Code Returning Incorrect Results

    Hi,

    I am trying out this code on the attached file -

    Sub ScrpDict()
    
        Dim Dict As Scripting.Dictionary, R As Variant
        Set Dict = New Scripting.Dictionary
        
        With Dict
            For Each R In Range("A2:A17")
                If R <> "" Then .Item(R) = Empty
            Next R
            MsgBox .Count
        End With
        
    End Sub
    However, even when I am using the .Item() property, it is still not returning unique values.

    I want to get the unique values on the D Column..
    Attached Files Attached Files
    Cheers!
    Deep Dave

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA Scripting.Dictionary Code Late Binding Error
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 07-20-2015, 03:06 AM
  2. Cant get data to populate in VBA code from array & scripting dictionary
    By leanne2011 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-25-2015, 04:38 AM
  3. need help with scripting dictionary
    By leanne2011 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 10-04-2014, 04:33 PM
  4. Sum function returning incorrect results
    By Elena.P in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2013, 01:26 PM
  5. [SOLVED] Scripting Dictionary help
    By williams485 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-13-2012, 08:22 AM
  6. [SOLVED] VLOOKUP returning incorrect results
    By Jennsy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-01-2012, 03:08 PM
  7. Replies: 6
    Last Post: 04-05-2011, 09:27 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