Use the following code in a macro to insert numbers such as that in the cells in the first column of the table in which the selection is located:
Dim i As Long With Selection.Tables(1) For i = 1 To .Rows.Count .Cell(i, 1).Range.Text = "06-" & Format(i, "00#") Next i End With
If you don't want a number in the first row, use
Dim i As Long With Selection.Tables(1) For i = 2 To .Rows.Count .Cell(i, 1).Range.Text = "06-" & Format(i - 1, "00#") Next i End With
-- Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis.
Doug Robbins - Word MVP
"Slow Learner" <SlowLearner[ at ]discussions.microsoft.com> wrote in message news:817C3946-61D0-48E8-B384-90CA0180EE0F[ at ]microsoft.com...
[Quoted Text] > Hi Suzanne > The 06 represents the current year. Next year the numbering will start at > 07-0001 etc. > TFHIA > > > "Suzanne S. Barnhill" wrote: > >> Please provide more detail about where the 06 comes from. The rest is >> simple. >> >> -- >> Suzanne S. Barnhill >> Microsoft MVP (Word) >> Words into Type >> Fairhope, Alabama USA >> Word MVP FAQ site: http://word.mvps.org>> Email cannot be acknowledged; please post all follow-ups to the newsgroup >> so >> all may benefit. >> >> "Slow Learner" <SlowLearner[ at ]discussions.microsoft.com> wrote in message >> news:4E9728AA-E836-470A-A4FD-461E833FB32D[ at ]microsoft.com... >> > I want to have numbering appear automatically in a column. My >> > numbering >> is >> > like 06-01 then 06-02, 06-03 etc. Can anyone assist in how I set this >> > up. >> > TIA >> >>
|