Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Automatically changing the color of text in cell (

    Hi all,
    I have a Excel worksheet called Share Tracking.
    In Cell B3 I have a constant value which is a share price for which I bought shares for.
    In remaining cells in Column B, Cells B13 to whenever, I have the daily share price for that share, line by line.
    What I am trying to do is get Excel to colour the text in the cells that are less than the value of B3 as red, and if the price is above B3, then green.
    Is this possible in Excel?
    Thanks heaps.

    Bill

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Automatically changing the color of text in cell (

    Select the cells of interest:
    B13: to whatever

    Format - conditional formatting...
    Cell Value is
    Less than
    =$B$3
    <format>
    Font(tab), Color [Select red]
    <ok><Add>
    Cell Value is
    Greater than
    =$B$3
    <format>
    Font(tab), Color [Select gree]
    <ok><ok>

    If it is equal to B3 it will remain the explicitly formatted color
    Steve

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Automatically changing the color of text in cell (

    Yes, using conditional formatting.
    - Select column B (or the cells you want to apply it to).
    - Note which cell is the active cell within the selection (its address is displayed in the box on the left of the formula bar)
    - In the following, I'll assume that the active cell is B1, change the formulas as needed.
    - Make sure you use absolute/relative addressing as in my sample formulas.
    - Select Format | Conditional Formatting...
    - Select Formula Is from the dropdown list.
    - Enter the following formula in the box next to it:
    <code>
    =AND($B1<$B$3,NOT(ISBLANK($B1)))
    </code>
    - Click the Format... button.
    - Activate the Font tab (if necessary).
    - Select Red from the color dropdown list.
    - Click OK to close the Cell Properties dialog.
    - Click Add >>,
    - Select Formula Is from the dropdown list.
    - Enter the following formula in the box next to it:
    <code>
    =AND($B1>$B$3,ISNUMBER($B1))
    </code>
    - Click the Format... button.
    - Activate the Font tab (if necessary).
    - Select Red from the color dropdown list.
    - Click OK to close the Cell Properties dialog.
    - Click OK to close the Conditional Formatting dialog.

  4. #4
    2 Star Lounger
    Join Date
    Mar 2003
    Posts
    191
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatically changing the color of text in ce

    Hans, Steve,

    Thanks heaps. Both solutions worked perfectly. Much appreciated.

    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •