+ Reply to Thread
Results 1 to 17 of 17

# want to know VBA different as colekction,as array and as dictionary#

  1. #1
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241

    Thumbs up # want to know VBA different as colekction,as array and as dictionary#

    i have problem to use array,as new colekction,and as dictionari
    in example file i want to know union name with result 72
    how to calkulasi grup Objek in
    1.array
    2.colekction
    3.as dictionari

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: # want to know VBA different as colekction,as array and as dictionary#

    That's quite a lot to explain in single post.

    And I'm not clear what you mean by following in your workbook.
    How to input name in col B ,if result Col B.offset(,1) = 72 in col E (name) and result Skor in Col F
    Do you mean that you want to iterate through combination of Scor that will add up to 72? And output name combination and score in D3 & F3 down?

    Also, see link for pretty detailed explanation on array, dictionary and other data structures.
    http://analystcave.com/excel-vba-dic...ta-structures/

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: # want to know VBA different as colekction,as array and as dictionary#

    Hi,

    Does the attached give you any help
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241

    Re: # want to know VBA different as colekction,as array and as dictionary#

    ck76 yes its right how i can do with array vba

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: # want to know VBA different as colekction,as array and as dictionary#

    Is order of Name important?

    I mean do you consider A1+A2 same as A2+A1 or should it be considered separate result?

  6. #6
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241

    Re: # want to know VBA different as colekction,as array and as dictionary#

    results of formula after run vba

  7. #7
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: # want to know VBA different as colekction,as array and as dictionary#

    results of formula after run vba
    Hm? You didn't answer my question... but here's sample using array & dictionary in conjunction. Assuming A1+A2 and A2+A1 is considered to be same combo.

    And assuming only 2 number addition is considered...

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

  8. #8
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241

    Re: # want to know VBA different as colekction,as array and as dictionary#

    CK76
    i want ask you if i dictionari to copi paste with criteria 72
    is dictionari to run copi paste

    is dictionary can run result as formula in F3.formula = "=C2+C3" etc
    Last edited by daboho; 12-23-2016 at 05:57 PM.

  9. #9
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: # want to know VBA different as colekction,as array and as dictionary#

    Sure. Just change code to...
    Please Login or Register  to view this content.

  10. #10
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241

    Re: # want to know VBA different as colekction,as array and as dictionary#

    CK76 veri interisting ,but is dict can do copi paste by exist referensi in col E****.png
    is dict can do funtion like vlookup,or copi cell by referensi in col E ,and paste result in col F

  11. #11
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241

    Re: # want to know VBA different as colekction,as array and as dictionary#

    i want know how if dict can run copi,function like find (dict() etc is posible ?
    Last edited by daboho; 12-23-2016 at 10:05 PM.

  12. #12
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: # want to know VBA different as colekction,as array and as dictionary#

    I'm sorry but I'm having really hard time understanding what you are asking. Can you demonstrate step by step in the workbook?

  13. #13
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241

    Re: # want to know VBA different as colekction,as array and as dictionary#

    if col E (referenci) Contain : E3 = A1,E5= A2,E7 = A5,E14 =A8
    if in formula excel in F3 =vlookup(A3,B2:C9,2,0)

    is vba dictionari can do it

  14. #14
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241

    Re: # want to know VBA different as colekction,as array and as dictionary#

    if col E (referenci) Contain : E3 = A1,E5= A2,E7 = A5,E14 =A8
    if in formula excel in F3 =vlookup(A3,B2:C9,2,0)

    is vba dictionari can do it

  15. #15
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,241

    Re: # want to know VBA different as colekction,as array and as dictionary#

    dict2.png
    is dict search criteria in col E and Value in Col F
    if col E & i =B & i then
    F & i = C & i
    how to do with array or dict
    Last edited by daboho; 12-24-2016 at 07:39 AM.

  16. #16
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: # want to know VBA different as colekction,as array and as dictionary#

    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  17. #17
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: # want to know VBA different as colekction,as array and as dictionary#

    @daboho

    Ok so you are asking for VLOOKUP operation. That's quite a departure from your original question.

    See link for how it's done. (See What about VBA? section)
    http://analystcave.com/excel-vlookup...l-performance/

    FYI - For small range you'd really have no benefit from it. I only use that type of code when there's about 400k rows and when Query/ADODB isn't suitable for one reason or another.
    Last edited by CK76; 12-24-2016 at 12:10 PM. Reason: Typo

+ 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] Macro to write dictionary keys to array not working
    By capson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-07-2015, 05:21 PM
  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. How to handle the content of a Dictionary to store it in an array
    By cgkmal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2014, 08:52 PM
  4. Moving dictionary items to an 2D array that can be placed into worksheet quickly
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-22-2014, 01:21 PM
  5. help assigning elements of dictionary to array and then pasting array into worksheet
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-05-2013, 10:37 AM
  6. [SOLVED] Putting a dynamic array in a dictionary
    By wizuriel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2013, 04:10 PM
  7. 2 Dimentional Array as Dictionary Item
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-05-2011, 11:13 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