+ Reply to Thread
Results 1 to 12 of 12

Generate every iteration of possible quotients for each row variable

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    14

    Generate every iteration of possible quotients for each row variable

    Hello,

    I'm not sure if this is best done with a formula or in VBA, but I'm trying to create every possible combination of ratios for a series of data. The ratio would be comparing each individual row to one another and restricted to the column. I may not be explaining this the best, so I've attached an excel file that has a representation of what current data would look like, and the target result. It seems I just need some sort of looping variable in there, but I have no experience with this. Thank you so much for any and all help!

    Ryan
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Generate every iteration of possible quotients for each row variable

    You will need three loops.

    In Pseudo code what you need is:-

    1. Count Columns Of Data

    2. Count Rows of Data

    3. Start Columns Loop
    Please Login or Register  to view this content.
    4. Start First Row Loop
    Please Login or Register  to view this content.
    5. StartSecond Row Loop
    Please Login or Register  to view this content.
    6. Calculate and Save Your Text
    Please Login or Register  to view this content.
    7. Now Close all three loops

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Generate every iteration of possible quotients for each row variable

    Try this:

    Please Login or Register  to view this content.
    Last edited by xladept; 01-14-2016 at 09:00 PM. Reason: Details
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Generate every iteration of possible quotients for each row variable

    Please Login or Register  to view this content.

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

    Re: Generate every iteration of possible quotients for each row variable

    For the data layouts you provided.
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-07-2012
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Generate every iteration of possible quotients for each row variable

    Thank you everyone. Jindon, that worked perfectly. Thanks again for the help. I gave you all Rep.

    Best,

    Ryan

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

    Re: Generate every iteration of possible quotients for each row variable

    You are welcome and thanks for the rep.

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Generate every iteration of possible quotients for each row variable

    Hi Ryan,

    Thanks for the rep!

  9. #9
    Registered User
    Join Date
    02-07-2012
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Generate every iteration of possible quotients for each row variable

    Is there a way to tell it to skip blank cells so it doesn't crash when dividing by zero? Thank you again!

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

    Re: Generate every iteration of possible quotients for each row variable

    Try change
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    02-07-2012
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Generate every iteration of possible quotients for each row variable

    You are a gentleman and a scholar good sir! Thank you for the help, your suggestions have worked flawlessly.

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

    Re: Generate every iteration of possible quotients for each row variable

    You are welcome.

+ 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] change variable on every iteration in loop
    By JJGF in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2015, 10:00 PM
  2. Finding the value of a variable through iteration
    By MechE818 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-08-2014, 06:18 PM
  3. Replies: 2
    Last Post: 11-26-2013, 11:02 PM
  4. Is it possible to auto-generate Pareto charts using variable inputs?
    By jkray622 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-28-2013, 10:06 PM
  5. Generate combinations for a variable number of columns in order
    By q83 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2011, 04:17 PM
  6. Need help to generate a dummy variable
    By vme2 in forum Excel General
    Replies: 2
    Last Post: 11-21-2010, 04:16 AM
  7. finding out combination of quotients..!!!
    By via135 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-27-2008, 02:15 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