+ Reply to Thread
Results 1 to 16 of 16

Scripting Dictionary

  1. #1
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Scripting Dictionary

    Hi gurus,

    I am really little confused on this scripting dictionary.

    I had a merely 10k rows on my original file but I only attached a sample file.

    Can anyone help me on how to get the result like on the attached file using scripting dictionary or it can be done on more easier way?

    I want to find the unique name and count of unique date per name.

    Thanks in advance,
    thisisgerald
    Attached Files Attached Files
    Don't forget to mark your thread as [SOLVED].

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Scripting Dictionary

    Pivot Table does faster and easier than dictionary.

  3. #3
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Scripting Dictionary

    @AB33

    When I tried to create a pivot table, it count all the dates not only the unique date per name.
    Is there a way to make it unique count on pivot table without filtering the unique value first?

    Thanks,
    thisisgerald

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Scripting Dictionary

    Soory! Not I know

  5. #5
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Scripting Dictionary

    Based on your example file:

    Please Login or Register  to view this content.
    Let me know if you have any questions.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  6. #6
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Scripting Dictionary

    Maybe like this?
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Scripting Dictionary

    abousetta! The pipe separator is still on cells

  8. #8
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Scripting Dictionary

    If the pipes are in column F then

    Please Login or Register  to view this content.
    should be spreading the date over columns F:G.

    abousetta

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Scripting Dictionary

    abousetta,
    The number of unique days are also wrong. Your code counts the number of days in collumn "C" for every key, but the OP wishes unique dates only

  10. #10
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Scripting Dictionary

    An updated version that checks unique names, ids and dates from columns A:C and outputs to columns F:I

    Please Login or Register  to view this content.
    abousetta

    P.S. @AB33, if you don't know the answer then maybe leave this between the OP and person helping.

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Scripting Dictionary

    No, Why should I? You can simply ignore my question (Post) if you do not want to answer it.

  12. #12
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Scripting Dictionary

    breathe in, hold, breathe out, relax

    let's all get along please. all contributions are welcome-including observations of issues with suggested code (as long as they are well presented, as here)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  13. #13
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Scripting Dictionary

    Jay,
    My post and comment were not intending to question abousetta's ability or skill, it is just purely to learn from his code and had not other motives. I have only highlighed the code is not working as per OP's request.

  14. #14
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Scripting Dictionary

    I know-I did not criticize your posts [other than that last one ;-)]

  15. #15
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Scripting Dictionary

    We all make mistakes, and I will be the first to admit that I make more mistakes than most. That's how we learn. I have no problem having my mistakes pointed out to me. In the end, it's all about presentation. If I feel that I am being attacked then obviously I will fight back, else I will be happy to correct the mistake even if it's really just a misunderstanding rather than a true mistake.

  16. #16
    Forum Contributor
    Join Date
    09-05-2012
    Location
    It's more fun in the Philippines :D
    MS-Off Ver
    Excel 2007
    Posts
    209

    Re: Scripting Dictionary

    @kyle
    Thanks for the suggestion. I'm planning not to add other column to my raw data.

    @abousetta
    Thanks for the effort. However, it does not fit what I'm looking for.

    I'm just gonna loop all the records to find the count of unique dates per name. :D

    Sorry about what just happened here.

    Warm Regards,
    thisisgerald

+ 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