Select C6 down to last used cell, as determined in column B
Try something like this.
Dim lLastRow As Long
lLastRow = Sheet1.Range("B:B").SpecialCells(xlCellTypeLastCel l).Row
With Sheet1.Range("C6:C" & lLastRow)
.Select
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="=($B6=""*"")"
.FormatConditions(1).Interior.ColorIndex = 4
End With
Sheet1.Range("C6").Select
"BEEJAY" wrote:
Column B ALWAYS has entries in each cell.
The entries in B always go to bottom of used range on worksheet.
Once last cell is determined, need to select Column C6 down to last cell,
in order to process the following code.
' Select C6 down to last used row
Selection.FormatConditions.Add Type:=xlExpression,
Formula1:="=($B6=""*"")"
Selection.FormatConditions(1).Interior.ColorIndex = 4
any help would be appreciated.
|