Does in line 13 contains other than a number? This will stop the program
since therie was no error checking.
BTW, I found a mistake in my previous code (but nothing related to your
error).
The variable need to be set back to it default like below.
For lngRow = 3 To lngLastRow
Do Until Cells(lngRow, lngCol).Value = "" Or lngCol = 1
lngCount = lngCount + Cells(lngRow, lngCol).Value
lngCol = lngCol - 1
Loop
If lngCount < 0 Then
Cells(lngRow, "F").Value = lngCount
End If
lngCount = 0
lngCol = 5
Next
--
hideki
------------------------------------------------------------------------
hideki's Profile:
http://www.excelforum.com/member.php...o&userid=18903
View this thread:
http://www.excelforum.com/showthread...hreadid=393287