+ Reply to Thread
Results 1 to 5 of 5

Conditional Format Entire Row Based On One Cell In Row

  1. #1
    Forum Contributor
    Join Date
    05-17-2007
    Location
    Michigan, US
    MS-Off Ver
    2007
    Posts
    111

    Conditional Format Entire Row Based On One Cell In Row

    I have not worked with conditional formatting much at all. I have been able to apply conditional formatting to a column of data, but I would like to highlight the entire row instead of just the one cell in that column.

    Say I have five columns of data for each record (ID Number, Address, City, State, ZIP Code). I know how to apply conditional formatting based on the zip code and have Excel highlight the cells in the zip code column that meet my conditions. What I would like to do is have it highlight not just the zip code, but also the ID number, address, city, and state when a zip code meets a condition.

    Thanks, Spence

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Assuming your 5 columns are A to E and you want to highlight them all for specific rows where zip code is 12345.

    Select columns A:E

    Use conditional formatting with "formula is" option and the formula

    =$E1=12345

    Select required formatting

    Note: the $ sign is essential

  3. #3
    Forum Contributor
    Join Date
    05-17-2007
    Location
    Michigan, US
    MS-Off Ver
    2007
    Posts
    111
    Daddylonglegs, thank you for the quick answer. Your method works great, although the $E1 doesnt' make complete sense to me. I thought I would have had to put a range in there.

    If you don't mind I would like to take this a step further. My first column is a unique "ID Number". I already have a conditional format rule set up to find duplicate values in that column and apply a format with cell color, strike-through, etc. to make it immediately obvious if I try to create a new row that has the same "ID Number" as a previous row. Is there an easy way to have this conditional format applied to the entire row instead of just the cell in the column being checked for duplicate values?

    Thanks, Spence

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Still selecting the 5 columns you can use

    =COUNTIF($A:$A,$A1)>1

    If you want both conditions to apply in the same row then you'll need to use 3 conditions

    condition 1
    =($E1=12345)*(COUNTIF($A:$A,$A1)>1)

    condition 2
    =COUNTIF($A:$A,$A1)>1

    condition 3
    =$E1=12345

    Note: referring to just $E1 works because the formula automatically adjusts for each cell, in row 1 all 5 columns remain =$E1=12345 [ because the $ prevents any change] but in row 2 this will become $E2=12345

  5. #5
    Registered User
    Join Date
    08-22-2011
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Conditional Format Entire Row Based On One Cell In Row

    Dear daddylonglegs, thank you for very helpful answers. Could you please add another example of using "Conditional Format Entire Row Based On One Cell In Row" when the criteria is that Cell contains a "string"

    Thanks a lot in advance.

+ 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