Macro Trouble with Numbering Sequence
I used the following Macro in Excel 2003:
Sub FillDownWithDecimals()
Dim X As Long, W As String, F As String, S As String
S = Selection(1).Text
W = Int(S) 'Left(S, InStr(S & ".", ".") - 1)
F = Mid(S, InStr(S & ".0", ".") + 1)
For X = 0 To Selection.Count - 1
With Selection(1).Offset(X)
..NumberFormat = "@"
..HorizontalAlignment = xlRight
..Value = W & "." & F
End With
F = CStr(Val(F + 1))
Next
End Sub
I get a debug error on this line:
W = Int(S) 'Left(S, InStr(S & ".", ".") - 1)
Can't execute code in break mode
|