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

Linsie

New Member
Joined
Jul 19, 2012
Messages
27
Office Version
  1. 2021
Platform
  1. Windows
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.</SPAN>
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
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
 
Upvote 0
Thanks but was looking for a formula for conditional format as I am not good with macros.
 
Upvote 0
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,
 
Upvote 0
Thanks Smitty, that worked. Its always the simplest of ones i over think.
 
Upvote 0

Forum statistics

Threads
1,214,667
Messages
6,120,822
Members
448,990
Latest member
rohitsomani

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top