I am sure there is an easier way of doing this than the way I am but without skills.... What I am doing is checking dates to see if they are more than 7, 30 days or less than 7 days away. Depending on the number of days out the cell will change its background color and/or font color. I know little of Excel so don’t laugh at my code ok?
As my title says, it’s over 64K which threw an error from excel saying "procedure to large". Reading the help file it said a procedure can not be more than 64K when compiled. Anyway, this is what I have except multiplied 50 times to cover 50 cells. If anyone knows an easier way I would love to hear about it

Before this got too large it was working. I also had this copied into the Thisworkbook using the Private Sub Workbook_Open() so it would make the changes as soon as I opened the workbook.


I know its sloppy but here is what I have...

Private Sub Worksheet_Change(ByVal Target As Range)

If Worksheets("Sheet1").Range("f6") = "#VALUE!" Then
Worksheets("Sheet1").Range("c6").Font.ColorIndex = 1
Worksheets("Sheet1").Range("c6").Interior.ColorIndex = 0
MsgBox "You have made an error. Please check your typing and try again"
Exit Sub
End If

If Worksheets("Sheet1").Range("f6") < 0 And Worksheets("Sheet1").Range("c55") <> "" Then
Worksheets("Sheet1").Range("c6").Font.ColorIndex = 0
Worksheets("Sheet1").Range("c6").Interior.ColorIndex = 7
End If

If Worksheets("Sheet1").Range("c6") = "" Then
Worksheets("Sheet1").Range("c6").Font.ColorIndex = 1
Worksheets("Sheet1").Range("c6").Interior.ColorIndex = 0
End If


If Target.Address = "$C$6" Then

If Worksheets("Sheet1").Range("f6") >= 30 And Worksheets("Sheet1").Range("f6") < 6000 Then
Worksheets("Sheet1").Range("c6").Font.ColorIndex = 1
Worksheets("Sheet1").Range("c6").Interior.ColorIndex = 4


ElseIf Worksheets("Sheet1").Range("f6") > 6000 Then
Worksheets("Sheet1").Range("c6").Font.ColorIndex = 1
Worksheets("Sheet1").Range("c6").Interior.ColorIndex = 0


ElseIf Worksheets("Sheet1").Range("f6") <= 29 And Worksheets("Sheet1").Range("f6") >= 7 Then

Worksheets("Sheet1").Range("c6").Font.ColorIndex = 1
Worksheets("Sheet1").Range("c6").Interior.ColorIndex = 6

ElseIf Worksheets("Sheet1").Range("f6") < 7 And Worksheets("Sheet1").Range("f6") > 0 Then

Worksheets("Sheet1").Range("c6").Font.ColorIndex = 0
Worksheets("Sheet1").Range("c6").Interior.ColorIndex = 3

End If


End If
@@NEXT set repeats the above code except has f6 as f7 and c6 as c7 etc, etc. This repeats like this for 50 more times@@

End sub