+ Reply to Thread
Results 1 to 4 of 4

Conditional formating a row until a value is reached

  1. #1
    Registered User
    Join Date
    07-06-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    12

    Conditional formating a row until a value is reached

    Excel Gods,

    I have been racking my brain for several days trying to figure out this formula. I need to conditionally format a row of cells (C2:V2) to count back from right to left until the value in the target cell (X2) is reached. I would like the row to highlight the cells in the sum range with a red font from right to left. See attached example.

    Thanks for your help!!


    Example1.xlsx

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Conditional formating a row until a value is reached

    On the face of it this isn't too difficult but I'm thinking that there are missing details which will make this more complex.

    Let's start with this...

    Select the range C2:V2
    Conditional Formatting
    Formula:

    =AND(COUNT($X2:$Y2)=2,COLUMNS($C2:$V2)-MATCH(TRUE,SUBTOTAL(9,OFFSET($V2,,,,-(COLUMN($C2:$V2)-COLUMN($C2)+1)))>=$X2*$Y2,0)+1<=COLUMNS($C2:C2))

    If you test that formula on the worksheet it must be array entered.

    Array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    If X*Y is greater than SUM(C2:V2) then no formatting will be applied.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    07-06-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Conditional formating a row until a value is reached

    Thanks Toni,

    Your solution works perfectly!

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Conditional formating a row until a value is reached

    You're welcome. Thanks for the feedback!

+ 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: 5
    Last Post: 03-14-2014, 04:03 AM
  2. Replies: 4
    Last Post: 01-23-2014, 10:14 AM
  3. Replies: 3
    Last Post: 05-22-2012, 03:26 PM
  4. Replies: 6
    Last Post: 08-14-2006, 05:00 PM
  5. Replies: 2
    Last Post: 03-27-2006, 12:10 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