+ Reply to Thread
Results 1 to 14 of 14

Check set of number with conditions

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Check set of number with conditions

    Hello everyone
    I have some sets of numbers in column A
    For example: this set 42-85-28-5-30
    in this set, it is correct because, 42 and 28 all have the number 2, 85 and 5 are also having same number 5 then 30 appears to be different and standing alone. In other words, if there are four numbers that have similarity and only one number is different and unique .. then to take this set in the result or check it as True

    Another example: this set 42-43-44-45-10
    All the numbers have the 4 in and 10 is different and unique so it is True and correct

    Another example: this set 42-43-40-45-10
    These numbers 10 and 40 are similar in 0 and the other three numbers have 4 so this set is not true and this doesn't to be included in the results

    Thanks advanced for help
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Check set of number with conditions

    Hi Yasser,

    See how this goes:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Check set of number with conditions

    Thanks a lot for great help Trebor
    Please put this set in the test for sets 49-75-33-2-31
    You will find it is highlighted. There are 33 and 31 similar so there are 2 and 75 and 49 unique. That set doesn't included as the logic four similar numbers and only one unique

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Check set of number with conditions

    So if only one is unique it is to be highlighted?

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Check set of number with conditions

    Yes that's right my friend. Four similar numbers plus one unqiue.

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

    Re: Check set of number with conditions

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Check set of number with conditions

    Amazing Jindon. Really wonderful soilution
    Thank you very much

  8. #8
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Check set of number with conditions

    I see jindon has come up with a superior solution but here's my revised code nonetheless:

    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Check set of number with conditions

    Thank you very much. But the results seem different. For example one set of your results on my side 37-88-23-4-20
    There are 37 and 23 only similar so there are three unique ones (that should not be included)
    Anyway never mind. And thanks a lot for the great help

  10. #10
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Check set of number with conditions

    Hi Yasser,

    I know you have a working solution but it bothers me that I can't get it right. Could you let me know how this goes:

    Please Login or Register  to view this content.
    Thanks,

    Robert

  11. #11
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Check set of number with conditions

    Thanks a lot. As for a sample test of about 530 sets
    The jindon's UDF returns True on 194 and your macro colored 189
    And here are some sets that are not colored
    45-84-36-12-36
    44-87-26-4-26
    46-83-29-6-29
    49-85-22-18-22
    53-85-19-4-19

  12. #12
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Check set of number with conditions

    Must be close - try this:

    Please Login or Register  to view this content.

  13. #13
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Check set of number with conditions

    That's perfect now.. I like this spirit
    Thank you for both of you

  14. #14
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Check set of number with conditions

    That's perfect now.. I like this spirit
    Thanks Yasser. I'm glad I was able to provide an alternative solution that actually worked

    Thank you for both of you
    You're 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. Replies: 10
    Last Post: 07-22-2018, 04:00 PM
  2. [SOLVED] Formula to check 2 different conditions
    By Bellatrix_7 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-08-2015, 07:22 AM
  3. [SOLVED] trying to check for either of two conditions in a cell
    By kmakjop in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-08-2012, 05:37 PM
  4. Custom formula to check entered number against conditions which increses in 5 steps
    By deepakya3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2011, 02:30 AM
  5. Using AND to check 2 conditions...
    By portsample in forum Excel General
    Replies: 5
    Last Post: 08-06-2011, 03:00 AM
  6. check conditions
    By okl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2009, 09:54 AM
  7. Duplicate Check with 2 conditions
    By taherno1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2008, 11:19 AM

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