+ Reply to Thread
Results 1 to 14 of 14

Conditional formatting consecutive cells in row above a constant value

  1. #1
    Registered User
    Join Date
    06-26-2019
    Location
    USA
    MS-Off Ver
    10
    Posts
    6

    Conditional formatting consecutive cells in row above a constant value

    I want to highlight 3or more consecutive values in a row that are above 4.5.

    I thought I had it with = and(e3>4.5,f3>4.5,g3>4.5)
    doesn't work. I've tried a couple of different formulas and it always highlights pieces rather than the three or more in a row that are above the 4.5 constant.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Conditional formatting consecutive cells in row above a constant value

    =and($e1>4.5,$f1>4.5,$g1>4.5)
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    06-26-2019
    Location
    USA
    MS-Off Ver
    10
    Posts
    6

    Re: Conditional formatting consecutive cells in row above a constant value

    I cant get that to work in the sheet

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Conditional formatting consecutive cells in row above a constant value

    works for me
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-26-2019
    Location
    USA
    MS-Off Ver
    10
    Posts
    6

    Re: Conditional formatting consecutive cells in row above a constant value

    I'm trying to figure out how your values changed from the sheet I uploaded...
    I cant get it to work across the entire sheet. Most of the values above the 4.5 for three consecutive hours will be on the right of the sheet.

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Conditional formatting consecutive cells in row above a constant value

    1. I just used random numbers to test the formula since your original didn't have any that met the spec.
    2. In your first post you said: "...I want to highlight 3 or more consecutive values in a row that are above 4.5. ..." Meaning (to me) that all three cells in same row of columns e, f & g must exceed 4.5.

    3. However, in post #5 you said: "... work across the entire sheet...". Does that mean you want to highlight any three adjacent cells across columns E to AC?

  7. #7
    Registered User
    Join Date
    06-26-2019
    Location
    USA
    MS-Off Ver
    10
    Posts
    6

    Re: Conditional formatting consecutive cells in row above a constant value

    yes, exactly

  8. #8
    Registered User
    Join Date
    06-26-2019
    Location
    USA
    MS-Off Ver
    10
    Posts
    6

    Re: Conditional formatting consecutive cells in row above a constant value

    No one else??

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Conditional formatting consecutive cells in row above a constant value

    I'm still working on it and cannot get consistent results. Sometimes 3 in a row highlight, sometimes just a single cell highlights.
    Dave

  10. #10
    Registered User
    Join Date
    06-26-2019
    Location
    USA
    MS-Off Ver
    10
    Posts
    6

    Re: Conditional formatting consecutive cells in row above a constant value

    That's the problem I'm having. The formula I used in the OP is hit and miss also...

    Thanks for the help.
    I was trying to get out of having to do this with VBA

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Conditional formatting consecutive cells in row above a constant value

    Here is a low tech proposal that hopefully someone can build on to provide a better solution.
    A helper table, AE2:BB31, is populated using: =OR(AND(E2>4.5,F2>4.5,G2>4.5,ISNUMBER(E2),ISNUMBER(F2),ISNUMBER(G2)),AND(AC2=FALSE,AD2=TRUE),AND(AB2=FALSE,AC2=TRUE,AD2=TRUE))
    The conditional formatting rule is: =AE2
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  12. #12
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Conditional formatting consecutive cells in row above a constant value

    Please try Insert column AC
    CF formula applies to
    A2:AB31

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Bo_Ry; 03-23-2020 at 01:18 AM. Reason: correction

  13. #13
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Conditional formatting consecutive cells in row above a constant value

    You can do this with a single conditional formatting formula, applied to E2:AB30;

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  14. #14
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Conditional formatting consecutive cells in row above a constant value

    I agree with olly although I had previously used a solution around countif(C2:E2,">=4.5") instead of AND(COUNT(C2:E2)=3,MIN(C2:E2)>=4.5). But both work

+ 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] Highlight consecutive 7 days or above using conditional formatting
    By kyleung in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-01-2018, 09:22 AM
  2. [SOLVED] Conditional formatting linked to another sheet - constant table row & column
    By Grasshopper Green in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-05-2018, 02:05 PM
  3. Conditional Formatting - Consecutive values
    By mmartinezq202 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-26-2017, 04:43 AM
  4. conditional formatting on non consecutive cells in excel 2003
    By clayton in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-08-2015, 07:50 AM
  5. Copy Conditional Formatting to keep only row constant
    By tntocala in forum Excel General
    Replies: 3
    Last Post: 11-09-2012, 04:46 PM
  6. Conditional formatting on Consecutive cells
    By welshobit in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-20-2006, 11:00 AM
  7. Merge consecutive cells using conditional formatting.
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-14-2005, 02: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