+ Reply to Thread
Results 1 to 7 of 7

Conditional format 5 or more consecutive "No" (or >4 consecutive Yes) in a range

  1. #1
    Registered User
    Join Date
    04-27-2012
    Location
    Southern Europe
    MS-Off Ver
    Excel 2011 mac
    Posts
    7

    Conditional format 5 or more consecutive "No" (or >4 consecutive Yes) in a range

    Hi,

    first post: I need to analyze a serie of tests (F5:F1000).
    Is it possible with conditional format to highlight in green the series of at least 5 consecutive "yes" and in red the series of at least 5 consecutive "No" ?

    The range has no blank cells and contains "Yes" "No" "Nul".

    A big thank you
    Attached Files Attached Files
    Last edited by Lalla; 04-28-2012 at 03:47 AM. Reason: missing plurals

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Conditional format 5 or more consecutive "No" (or >4 consecutive Yes) in a range

    Hi Lalla

    Welcome to the Forum ...

    Maybe not the most elegant way, however ...

    Highlight F6:F75
    Condition 1 (Green)
    Formula is:=
    Please Login or Register  to view this content.
    Condition 2 (Red)
    Formula is:=
    Please Login or Register  to view this content.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Conditional format 5 or more consecutive "No" (or >4 consecutive Yes) in a range

    I would adopt Marcol's approach though perhaps modify to an embedded IF approach so as to stop calculating once true ?

    Another alternative might be:

    Please Login or Register  to view this content.
    change "yes" to "no" for opposite rule - but obviously far less intuitive - and less efficient I would say.

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Conditional format 5 or more consecutive "No" (or >4 consecutive Yes) in a range

    Hi, a probably naif or less efficient solution.

    In F10 to conditionally format, "the formula is" (I'm Excel 2000 user) and to be copied down and up with paste special format.

    Green yes

    Please Login or Register  to view this content.
    Second rule:

    Red no

    Please Login or Register  to view this content.

    Regards

    Saluti (even if historically Siena and Firenze do not get along)
    Attached Files Attached Files
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Conditional format 5 or more consecutive "No" (or >4 consecutive Yes) in a range

    Interesting solution CANAPONE

    The OP states
    The range has no blank cells and contains "Yes" "No" "Nul".
    ... but if there are blanks, anomalies can occur with your formulae, so it is perhaps less robust.

    This is not a criticism, just an observation.

    See this modified workbook
    Attached Files Attached Files

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Conditional format 5 or more consecutive "No" (or >4 consecutive Yes) in a range

    I like that approach too.

    Appending with an appropriate delimiter should resolve that, e.g:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    04-27-2012
    Location
    Southern Europe
    MS-Off Ver
    Excel 2011 mac
    Posts
    7

    Re: Conditional format 5 or more consecutive "No" (or >4 consecutive Yes) in a range

    Hi, thanks DonkeyOte, Marcol and Canapone,

    I can't wait to test the last solution you brillantly provided when I'll be back in my small office!

    Laura

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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