S
ste mac
Hi, the code below adds 1 thru' 14 in column 8 as long as there is
a value in column 1, but it stops running at row 32767 with an overflow
error l need it to carry on down to past row 60,000 is my machine not
good enough? (I did not write the code)
thanks for any help
ste
Sub add1to14()
Application.ScreenUpdating = False
Dim mrow As Integer, mvalue As Integer
Range("a2").Select 'start at cell A1
mvalue = 1
Do Until ActiveCell.Value = ""
mrow = ActiveCell.Row
Cells(mrow, 8) = mvalue
mvalue = mvalue + 1
If mvalue > 14 Then mvalue = 1
ActiveCell.Offset(1, 0).Range("A1").Select
Loop
Range("A1").Select
Application.ScreenUpdating = True
End Sub
a value in column 1, but it stops running at row 32767 with an overflow
error l need it to carry on down to past row 60,000 is my machine not
good enough? (I did not write the code)
thanks for any help
ste
Sub add1to14()
Application.ScreenUpdating = False
Dim mrow As Integer, mvalue As Integer
Range("a2").Select 'start at cell A1
mvalue = 1
Do Until ActiveCell.Value = ""
mrow = ActiveCell.Row
Cells(mrow, 8) = mvalue
mvalue = mvalue + 1
If mvalue > 14 Then mvalue = 1
ActiveCell.Offset(1, 0).Range("A1").Select
Loop
Range("A1").Select
Application.ScreenUpdating = True
End Sub