+ Reply to Thread
Results 1 to 4 of 4

How do I color cells within a formula in excel?

  1. #1
    Richard
    Guest

    How do I color cells within a formula in excel?

    I am trying to format a cell so that if a value is greater than 5 the cell
    will be coloured Red, if it is between 2 and 4 it will be Orange and if it is
    between zero and 1 it will be Green, how do I do it?
    I tried to use the IF function but it didn't seem to work.

  2. #2
    Niek Otten
    Guest

    Re: How do I color cells within a formula in excel?

    Use Format>Conditional formatting

    --

    Kind Regards,

    Niek Otten

    Microsoft MVP - Excel

    "Richard" <[email protected]> wrote in message
    news:[email protected]...
    >I am trying to format a cell so that if a value is greater than 5 the cell
    > will be coloured Red, if it is between 2 and 4 it will be Orange and if it
    > is
    > between zero and 1 it will be Green, how do I do it?
    > I tried to use the IF function but it didn't seem to work.




  3. #3
    Bob Phillips
    Guest

    Re: How do I color cells within a formula in excel?

    Look up 'Highlight cells that meet specific conditions' in the Answer
    wizard in help

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Niek Otten" <[email protected]> wrote in message
    news:[email protected]...
    > Use Format>Conditional formatting
    >
    > --
    >
    > Kind Regards,
    >
    > Niek Otten
    >
    > Microsoft MVP - Excel
    >
    > "Richard" <[email protected]> wrote in message
    > news:[email protected]...
    > >I am trying to format a cell so that if a value is greater than 5 the

    cell
    > > will be coloured Red, if it is between 2 and 4 it will be Orange and if

    it
    > > is
    > > between zero and 1 it will be Green, how do I do it?
    > > I tried to use the IF function but it didn't seem to work.

    >
    >




  4. #4
    David McRitchie
    Guest

    Re: How do I color cells within a formula in excel?

    Hi Richard,
    A bit more information, and suggest you read
    Conditional Formatting
    http://www.mvps.org/dmcritchie/excel/condfmt.htm

    Format>Conditional formatting
    cond 1: =A1>=5 format pattern for Red
    cond 2: =A1>=2 format pattern for Orange
    cond 3: =A1>=0 format pattern for Green
    Enter them in the above order because when you get a
    match the rest are going to be checked.

    The formula is based on your active cell, the cells that
    get colored are based on your selection.

    If you have more than 3 conditions you would need to use an
    Event Macro, and hopefully you would be working with constants
    rather than formulas so you can use a Change Event macro.
    http://www.mvps.org/dmcritchie/excel/event.htm

    With normal cell formatting instead you can try the following, but it
    will color ONLY the font, you cannot format the cell colour
    with normal cell formatting. The third part (all other numbers)
    will color negative numbers as well.

    Format > cells > Custom
    [Red][>=5]General;[Color40][>=2]General;[Color10]General;[Color30]@

    Also on a laptop font colors are not very easily distinguishable,
    and dark colors are hard to distinguish for interior colors. Your
    colors if used for interior colors with Conditional Formatting would
    be easy to distinguish.

    More information on Colors
    http://www.mvps.org/dmcritchie/excel/colors.htm

    HTH,
    David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
    My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
    Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

    "Niek Otten" <[email protected]> wrote
    > Use Format>Conditional formatting
    >
    > "Richard" <[email protected]> wrote...
    > >I am trying to format a cell so that if a value is greater than 5 the cell
    > > will be coloured Red, if it is between 2 and 4 it will be Orange and if it
    > > is
    > > between zero and 1 it will be Green, how do I do it?
    > > I tried to use the IF function but it didn't seem to work.

    >
    >




+ 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