Results 1 to 5 of 5

Conditional formatting to highlight row if cell x contains......

This is a discussion on Conditional formatting to highlight row if cell x contains...... within the Excel Questions forums, part of the Question Forums category; Hi, I have been staring at my spreadsheets all day and now my brain is refusing to work. I am ...

  1. #1
    New Member
    Join Date
    Jul 2012
    Posts
    14

    Default Conditional formatting to highlight row if cell x contains......

    Hi,

    I have been staring at my spreadsheets all day and now my brain is refusing to work.

    I am trying to get a formula that will highlight rows where cell K contains a specific word.

    For example - highlight row if cell K contains the word complete.

    It only needs to search for the text in K but needs to highlight all the rows that contains "complete" in that column".

    Does that make sense?

    Thanks in advance for any help.

  2. #2
    Board Regular
    Join Date
    Apr 2012
    Location
    Toronto, Canada
    Posts
    1,708

    Default Re: Conditional formatting to highlight row if cell x contains......

    Try:

    Code:
    Option Compare Text
    Sub Test()
        Dim bottomK As Integer
        bottomK = Range("K" & Rows.Count).End(xlUp).Row
        Dim c As Range
            For Each c In Range("K2:K" & bottomK) 'Assumes that there is a column title in K1
                If c = "Complete" Then
                    c.EntireRow.Interior.Color = 255
                End If
            Next c
    End Sub

  3. #3
    New Member
    Join Date
    Jul 2012
    Posts
    14

    Default Re: Conditional formatting to highlight row if cell x contains......

    Thanks but was looking for a formula for conditional format as I am not good with macros.

  4. #4
    MrExcel MVP
    Moderator
    Smitty's Avatar
    Join Date
    May 2003
    Location
    Crested Butte, CO
    Posts
    27,277

    Default Re: Conditional formatting to highlight row if cell x contains......

    Welcome to the Board!

    You can use the CF Formula option. Just select the entire range you want highlighted, then:

    =$K1="Complete"

    Format as desired.

    HTH,
    Smitty

    Every once in a while, there's a sudden gust of gravity...

    Check out my new book at the Mr. Excel Bookstore!

    Mr. Excel HTML Maker - Post a shot of your sheet

  5. #5
    New Member
    Join Date
    Jul 2012
    Posts
    14

    Default Re: Conditional formatting to highlight row if cell x contains......

    Thanks Smitty, that worked. Its always the simplest of ones i over think.

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