+ Reply to Thread
Results 1 to 8 of 8

Conditional cell colors

  1. #1
    Registered User
    Join Date
    04-22-2009
    Location
    MD, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Conditional cell colors

    Dear Friends,

    I want to assign Cell A1 and A2 with two different colors if value in A2 is smaller or greater than that of in A1. Is it possible to do? If YES, HOW?

    Thx all in advance

    Lonely

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Conditional cell colors

    Hi,

    Take a look at conditional formatting. It can be found in the Home section of the ribbon in the styles area.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    04-22-2009
    Location
    MD, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Conditional cell colors

    Thanks for the speedy response. But its to critical to understand.

    Could you please elaborate the formula?

    Thanks again

    Lonely.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,006

    Re: Conditional cell colors

    Try follow this:

    Select one cell (or group of cells), choose Conditional formatting and follow steps like in picture

    untitled.JPG

    You can add one rule when it's bigger (with one color) and other rule when it's smaller (with other color).
    Never use Merged Cells in Excel

  5. #5
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Re: Conditional cell colors

    Hi,

    Something like this should work for you
    Attached Images Attached Images
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  6. #6
    Registered User
    Join Date
    04-22-2009
    Location
    MD, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Conditional cell colors

    Dear Friends,

    I am sorry that none of the above could solve my problem.

    Let me clear the thing; suppose:

    a1= 2
    a2= 4
    a3= 3
    a4= 5

    I want to assign two different colours if value of a cell is greater or smaller than the previous cell. However, colour will remain same if value of a cell is same as the previous one.

    Is there anyone to solve the above?

    Thx to all who already tried to help me in solving the problem.

    Regards,

    Lonely

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Conditional cell colors

    you have to read the help file
    but format a2 as
    condition 1
    greater than =a1
    pick colour
    condition 2
    less than =a1
    pick colour
    then copy a2
    select range
    a3:a50 or whatever paste special formats
    read zebors post and look at picture
    but change from =$a$1
    to =a1.
    Last edited by martindwilson; 04-26-2009 at 08:05 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Conditional cell colors

    I think he's saying that he only wants two colors. He wants them to alternate colors, but only when the values in column A are different. When the adjacent values are the same, he wants them to stay the same.

    Like this macro does:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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