+ Reply to Thread
Results 1 to 12 of 12

for each and value in dictionary and transper to array

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

    for each and value in dictionary and transper to array

    i have data i columns(1) i want resume count unique and take unique this is my code
    first code "code_one" run is well but not run if tranpser to array
    second code "code two" not run
    what is problem with my coding

    Please Login or Register  to view this content.
    this code is run but not run if transper to array

    second coding is not run
    Please Login or Register  to view this content.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: for each and value in dictionary and transper to array

    If you use a Function you can have it return the answer as a variant

    Please Login or Register  to view this content.

    the code to write

    Please Login or Register  to view this content.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: for each and value in dictionary and transper to array

    or maybe so
    Please Login or Register  to view this content.

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

    Re: for each and value in dictionary and transper to array

    Thank nilem
    How update this code
    If in col a ,i want take unique and i col c,d,e take value acording row unique in col a
    Example
    Col
    a. b. c. d. e.
    jhon 1. 2. 3. 4
    jhon. aa. Bb. Cc. Dd
    alex. zz. ss. Jj. Cf
    I want copy to new sheet only unique in col a
    jhon. aa. Bb. Cc. Dd
    alex. zz. ss. Jj. Cf

  5. #5
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: for each and value in dictionary and transper to array

    something like this (it would be better to see an example of your file)
    Please Login or Register  to view this content.

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

    Re: for each and value in dictionary and transper to array

    Thankyou nilem great job
    I want ask
    What different
    .item(x(i,1))= rw
    With
    rw=.item(x(i,1))
    This is same as or different thank nilem

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

    Re: for each and value in dictionary and transper to array

    Thank kabellah

  8. #8
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: for each and value in dictionary and transper to array

    rw=.item(x(i,1)) - The element .item(x(i,1)) transfers its value to the variable rw
    .item(x(i,1))= rw - the variable rw passes its value to the element .item(x(i,1))

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

    Re: for each and value in dictionary and transper to array

    Thank you very match nilem
    Next time i want ask you again

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

    Re: for each and value in dictionary and transper to array

    nilem i has learn your makro but confiuse little line in this bellow abaut rw
    Example in A1.value = item1
    a2= item1,a3=item1,a4=item2,a5,item2
    Please Login or Register  to view this content.
    Last edited by daboho; 01-21-2018 at 08:23 AM.

  11. #11
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: for each and value in dictionary and transper to array

    Hi daboho,
    I tried to comment the lines of code
    Please Login or Register  to view this content.
    see also here

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

    Re: for each and value in dictionary and transper to array

    Ok thankyou brother nilem
    I has read and learn blog cnb
    I has learn all your file "ertert"
    But in this moment still confiuse
    Union array and dictionary
    But i has thank very match to your explain
    Thank you nilem,i hope you not boring explain me abaut array
    Regard daboho

+ 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. Help to adjust code for nested dictionary to array
    By max138 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2017, 05:40 AM
  2. [SOLVED] Adjusting the Array used with Scripting Dictionary?
    By nobodyukno in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-17-2017, 09:25 AM
  3. # want to know VBA different as colekction,as array and as dictionary#
    By daboho in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 12-24-2016, 12:08 PM
  4. 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
  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