+ Reply to Thread
Results 1 to 6 of 6

Repeating quads,triples etc

  1. #1
    Registered User
    Join Date
    10-04-2012
    Location
    Lucky Springs
    MS-Off Ver
    Excel 2003
    Posts
    3

    Repeating quads,triples etc

    Dear Forum's Members, I have 10 columns of numbers that range between 1 through 80, as shown in example below.

    Can anyone give me some tips on creating a VBA script that will scan rows of the data shown above and identify for me the rows where number triples, quads, etc (up to 10 numbers) repeat? I would like the script to seek out number matches that are in the any order.

    For example

    1 5 2 3 4 6 7 8 9 10

    and

    1 3 4 2 5 11 12 13 14 15

    and

    7 8 9 10 24 25 12 14 13 15 11

    five numbers repeated - 1 2 3 4 5
    five numbers repeated - 11 12 13 14 15
    four numbers repeated - 7 8 9 10

    Thanks!

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Repeating quads,triples etc

    Are the numbers in a row stored in one cell or in multiple cells?

    Why do you have 2 lines for this - five numbers repeated - 1 2 3 4 5
    five numbers repeated - 11 12 13 14 15
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    10-04-2012
    Location
    Lucky Springs
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Repeating quads,triples etc

    Thanks for your reply!

    Quote Originally Posted by arlu1201 View Post
    Are the numbers in a row stored in one cell or in multiple cells?
    Yes. Each number in a row stored in one cell from B to K

    Quote Originally Posted by arlu1201 View Post
    Why do you have 2 lines for this - five numbers repeated - 1 2 3 4 5
    five numbers repeated - 11 12 13 14 15
    1 5 2 3 4 6 7 8 9 10
    1 3 4 2 5 11 12 13 14 15
    7 8 9 10 24 25 12 14 13 15 11

    five numbers repeated - 1 2 3 4 5
    five numbers repeated - 11 12 13 14 15
    four numbers repeated - 7 8 9 10

    And also

    1 5 2 3 4 6 7 8 9 10
    1 3 4 2 5 11 12 13 14 15
    7 8 9 10 24 25 12 14 13 15 11

    and so on

    moreover there is a lot of triples and quads

    so what I need is all possible repeated combinations from 3 to 10 numbers (if they exist)

    above is just an example, I've a data with thousands rows of numbers

    thanks!
    Last edited by JonathanLucky; 10-11-2012 at 12:26 PM.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Repeating quads,triples etc

    Ok,

    My question is cant five numbers repeated - 1 2 3 4 5
    five numbers repeated - 11 12 13 14 15
    be output as five numbers repeated - 1 2 3 4 5 11 12 13 14 15

  5. #5
    Registered User
    Join Date
    10-04-2012
    Location
    Lucky Springs
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Repeating quads,triples etc

    I don't quite see what you mean. Could you clarify what you mean, please?

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Repeating quads,triples etc

    Oops sorry i confused myself.

+ 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