+ Reply to Thread
Results 1 to 7 of 7

Need help with returning combinations - I am not sure what is wrong with my formula?

  1. #1
    Registered User
    Join Date
    09-25-2018
    Location
    Sydney
    MS-Off Ver
    Office 2016
    Posts
    4

    Need help with returning combinations - I am not sure what is wrong with my formula?

    Hi Everyone,

    Forgive me in advance for posting for what will be for many of you a basic question, so I thank you in advance for your help and understanding. I have a spreadsheet, that has 4 columns of numbers and I want to return the combinations available in a new column. I have inserted a screenshot showing an example of the data. I am trying to return every combination for these columns - there's 1728 combinations by my calculations. Each column of numbers can be found in columns A C E G of my excel spreadsheet.Here is my formula? Please help me by telling me what is wrong with it and how I can get it to work

    =IFERROR(INDEX($A$1:$A$8,INT((ROW(1:1)-1)/((COUNTA(C:C)*(COUNTA(E:E)*(COUNTA(G:G))))))+1)&" - "&INDEX(C:C,MOD(INT((ROW(1:1)-1)/COUNTA(E:E))/COUNTA(G:G)),COUNTA(C:C))+1)&" - "&INDEX(E:E,MOD(INT((ROW(1:1)-1)/COUNTA(G:G)),COUNTA(E:E))+1)&" - "&INDEX(G:G,MOD((ROW(1:1)-1),COUNTA(G:G))+1),""))


    Excel Image.PNG
    Last edited by GAJT73; 09-25-2018 at 01:23 AM. Reason: Added screenshot

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,553

    Re: Need help with returning combinations - I am not sure what is wrong with my formula?

    I'd do it like this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    next time, please attach a sample sheet, not a picture of one, and ensure thta the sheet and the posted formula match each other (your pic and formula did not).
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    09-25-2018
    Location
    Sydney
    MS-Off Ver
    Office 2016
    Posts
    4

    Re: Need help with returning combinations - I am not sure what is wrong with my formula?

    Glenn, thank you so much. Your comments and direction for future postings are well noted.
    Regards
    Grant

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,553

    Re: Need help with returning combinations - I am not sure what is wrong with my formula?

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  5. #5
    Registered User
    Join Date
    09-25-2018
    Location
    Sydney
    MS-Off Ver
    Office 2016
    Posts
    4

    Re: Need help with returning combinations - I am not sure what is wrong with my formula?

    Hi Glenn,

    I am sorry to hassle but it is returning repeat data, and not the combinations. I have tried to correct it but I can't do it, I am just not good enough. Could you please help me?
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,553

    Re: Need help with returning combinations - I am not sure what is wrong with my formula?

    Silly me. I was happy when I got 1728 results and didn't check it thoroughly. The middle two required a MOD on the outside of the INT to get them to repeat properly.

    I've left the intermediate columns in place on this sheet... just in case I have to go back to it again!!
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-25-2018
    Location
    Sydney
    MS-Off Ver
    Office 2016
    Posts
    4

    Re: Need help with returning combinations - I am not sure what is wrong with my formula?

    Thanks Glenn.

+ 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] IF Formula returning wrong answer
    By Abyrose in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 05-01-2014, 11:30 PM
  2. [SOLVED] Index formula returning wrong row refferences
    By JO505 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-26-2013, 05:08 PM
  3. IF formula returning wrong value!
    By Robotacha2010 in forum Excel General
    Replies: 4
    Last Post: 06-22-2011, 10:49 AM
  4. part of formula returning wrong results
    By johnmerlino in forum Excel General
    Replies: 6
    Last Post: 11-15-2010, 11:24 AM
  5. Index Max Match formula returning wrong value
    By bk77 in forum Excel General
    Replies: 4
    Last Post: 03-25-2009, 02:17 PM
  6. Array formula returning wrong results
    By TUNGANA KURMA RAJU in forum Excel General
    Replies: 1
    Last Post: 11-19-2005, 06:35 AM
  7. Excel 2002 Lookup formula returning wrong results?
    By Val in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-18-2005, 05:10 PM

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