IF function for change colour of row based on cell value

hotdogs1999

Board Regular
Joined
Dec 11, 2018
Messages
57
Hello All,

looking for IF function that will highlight a full row if the cell in that row in column L contains the phrase "Complete"

thanks in advance
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Can't be done with a native function.
You will need to either create a Conditional format rule OR Use VBA
 
Upvote 0
Hello All,

looking for IF function that will highlight a full row if the cell in that row in column L contains the phrase "Complete"

thanks in advance
Is this part of the same thing I answered for you about moving rows.

These two things could be done with the script I provided for you.
But in your previous post you said complete in column G

And define highlight
 
Last edited:
Upvote 0
yes, this actually does have to do with the same thing.

sorry for the confusion, G was hypothetical. i just adjusted it to the appropriate column when i inserted it. :)
 
Upvote 0
Well I'm confused now do you need more help

Are you saying the script I wrote you worked but now you want the rows highlighted.
And does that mean make row interior color Green.
 
Upvote 0
sorry for the confusion.

so i need to move entire row to bottom of active sheet when cell in specific column (e.g. G) contains "complete", and when it is moved change the fill colour of the entire row to green.

does that make sense?
 
Upvote 0
Try this:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("G:G")) Is Nothing Then
'Modified  12/13/2018  11:09:22 PM  EST
If Target.Cells.CountLarge > 1 Or IsEmpty(Target) Then Exit Sub
Dim Lastrow As Long
Dim r As Long
r = Target.Row
Lastrow = Cells(Rows.Count, "A").End(xlUp).Row
If Target.Value = "complete" Then
    
Rows(r).Interior.ColorIndex = 4
    
    Rows(r).Copy Rows(Lastrow + 1)
    
    Rows(r).Delete
End If
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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