+ Reply to Thread
Results 1 to 4 of 4

Conditional Formatting

  1. #1
    Forum Contributor
    Join Date
    06-04-2015
    Location
    Bangkok, Thailand
    MS-Off Ver
    2013
    Posts
    175

    Conditional Formatting

    Hi All,

    Just have a quick conditional formatting question. I have a table with rankings that I would like to color the cell red if the ranking is negative. I have two tables one that ranks the destination (Table B3:Z10) and another that contains all each destination's operating profit or loss.

    For the profit and loss rankings I know how to color each cell red, just use any value less than 0 is red but for the table that ranks each destination (B3:Z10) I would like to also color these cells red if it is an operating loss and no color if it is profit.

    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Conditional Formatting

    Select C4:Z10. Go into CG and Add New Rule then use "Use a formula to determine which cells to format." Use the formula

    =C16<0

    then apply your formatting.

    If you have any trouble let me know and I can do it in your file for you.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    06-04-2015
    Location
    Bangkok, Thailand
    MS-Off Ver
    2013
    Posts
    175

    Re: Conditional Formatting

    Ah ok, thanks Jeff. I thought I had to somehow match the range C4:Z10 with the range C16:Z22.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,696

    Re: Conditional Formatting

    Conditional formatting formulas are relative to the upper left cell of the range being formatted. If you are formatting the range C4:Z10, you should write the formula relative to C4. So if you use the formula I gave above

    =C16<0

    it will be interpreted relative to all cells in the range. That is, C4 will be formatted if C16<0, D4 will be formatted if D16<0, C8 will be formatted if C20<0 and Z10 will be formatted if Z22<0. This is one aspect of conditional formatting rules that is not explained very well in Excel Help.

+ 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: 9
    Last Post: 03-07-2016, 10:39 AM
  2. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  3. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  4. Formatting Cells with Date or Text Values in a Conditional Formatting Formula
    By Phil Hageman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2014, 09:36 AM
  5. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  6. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 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