+ Reply to Thread
Results 1 to 8 of 8

Conditonal Formatting 2 Columns

  1. #1
    Registered User
    Join Date
    03-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    4

    Conditonal Formatting 2 Columns

    This is my first post to this site. I'm looking for some help regarding conditional formatting an Excel SS. I am using Excel 2011. The problem that I am having is that I'd like to format the 2 columns so that the higher price gets highlighted, but different colors in each column. Meaning that if the left column has the higher price, the cell will fill in the color blue. If the right column is higher, the cell will fill in the color red. The issue that I have been having is that I can do it for each individual horizontal row, but I can not format both columns, only one row at a time. Currently I can make it work for one row at a time. When I try to extend that formula/formatting for all of the cells in that column, the value that the cell will compare to is always the cell at the top of the other column, not the cell next to the cell I'm trying to compare.

    Can anyone help me format this document? Any help will be much appreciated. I've attached the SS I'm attempting to format. The main goal with this SS is to highlight the higher price in a row, but using different colors for each column.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Conditonal Formatting 2 Columns

    Conditional Formatting.xlsx

    Attached file has three sheets to do three highlighting choices (wasn't 100% sure which you wanted)

    Sheet 1 Highlights Red/Blue on each row the highest
    Sheet 2 Highlights the highest value out of both columns (i.e. just the one value)
    Sheet 3 Highlights the highest value in Col A and the highest value in Col B
    Say thanks, click *

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Conditonal Formatting 2 Columns

    Hi and welcome to the forum

    To do what you want to do is a 2-step process...
    1. highlight the range you want to apply the conditional formatting to (A2:A100)
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =A2>B2 format fill as required

    Then repeat the above for column B but change the formula to =B2>A2
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    03-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    4

    Re: Conditonal Formatting 2 Columns

    The first sheet is exactly what I was looking for. I see that the formula for the formatting has "each row" in it. How do I make that formula? Thanks for the quick and excellent response!

  5. #5
    Registered User
    Join Date
    03-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    4

    Re: Conditonal Formatting 2 Columns

    Thanks again, this information is perfect!

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Conditonal Formatting 2 Columns

    Select column A. Click on Conditional Formatting, New Rule, Use A Formula to Determine....

    Enter this formula in the formula field:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click on Format and choose the Fill tab and select the blue colour that you want. Click OK.

    Select column B. Click on Conditional Formatting, New Rule, Use A Formula to Determine ...

    Enter this formula in the formula field:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click on Format and choose the Fill tab and select the red colour that you want. Click OK.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Conditonal Formatting 2 Columns

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  8. #8
    Registered User
    Join Date
    03-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    4

    Re: Conditonal Formatting 2 Columns

    I did thank the responders and added to their reputation. I also marked the thread as "solved" Thanks to all for the help!

+ 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