Hi,
This:
is the worksheet with Codename Sheet1 of Personal.xls, no other sheet and you cannot use codenames to refer to a sheet in a different workbook then the code is.
If you want to use it on the sheet you have activated use
a shorted code:
Sub test()
Dim aConditions: aConditions = Array(255, 255, 90, 700)
Dim LastRow As Long: LastRow = 50 'testing
Dim i As Integer, j As Integer
'
With ActiveSheet
j = 0
For i = 4 To 10 Step 2
With .Range(.Cells(2, i), .Cells(LastRow, i))
.FormatConditions.Add xlExpression, Formula1:="=LEN(" & .Cells(1, 1).Address(False, False) & ")>=" & aConditions(j)
.FormatConditions(1).Interior.ColorIndex = 3
.FormatConditions(1).Font.ColorIndex = 3
End With
j = j + 1
Next i
End With
End Sub
Bookmarks