+ Reply to Thread
Results 1 to 28 of 28

Macro to separate trios with different digits

  1. #1
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Macro to separate trios with different digits

    02 03 15 = no, there are two zeros
    12.15,35 = no, it has 1.5 doubles
    In other words, the trios have 6 different digits
    Example = 02,15,38 = 0,1,2,3,5,8 = there is no digit repetition
    Two possible digits from 0 to 9 please

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,553

    Re: Macro to separate trios with different digits

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    hello.Jindon is giving a false message

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,553

    Re: Macro to separate trios with different digits

    False mans not unique, True = Unique

  5. #5
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    01 02 03 02 31
    01 02 04 ?
    01 02 05
    01 02 06
    01 02 07
    01 02 08
    01 02 09
    01 02 10
    01 02 11
    01 02 12
    01 02 13
    01 02 14
    01 02 15
    01 02 16
    01 02 17
    01 02 18
    01 02 19
    01 02 20
    01 02 21
    01 02 22
    01 02 23
    01 02 24
    01 02 25
    01 02 26
    01 02 27
    01 02 28
    01 02 29

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,553

    Re: Macro to separate trios with different digits

    ?....................

  7. #7
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    corret sorry
    01 02 03 02 31 45
    01 02 04 ?
    01 02 05
    01 02 06
    01 02 07
    01 02 08
    01 02 09
    01 02 10
    01 02 11
    01 02 12
    01 02 13
    01 02 14
    01 02 15
    01 02 16
    01 02 17
    01 02 18
    01 02 19
    01 02 20
    01 02 21
    01 02 22
    01 02 23
    01 02 24
    01 02 25

  8. #8
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    I have a list of 82 thousand trios. The macro has to separate in a list next to only trios
    Formed with six different digits.

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,553

    Re: Macro to separate trios with different digits

    Quote Originally Posted by jorel View Post
    02 03 15 = no, there are two zeros
    12.15,35 = no, it has 1.5 doubles
    In other words, the trios have 6 different digits
    Example = 02,15,38 = 0,1,2,3,5,8 = there is no digit repetition
    Two possible digits from 0 to 9 please
    ...................

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,553

    Re: Macro to separate trios with different digits

    Upload a sample workbook with data/desired result.

  11. #11
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits


  12. #12
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits


  13. #13
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits


  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,553

    Re: Macro to separate trios with different digits

    Sorry, but no idea about what you are trying to do.

    Wait someone else to comes in...

  15. #15
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    I simply need to separate the triads without repeating digits from a given list

  16. #16
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Macro to separate trios with different digits

    Based on file on post #13 (mediafire) :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  17. #17
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    hello, KAREDOG perfect conglatulations
    thank you!!!

  18. #18
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    Karedog the list is larger than 82500 trios
    Macro does not
    I did not put it on the flat because of the size

  19. #19
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    ReDim b(0 To 9)
    For j = 1 To 3
    k = CLng(Left$(a(i, j), 1)): b(k) = b(k) + 1
    k = CLng(Right$(a(i, j), 1)): b(k) = b(k) + 1
    Next j

  20. #20
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Macro to separate trios with different digits

    I don't see a problem with 82500 items.
    Please upload the workbook (you can upload it to mediafire, because there is file size limitation here in excelforum).

  21. #21
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits


  22. #22
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Macro to separate trios with different digits

    Jorel, I have downloaded the file and run the macro. It is run very well on my computer, no error and gives expected result.
    Attached Files Attached Files

  23. #23
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    Karedog== 05 16 28 ??? ........

  24. #24
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    02 43 79???

  25. #25
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    Makro has swept the whole list is logical !! You have to do all the list and do not start by example.

  26. #26
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Macro to separate trios with different digits

    I have found the culprit, it is caused by Excel automatic data conversion, changing string like "03" into numeric "3" (discard the zero).
    Please add the red line code :

    Please Login or Register  to view this content.

  27. #27
    Forum Contributor
    Join Date
    11-29-2014
    Location
    brasil
    MS-Off Ver
    excel 2016
    Posts
    2,177

    Re: Macro to separate trios with different digits

    Dim a, i As Long, j As Long, k As Long, p As Long, t As Long
    a = Range("A4:C" & Cells(Rows.Count, "A").End(xlUp).Row).Value

  28. #28
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Macro to separate trios with different digits

    Quote Originally Posted by jorel View Post
    Dim a, i As Long, j As Long, k As Long, p As Long, t As Long
    a = Range("A4:C" & Cells(Rows.Count, "A").End(xlUp).Row).Value
    No, no problem here.
    Please make sure you select the working sheet first (sheet "Planilha1") before running the macro.

+ 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. separate formations with duplicate digits, please
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-25-2016, 05:08 PM
  2. digits trios
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2015, 09:34 AM
  3. Separate trios without repeating digits of a draw. Please Help, Urgent,
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2014, 09:08 PM
  4. trios 6 digits
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2014, 06:15 PM
  5. [SOLVED] Separate Numbers into Digits^3
    By Sam9530130 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-23-2012, 11:36 AM
  6. separate-out digits from numbers
    By stewart08 in forum Excel General
    Replies: 3
    Last Post: 01-28-2010, 10:12 AM
  7. Replies: 4
    Last Post: 01-13-2006, 09:55 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