column A
Header
2.1
2.2
2.3
2.4
2.5
etc.
I would like to use Column A and start with a decimal number such as:
A1 = 2.1
A2 = 2.2
select A1:A2 and drag which will go upto 2.9 or 2.109 or as far as i would
like and also be able to add then 3.0, 3.1, etc.
I have used this:
in A1 type formula and copy that down...
="2." & ROW()
I works as long as I start in column A and Row 1 but going to any other row
it starts with that row number instead of starting with 1.0 or 2.0 or what
ever number I choose.
I would like it to be able to auto file as well if that is possible.
btw, i can get it to do the following:
A1= 2.1
A2= 2.2
A3= 2.3
A4= 2.4
A5= 2.5
A6= 2.6
A7= 2.7
A8= 2.8
A9= 2.9
A10= 2.10
A11= 2.11
A12= 2.12
etc, to what ever range i want before changing to
A199= 3.0 or higher.
Here's an example:
Column A Column B
Row1 2.1.5.1 3com-tsmux
Row2 2.1.5.2 acap
Row3 2.1.5.3 afbackup
Row4 2.1.5.4 afpovertcp
Row5 2.1.5.5 afs3-bos
Row6 2.1.5.6 afs3-callback
Row7 2.1.5.7 afs3-errors
Row 8 2.1.5.8 afs3-fileserver
Row9 2.1.5.9 afs3-kaserver
Row10 2.1.5.10 afs3-prserver
Row11 2.1.5.11 afs3-rmtsys
The macro solution was one that should have worked by simply put the
starting number in a cell, then select from that
cell to the last cell you want to put your serial number in, and finally run
the macro.
The macro was modified to let me change the numbering within a
selection...
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)
If .Text <> "" Then
S = .Text
W = Int(S) 'Left(S, InStr(S & ".", ".") - 1)
F = Mid(S, InStr(S & ".0", ".") + 1)
End If
.NumberFormat = "@"
.HorizontalAlignment = xlRight
.Value = W & "." & F
End With
F = CStr(Val(F + 1))
Next
End Sub
To see what I mean, go to a blank column and in any cell in that column, put
2.0; then, in the same column, put 3.0 in a cell some number of rows below
the 2.0 cell; now, make a selection starting with the 2.0 cell and going
past the 3.0 cell... run the macro and the 2.# series will stop when it
reaches the 3.0 cell and from then on, the number will be 3.# until the end
of the selection. You can encompass as many new numbering starting points
(the 2.0 and 3.0 values, although you don't have to start with those number)
as you want and the code will adapt to them.
The problem is that it doesn't work for me.
Please help me to understand what is wrong with the Macro or the execution
of it.