I'm trying to format a row depending on the value of a single cell within that row. Is it possible to put VB code behind the sheet to set this up. If so, can someone help me with the code. I'm trying to change the colour of the row to red when B2 = Y.
This is the code I get when selecting formatting a single cell but when I place the code behind a sheet, it locks the cell location at B2
Range("B2").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""Y"""
Selection.FormatConditions(1).Interior.ColorIndex = 4
Hope someone can help!
This is the code I get when selecting formatting a single cell but when I place the code behind a sheet, it locks the cell location at B2
Range("B2").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""Y"""
Selection.FormatConditions(1).Interior.ColorIndex = 4
Hope someone can help!