Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Feb 2002
    Harrisburg, Pennsylvania, USA
    Thanked 0 Times in 0 Posts

    if then for changing color (windows xp)

    Hello All,

    I am looking for an if then statement that I can use in a cell that will say "if cell a2 is x then cell b5 should have the color of green or red or something. I would also like to know where I can find the listing of colors that I can use within the formula if I decide to change the cell color at some time.
    Thanks for the help.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: if then for changing color (windows xp)

    You cannot change the color of a cell in a cell formula. You can use conditional formatting, or code in the Worksheet_Change event.

    Here is how to do it using conditional formatting:
    - Select cell B5
    - Select Format | Conditional Formatting...
    - Select "Formula Is" in the dropdown list.
    - Enter =(A2=3) in the box next to it.
    - Click Format...
    - If you want to set the font color, select it in the Font tab; if you want to set the background color, set it in the Pattern tab.
    - Click OK.
    - You can add up to two additional conditions, each with their own formatting.
    - Click OK when done.

Posting Permissions

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