ssinghal
01-18-2007, 07:49 AM
In the following code, I want to select a range from H2 to the last row of my sheet. The 62 is not constant. I need the last row to be determined by data in column b as h has no data.
Range("H2:H62").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="0.75", Formula2:="0.97"
Selection.FormatConditions(1).Interior.ColorIndex = 44
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
Formula1:="0.9621"
Selection.FormatConditions(2).Interior.ColorIndex = 3
Range("H2:H62").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
Formula1:="0.75", Formula2:="0.97"
Selection.FormatConditions(1).Interior.ColorIndex = 44
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreater, _
Formula1:="0.9621"
Selection.FormatConditions(2).Interior.ColorIndex = 3