Hi guys,
I need a simple macro that does the follow:
(Assume the range is column C)
Logic: If cell does not equal "Active" then entire row should turn red (255).
Thanks,
Hi guys,
I need a simple macro that does the follow:
(Assume the range is column C)
Logic: If cell does not equal "Active" then entire row should turn red (255).
Thanks,
Last edited by TShelt; 06-12-2012 at 11:34 AM.
Try
Sub test() Dim LR As Long, i As Long LR = Range("C" & Rows.Count).End(xlUp).Row For i = 1 To LR If Range("C" & i).Value <> "Active" Then Rows(i).Interior.Color = RGB(255, 0, 0) Next i End Sub
Perfect. Thanks. Closing
Curious, how would it be changed if it could be "active" or "Active" ...
Nevermind, added option compare text at top
Or
Sub test() Dim LR As Long, i As Long LR = Range("C" & Rows.Count).End(xlUp).Row For i = 1 To LR If LCase(Range("C" & i).Value) <> "active" Then Rows(i).Interior.Color = RGB(255, 0, 0) Next i End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks