L
LeeL
Any ideas, please?
The sub below stops with Run-time error '6':
Overflow
Sub ColourIt()
NumOfRows = Cells(Rows.Count, 1).End(xlUp).Row
Dim OnHand As Integer
Dim ATS As Integer
For CurrentRow = 2 To NumOfRows
OnHand = ActiveSheet.Cells(CurrentRow, 6)
ATS = ActiveSheet.Cells(CurrentRow, 7)
If OnHand + ATS1 = 0 Then
Cells(CurrentRow, 2).Interior.ColorIndex = 22
End If
Next
End Sub
The sub below stops with Run-time error '6':
Overflow
Sub ColourIt()
NumOfRows = Cells(Rows.Count, 1).End(xlUp).Row
Dim OnHand As Integer
Dim ATS As Integer
For CurrentRow = 2 To NumOfRows
OnHand = ActiveSheet.Cells(CurrentRow, 6)
ATS = ActiveSheet.Cells(CurrentRow, 7)
If OnHand + ATS1 = 0 Then
Cells(CurrentRow, 2).Interior.ColorIndex = 22
End If
Next
End Sub