Hi,
Try this... Far from elegant, but hopefully, it will work for you.
Cheers,
Thomas
Sub Macro8()
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="1"
Selection.FormatConditions(1).Interior.ColorIndex = 4
ActiveCell.Offset(0, 1).Range("A1").Select
Calculate
'End Sub
'Sub Macro9()
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
Application.Run "Macro8"
End Sub
Try this:-
I'm not sure how much of the row should be
colored, so choose your with statement as needed:
Private Sub CommandButton1_Click()
Dim cel As Object
For Each cel In Range("ATD").Columns(1).Cells
If cel < 1 Then
With Intersect(cel.EntireRow, ActiveSheet.UsedRange).Interior ' within UsedRange
' With cel.EntireRow.Interior ' whole row
.ColorIndex = 8
.Pattern = xlSolid
End With
End If
Next cel
End Sub
This worked a trat thank you so much. You have given me the best Christmas present. Hope you have a Merry Christmas and a happy New Year.