+ Reply to Thread
Results 1 to 20 of 20

If a combination extract a group of numbers

  1. #1
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Red face If a combination extract a group of numbers

    Hello All ,We have A and B columns that on each one are extracting the numbers 1 and 2.I would like to extract/show in C1 specific numbers after the some(4 actually) combinations i show below:

    if the next combination is 1 at cell A and 2 at cell B show on C1 the numbers:2,1,3,6,5
    if the next combination is 2 at cell A and 1 at cell B show on C1 thenumbers:1,3,7,10,11
    if the next combination is 1 at cell A and 1 at cell B show on C1 the numbers:36,3,6,5
    if the next combination is 2 at cell A and 2 at cell B show on C1 the numbers:17,9,6,

    thankYOU!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

    You will need to explain the logic of the expected results you have listed - where do those numbers come from?

    Will you please attach a sample Excel workbook? Nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Last edited by AliGW; 12-31-2018 at 04:12 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: If a combination extract a group of numbers

    I think i upload.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

    2. Make sure that your desired results are also shown (mock up the results manually).

    And when you have done this, please explain those results - where do the numbers come from? I can see no logic in your first post at all.

    This tells us nothing helpful at all:

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    1
    1
    2
    =
    2
    2
    1
    3
    1
    2
    4
    1
    1
    5
    2
    2
    Sheet: Sheet1

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

    if the next combination is 1 at cell A and 2 at cell B show on C1 the numbers:2,1,3,6,5
    Why?

    if the next combination is 2 at cell A and 1 at cell B show on C1 thenumbers:1,3,7,10,11
    Why?

    if the next combination is 1 at cell A and 1 at cell B show on C1 the numbers:36,3,6,5
    Why?

    if the next combination is 2 at cell A and 2 at cell B show on C1 the numbers:17,9,6,
    Why?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

    I need an updated sample workbook and answers to my questions, please.
    Last edited by AliGW; 12-31-2018 at 04:28 AM.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

    Well, I do NOT understand the logic, but as you are not going to explain any further it seems, try this:

    =IF(AND(A1=1,B1=2),"2,1,3,6,5",IF(AND(A2=1,B1=1),"1,3,7,10,11",IF(AND(A1=1,B1=1),"36,3,6,5","17,9,6")))

  8. #8
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: If a combination extract a group of numbers

    Dear ali, the results on a and b cell will be put manually and the same time at a and b. Just a formula at cell c which shows the specific numbers after those 4 combinations. Thanks!
    Last edited by louis128; 12-31-2018 at 04:36 AM.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

    See post #7.
    Last edited by AliGW; 12-31-2018 at 04:37 AM.

  10. #10
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: If a combination extract a group of numbers

    I try to copy paste the formula and it says: ''the formula you typed contains an error'', why?

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

    Try changing this:

    =IF(AND(A1=1,B1=2),"2,1,3,6,5",IF(AND(A2=1,B1=1),"1,3,7,10,11",IF(AND(A1=1,B1=1),"36,3,6,5","17,9,6")))

    to this:

    =IF(AND(A1=1;B1=2);"2,1,3,6,5";IF(AND(A2=1;B1=1);"1,3,7,10,11";IF(AND(A1=1;B1=1);"36,3,6,5";"17,9,6")))

    Your locale requires ; as a separator rather than , .
    Attached Files Attached Files
    Last edited by AliGW; 12-31-2018 at 04:46 AM.

  12. #12
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: If a combination extract a group of numbers

    Thank you! BUT I STILL GET THE ERROR MESSAGE

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

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

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

    Quote Originally Posted by louis128 View Post
    Thank you! BUT I STILL GET THE ERROR MESSAGE

    Don't SHOUT at me!!!
    I am not an idiot.

    Open the attachment to post #11.

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

    Re: If a combination extract a group of numbers

    Do mainland European array constants need a \ ??

    =IF(AND(A1=1;B1=2);"2\1\3\6\5";IF(AND(A2=1;B1=1);"1\3\7\10\11";IF(AND(A1=1;B1=1);"36\3\6\5";"17\9\6")))
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  16. #16
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: If a combination extract a group of numbers

    I wish you the best.it works.

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

    Good.

    Please mark the thread as solved.

  18. #18
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

    Quote Originally Posted by Glenn Kennedy View Post
    Do mainland European array constants need a \ ??

    =IF(AND(A1=1;B1=2);"2\1\3\6\5";IF(AND(A2=1;B1=1);"1\3\7\10\11";IF(AND(A1=1;B1=1);"36\3\6\5";"17\9\6")))
    Text within speech marks ought to be immune from regional variations.

  19. #19
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: If a combination extract a group of numbers

    IT WORKS!THANKS! JUST I WANT AT THE NEXT CELL C2. For exaple if at A1=1 and A2=1 show 2;1;3;6;5 to C2.
    Can it be arranged?

  20. #20
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,903

    Re: If a combination extract a group of numbers

    STOP SHOUTING!!!!!

    Your latest request does not match the workbook you first attached, and seems different, so please attach a new workbook with your expected results entered manually.

    PS Have you tried to adapt the solution I gave you for the new scenario? If not, then you really should try to do so, otherwise, you will learn nothing from this process and remain dependent on your helpers - we want to help you to become independent.
    Last edited by AliGW; 12-31-2018 at 05:42 AM.

+ 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] Macro to generate groups randomly of 20 numbers, being 10 of group A and 10 of group B,
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-14-2017, 08:02 AM
  2. Find a number combination in a group of cells
    By OpieWinston in forum Excel General
    Replies: 6
    Last Post: 03-15-2014, 10:45 AM
  3. Replies: 1
    Last Post: 01-23-2014, 05:39 AM
  4. combination of these numbers would sum
    By alisapooh in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-22-2009, 12:27 PM
  5. [SOLVED] How can I convert a group of numbers to a group of letters?
    By CarlG in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-18-2006, 10:35 AM
  6. Replies: 1
    Last Post: 01-09-2006, 09:30 AM
  7. combination of numbers
    By ErnestoMarti in forum Excel General
    Replies: 36
    Last Post: 10-23-2005, 05:05 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