+ Reply to Thread
Results 1 to 4 of 4

Comparing values in three columns with conditional formatting

  1. #1
    Registered User
    Join Date
    08-04-2006
    Posts
    6

    Comparing values in three columns with conditional formatting

    Hello, I have a table where I have a list of items with three years worth of billing margin data, like so:

    ITEM 2010 2011 2012
    A-WIRE 19% 18% 12%
    B-WIRE 12% 12% 11%
    C-WIRE 17% 13% 18%

    What I would like to do is set up a rule where the highest of the three values is in a green-shaded cell, the mid-value is yellow, and the lowest value is red. Though the values could be the same across all three years for some items, and some columns are missing data because there were no sales that year. Is there a conditional formatting rule I can set up to do this, or does the lack of data in some cells make this impossible?

    If it can't be done, I'd settle for a rule where I could just highlight each cell red if it's lower than the previous year's value. I have tried to get this to work without any luck. Any help you could provide would be appreciated!!
    Last edited by Jason Grunert; 03-19-2013 at 02:10 PM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Comparing values in three columns with conditional formatting

    If you have to compare 3 columns, as your example,Try in Conditional formatting rules.

    =B2=LARGE($B2:$D2,1)>>>for the biggest

    =B2=LARGE($B2:$D2,2)>>>for the mid

    =B2=LARGE($B2:$D2,3)>>.for the smallest
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Comparing values in three columns with conditional formatting

    here is your sample

    set the table background to yellow and use two conditional formats to change them to red or green.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-04-2006
    Posts
    6

    Re: Comparing values in three columns with conditional formatting

    I couldn't get the first example to work (ended up with only one cell in the whole field highlighted), but thank you Fotis1991 for taking the time to respond. I'm sure I was just missing something in how I was doing it.

    However, mehmetcik, I got your example to work perfectly! Thank you very much! That is exactly what I wanted!

+ 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