+ Reply to Thread
Results 1 to 6 of 6

Using conditional formatting to compare values

  1. #1
    Registered User
    Join Date
    01-05-2010
    Location
    Stonefag Tunnel
    MS-Off Ver
    Excel 2007
    Posts
    3

    Using conditional formatting to compare values

    Hi everybody, I googled my 'problem' and I couldn't find anything that really helped so I figured I would post it here. Basically I have a spreadsheet with prices in it.
    There are prices in column "A" and column "D" like so:

    A D
    2,345 6,789
    3,760 1,215
    4,210 3,456

    and so on...values go from cell A1 to A70 or something like that, same goes for the values in the D column (D1 to D70).

    What I basically want Excel to do is to take the value in cell A1, compare it to the value D1 and highlight in color whatever value of the two is the lowest. Then repeat for the next one, compare A2 to D2 and highlight the lowest, then compare A3 to D3 and highlight the lowest and so on...

    I have Excel 2007 if that's of any help. I think it's something simple (I feel stupid!) that I have to use conditional formatting but after trying things for over an hour I gave up so here's hoping you guys can lend me a hand.

    Thanks in advance!

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

    Re: Using conditional formatting to compare values

    Select A2:A70

    and then Go to Home|Conditional formatting

    Select New Rule,

    Select use a formula to determine which cells to format and enter

    =A2=MIN($A2,$D2)

    Click Format and choose from Fill tab.

    Close

    Select Column D2:D70


    And repeat with formula

    =D2=MIN($A2,$D2)
    Last edited by NBVC; 01-06-2010 at 11:44 AM. Reason: Edited... first suggestion was wrong...
    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
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Using conditional formatting to compare values

    Select Column D
    CF function =D1<A1

    Select Column A
    CF function =A1<D1


    Formatting in any font, border you like
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

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

    Re: Using conditional formatting to compare values

    I edited my previous post... It wasn't quite right.

  5. #5
    Registered User
    Join Date
    01-05-2010
    Location
    Stonefag Tunnel
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Using conditional formatting to compare values

    Quote Originally Posted by rwgrietveld View Post
    Select Column D
    CF function =D1<A1

    Select Column A
    CF function =A1<D1


    Formatting in any font, border you like
    That worked like a charm. Thank you so much.

  6. #6
    Registered User
    Join Date
    01-05-2010
    Location
    Stonefag Tunnel
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Using conditional formatting to compare values

    Quote Originally Posted by NBVC View Post
    Select A2:A70

    and then Go to Home|Conditional formatting

    Select New Rule,

    Select use a formula to determine which cells to format and enter

    =A2=MIN($A2,$D2)

    Click Format and choose from Fill tab.

    Close

    Select Column D2:D70


    And repeat with formula

    =D2=MIN($A2,$D2)
    I will try this too, thank you everybody for your 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