+ Reply to Thread
Results 1 to 14 of 14

Please help beginner with a 20 number problem

  1. #1
    Registered User
    Join Date
    08-28-2021
    Location
    london
    MS-Off Ver
    xp , 2000
    Posts
    13

    Please help beginner with a 20 number problem

    Hello !
    I am a complete beginner to Excel !
    I want to solve the following numbers problem.
    I was able to use some lessons on the internet to create a formula that will work for my problem, however I can`t finish it completely , so I would love for someone to help me if possible.

    I attached my excel file to this post.

    I created the first yellow row called ''Check for these numbers''. Here you can insert up to 20 numbers. I chose to enter only 10.
    The next 5 rows each contain 10 random numbers from 1 to 20.
    The ''Matches'' column on the right shows how many of the numbers from each of the 5 rows are matching with the original numbers from the yellow row.
    Here is my problem:
    I want the total result of matches of the 2nd row to not include numbers that already matched in the 1st row.
    I want the total result of matches of the 3rd row to not include numbers that already matched in the 1st & 2nd rows. etc...
    In other words duplicate matches shouldn`t be counted.

    Right now the matches column displays : 4 , 4 , 7 , 6, 6, and I would like the final result to display : 4, 3, 2 , 1 , 0

    Thank you very much !!!
    Attached Files Attached Files
    Last edited by pyiujkui; 08-28-2021 at 06:08 PM.

  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,490

    Re: Please help beginner with a 20 number problem

    Welcome to the forum.

    XP is your Windows version - please update your profile with the version of Excel that you are using.
    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
    Registered User
    Join Date
    08-07-2021
    Location
    Manama, Bahrain
    MS-Off Ver
    2016
    Posts
    61

    Re: Please help beginner with a 20 number problem

    I am no pro here, i just made slight alteration to your existing formula in the sheet.

    there might be other easier options too. right out of my head this came to my mind. see if it helps.

    I kept the already existing formula in the first row of the matches as it is. ie =COUNTIF($B$2:$U$2,B3)

    in the next row, i added an IF condition in the beginning =IF(W3<>0,0,COUNTIF($B$2:$U$2,B4)), since this row has to take only the previous one row into consideration.

    in the next row, i added an OR function inside the IF condition. =IF(OR(W4<>0,W3<>0),0,COUNTIF($B$2:$U$2,B5)), and now this formula will take the 2 previous rows into consideration.

    in the next row, adding one more OR condition and so on.

    note that for each additional "place to check" rows you will have to add one more condition to the OR() in the IF.
    Attached Files Attached Files
    Last edited by Abith; 08-29-2021 at 04:46 AM. Reason: Making answer more elaborate
    Give a sec to give rep to all who tried to help

  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,490

    Re: Please help beginner with a 20 number problem

    Sorry for off-topic interjection:

    Although there is no official rule regarding this behaviour, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand, and we look forward to seeing you post your formulas/macros in your posts for the searching benefit of all.

  5. #5
    Registered User
    Join Date
    08-07-2021
    Location
    Manama, Bahrain
    MS-Off Ver
    2016
    Posts
    61

    Re: Please help beginner with a 20 number problem

    Sure thing. I will edit my answer. since it was a mere extension to the formula already created by the questioner, i made the answer minimal. however i will keep this in mind whenever i post a response from here on out.
    Last edited by AliGW; 08-29-2021 at 05:09 AM. Reason: PLEASE don't quote unnecessarily!

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Please help beginner with a 20 number problem

    In W3 and copy across and down

    =IF(SUM(W$2:W2)=0,COUNTIF($B$2:$U$2,B3),0)

  7. #7
    Registered User
    Join Date
    08-07-2021
    Location
    Manama, Bahrain
    MS-Off Ver
    2016
    Posts
    61

    Re: Please help beginner with a 20 number problem

    this is much more easier
    for some reason i always go for the longer formula
    Last edited by AliGW; 08-29-2021 at 05:10 AM. Reason: PLEASE don't quote unnecessarily!

  8. #8
    Registered User
    Join Date
    08-28-2021
    Location
    london
    MS-Off Ver
    xp , 2000
    Posts
    13

    Re: Please help beginner with a 20 number problem

    Quote Originally Posted by JohnTopley View Post
    In W3 and copy across and down

    =IF(SUM(W$2:W2)=0,COUNTIF($B$2:$U$2,B3),0)
    Thank you for reply !
    Can you please check once again ? I get error if I do what you wrote !

  9. #9
    Registered User
    Join Date
    08-28-2021
    Location
    london
    MS-Off Ver
    xp , 2000
    Posts
    13

    Re: Please help beginner with a 20 number problem

    Quote Originally Posted by Abith View Post
    note that for each additional "place to check" rows you will have to add one more condition to the OR() in the IF.
    Thank you for reply !!!
    Your method works !
    If i were to add 100 more places to check , how could I easily copy the formula without typing it 100 times ?

  10. #10
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,066

    Re: Please help beginner with a 20 number problem

    what error do you get?

    (i have entered JohnTopley formula on both versions of your workbook and did not experience any errors)

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,383

    Re: Please help beginner with a 20 number problem

    Maybe Regional settings? Try changing comma ( , ) to semi-colon ( ; ).
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Please help beginner with a 20 number problem

    Post what apparently does not work with the formula in post #6 : it certainly does work!

    And please show example of
    If i were to add 100 more places to check
    Attached Files Attached Files
    Last edited by JohnTopley; 08-29-2021 at 10:21 AM.

  13. #13
    Registered User
    Join Date
    08-28-2021
    Location
    london
    MS-Off Ver
    xp , 2000
    Posts
    13

    Re: Please help beginner with a 20 number problem

    Quote Originally Posted by JohnTopley View Post
    Post what apparently does not work with the formula in post #6 : it certainly does work!
    I`m sorry JohnTopley , I tried your formula on a computer using an Excel-like software , I switched to a different computer with Excel and your formula works perfectly !!!

    Quote Originally Posted by TMS View Post
    Maybe Regional settings? Try changing comma ( , ) to semi-colon ( ; ).
    On the different software I used TMS tip of changing the comma to semi-colon and it works perfectly there as well !!!

    Thank you very much to all of you !!!

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Please help beginner with a 20 number problem

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

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. Excel VBA Beginner problem in time calculations
    By Excel 22 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-26-2020, 12:57 PM
  2. number-comma-number formatting problem. Thousands, and string
    By JimmyWilliams in forum Excel General
    Replies: 1
    Last Post: 11-28-2017, 06:35 PM
  3. [SOLVED] Excel VBA beginner problem
    By Branko123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2015, 04:31 PM
  4. please your help i am beginner in vba
    By TAIKOV in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-09-2014, 09:55 AM
  5. Beginner help
    By saratu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2014, 02:32 PM
  6. beginner's problem
    By fidley in forum Excel General
    Replies: 2
    Last Post: 04-10-2009, 05:46 AM
  7. beginner problem: getting selected rows, row by row
    By Holger Beese in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2005, 06:06 AM

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