+ Reply to Thread
Results 1 to 5 of 5

Color cells in Range based on condition.

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    41

    Color cells in Range based on condition.

    I am trying to color the background of the cells in Range R47:Z76 based on the following criteria. R47 is only compared to R48 and whichever is smaller gets colored. S47 will only be compared to S48 and again the smaller of the two will get colored.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Color cells in Range based on condition.

    Is R48 then compared to R49 or are you skipping to comparing R49 to R50?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Color cells in Range based on condition.

    Row 49 is reserved for calculating the difference between 47 & 48 and therefore is not compared to anything. After R48 is compared to R49,
    R50 would be compared to R51 and then again row 52 is reserved for the difference between 50 and 51 and is not compared with anything.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Color cells in Range based on condition.

    Okay, select R47:Z76, apply conditional formatting rule: (Home|Conditional Formatting|New Rule|use formula to determine which cells to format)

    =IF(MOD(ROW()-ROW($R$47)+1,3)<>0,IF(MOD(ROW()-ROW($R$47)+1,3)=1,R47<R48,R47<R46))

  5. #5
    Registered User
    Join Date
    10-10-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Color cells in Range based on condition.

    Thanks. Works great.

+ 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