Results 1 to 5 of 5

Conditional Cell formatting

This is a discussion on Conditional Cell formatting within the Excel Questions forums, part of the Question Forums category; Can you format a cell using some variation of the IF condition? Specifically, if I place an "X" in a ...

  1. #1
    New Member
    Join Date
    Aug 2002
    Posts
    1

    Default

    Can you format a cell using some variation of the IF condition? Specifically, if I place an "X" in a cell can I am make that cell and the two cells to its left become highlighted in light gray? And, of course, if I remove the X the cells would return to the previous "no highlight"?

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654

    Default

    Yes, select the 3 cells (e.g., A1:C1) and setup a Formula Is condition using the formula, =$C1="X".

  3. #3
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701

    Default

    Take a look at conditional formatting. Add the following constraints:

    Select all the cells
    Go to FORMAT|CONDITIONAL FORMATTING
    Cell value is equal to ="x"
    Click Add
    Formula is =INDIRECT(ADDRESS(ROW(),COLUMN()+1))="x"
    Click Add
    Formula is =INDIRECT(ADDRESS(ROW(),COLUMN()+2))="x"

    Then click the format button, select the Patterns tab, and then select your color.

    _________________
    Kind regards,

    ALCHARA
    [ This Message was edited by: Al Chara on 2002-08-03 16:48 ]

  4. #4
    Board Regular eliW's Avatar
    Join Date
    Mar 2002
    Posts
    1,880

    Default

    On 2002-08-03 16:31, Mark W. wrote:
    Yes, select the 3 cells (e.g., A1:C1) and setup a Formula Is condition using the formula, =$C1="X".
    Mark,
    Your solution will be good for "X" inputs in column C, but how can it be done for "X" in any other column - say F1 which will highlight D1:F1 only ???
    Eli

  5. #5
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654

    Default

    =OR(C1="X",B1="X",A1="X")

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com