LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Numbering Sequence DataGuy Excel Discussion (Misc queries) 3 June 2nd 10 01:46 AM
re-numbering or sequence priorities formula Toni Lord Excel Discussion (Misc queries) 2 July 1st 09 10:56 PM
Macro to create sequence of numbers [email protected] Excel Programming 1 February 22nd 08 06:33 PM
How to link diffrent documents with a sequence of page numbering? ndondo Excel Discussion (Misc queries) 0 March 10th 06 05:29 AM
sequence of page numbering from diffrent documents in to a footer ndondo Excel Discussion (Misc queries) 0 March 9th 06 09:59 AM


All times are GMT +1. The time now is 12:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"