Consulting

Results 1 to 5 of 5

Thread: Conditional Formatting If cell equal to ... format the whole row or column

  1. #1
    VBAX Regular
    Joined
    Jun 2012
    Posts
    9
    Location

    Conditional Formatting If cell equal to ... format the whole row or column

    Hello,

    I need 2 conditional formatting rules:

    1. if 1 cell value in row is let's say "xyz" format the whole cells in the row to be red (the text)

    2. if 1 cell value in a column is "xyz" format the whole cells in the column to pe green (the cell fill).

    Thank you very much

  2. #2
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Just select the whole row or column and apply your condition Like =countif(A1,"xyz")>0
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    VBAX Regular
    Joined
    Jun 2012
    Posts
    9
    Location

    Post

    Thx Simon but is not working, maybe i'm doing something wrong.

    I've attached a file with an example.

    I want the rows that have "Demis" in colomn C to automatically format as red text and the colums that have "Sam" and "Dum" to have the cell filled with any color (for example colum H has "Sam" in H3 and i want the cells filled from H3 to H283).

    Thank you
    Attached Files Attached Files

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    see attached
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  5. #5
    Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,003
    Location
    Here's Demis and Sam sorted, you can work out how to do Dum
    Attached Files Attached Files
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

Posting Permissions

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