I know this is going to come down to some sort of silly formatting issue but...I keep getting a "compile syntax error" on line 13. Of course, I tried changing it many different ways but it still won't compile an run. BTW, this is in Excel 2003 which I guess I've forgotten since I've been using the latest and greatest at other client sites. Can someone assist, thanks?
.............
Dim cell As Integer
cell = 10
For Counter = 1 To 2
' ActiveCell.Offset(1, 0).Range("A1").Select
Selection.FormatConditions.Delete
' Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$T$9>$R$9"
Selection.FormatConditions.Add Type:=xlExpression, Formula1:=""=$T$"&cell&">$R$"&cell""
' Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$T$Call i()>$R$Call i()"
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 50
End With
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$T$i<$R$i"
With Selection.FormatConditions(2).Font
.Bold = True
.Italic = False
.ColorIndex = 3
End With
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=$R$i"
ActiveCell.Offset(1, 0).Range("A1").Select
' Workbook.Add (cell:=10)
Next Counter
End Sub
...............
.............
Dim cell As Integer
cell = 10
For Counter = 1 To 2
' ActiveCell.Offset(1, 0).Range("A1").Select
Selection.FormatConditions.Delete
' Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$T$9>$R$9"
Selection.FormatConditions.Add Type:=xlExpression, Formula1:=""=$T$"&cell&">$R$"&cell""
' Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$T$Call i()>$R$Call i()"
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 50
End With
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$T$i<$R$i"
With Selection.FormatConditions(2).Font
.Bold = True
.Italic = False
.ColorIndex = 3
End With
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=$R$i"
ActiveCell.Offset(1, 0).Range("A1").Select
' Workbook.Add (cell:=10)
Next Counter
End Sub
...............