Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA in Excel

Status
Not open for further replies.

NiteCrawlr

Programmer
Mar 16, 2001
140
BR
Hi,
I´m trying to do something but with no success, I have the following code:
If Target.Address Like "$D$" & cont Then
If Range("B" & cont) = "OK" Then
Range("H" & cont) = "100%"
ElseIf Range("B" & cont) = "NK" Then
Range("H" & cont) = "0%"
End If
End If

and instead of changing the value of column H I would like to change the color of the cells in collumn H.
ie. When I change the value of cell A1 to OK, I want the color of cell H1 to change to Red.

tks in advance

Nite
 
Try using conditional formatting as follows.

Select the cells in H that you want to red, go to Format, Conditional Formatting, select Formula Is ib the dropdown under Condition 1, then in the input box enter =$A$1="Ok", and apply the desired format you require when A1 = Ok.

A.C.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top