+ Reply to Thread
Results 1 to 12 of 12

how to make combination of data on the basis of sample data set

  1. #1
    Registered User
    Join Date
    08-23-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    26

    how to make combination of data on the basis of sample data set

    Hi,

    I am having a data set which contain 10 different unique name in one column. I would like to make a combination of names on the basis of avilabe sample data. If I define to make a combination of two like 1-2,1-3,1-4, ...1-10,2-3,2-4......,2-10, 3-4,3-5....,3-10 ,9-10 or three like 123, 124, 125...1210 similarly 134..1310 or four, five, six,seven, eight, nine. In this way, I have make a combination between thousand of data.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: how to make combination of data on the basis of sample data set

    do you mean that in your example you now have 10 names, but later that 'll be thousand ?
    you have to know 10 names by pair gives 10!/8!/2! = 45 combinations , 1000, that's 1000!/998!/2! = infinite.
    Otherwise, it's not that difficult to program, but it's better to know before I start.
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    08-23-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: how to make combination of data on the basis of sample data set

    Quote Originally Posted by bsalv View Post
    do you mean that in your example you now have 10 names, but later that 'll be thousand ?
    you have to know 10 names by pair gives 10!/8!/2! = 45 combinations , 1000, that's 1000!/998!/2! = infinite.
    Otherwise, it's not that difficult to program, but it's better to know before I start.
    Yea, Exactly 10 names by pair gives 45. But I am having 200 names in one file and have to do calculation several files. Here one more line I would like to add. I am interested to know about combination of two, three, four and so on.

  4. #4
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: how to make combination of data on the basis of sample data set

    i hope you don't do this with 200 names !!!
    I suppose next question is "give me 100 unique combinations of 10 names from those 200 names".
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-23-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: how to make combination of data on the basis of sample data set

    Dear Bsalv,

    Thankyou very much for your kind of support and really it is worthful for me. You know Actually it is working but not working with my dataset.

    Simply Name1 (5 character, refered in example) = 600 character (Its a biological data with combination of AGCT, my dataset) and approximetely 4704 name (or data set) is with me. For demo purpose when I replaced existing 16 name with my 16 different data set (Each cell is having <=500 character), I got an error like "Run time error '13' in same error screen in second line msg like "Type mismatch" is printed.

    I really appreciate if you will be shortout this. If required I love to share my sample data set.

  6. #6
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: how to make combination of data on the basis of sample data set

    you are working with DNA-sequenses ?
    You get that error as soon as the text > 255 long, so that's immediately in your case.
    Suppose, you have your 4.704 names of max. 500 characters. What do you want to do with it now ?
    Perhaps, it's better to share you sample data set and (a part of) the desired result.

  7. #7
    Registered User
    Join Date
    08-23-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: how to make combination of data on the basis of sample data set

    Yes, I am working with DNA sequence and Sample data is attached with it. Is it possible for you to avoid the maximum length of the name. But any way I have mentioned the maximum length of the name in sample data sheet also.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: how to make combination of data on the basis of sample data set

    same macro, but the export is cell by cell instead of the whole dictionary in once.
    As your strings are so long, it seems like the empty cells (cells with with background) aren't empty, but if you move your cursor to those cells, you'll see they are empty. Only the grey cells have values !
    Attached Files Attached Files
    Last edited by bsalv; 02-04-2014 at 02:32 AM.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: how to make combination of data on the basis of sample data set

    There's a workbook that will do this at https://app.box.com/s/b9b9fc06beb63b9562f9
    Entia non sunt multiplicanda sine necessitate

  10. #10
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: how to make combination of data on the basis of sample data set

    @shg
    That's a nice workbook but
    - in some cases, the number of combinations 'll be greater then the number of rows in a worksheet (>1.000.000).
    - the length of the names is also a problem to show.

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: how to make combination of data on the basis of sample data set

    I can think of no useful application for listing more than a million of anything, nor is it germane to the stated problem.

    I don't understand the issue about the length of names.
    Last edited by shg; 02-04-2014 at 02:58 AM.

  12. #12
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: how to make combination of data on the basis of sample data set

    I don't understand the issue about the length of names.
    The names are DNA-sequences and have a length of >500 (some are 3.000 long) and there are 4.700 names.
    I did the programming, I don't know how the TS is going to use it.

+ 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. Filter data on color basis
    By ROHAN999 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-30-2013, 12:35 PM
  2. Replies: 1
    Last Post: 03-21-2013, 10:45 PM
  3. data arengement... need help on urgent basis....
    By amruta_shah15 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-25-2012, 12:01 AM
  4. Split data on basis of cell value
    By ashishashish8 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2011, 02:53 AM
  5. Cut Paste data basis criteria
    By shahcu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-31-2008, 02:22 PM

Tags for this Thread

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