numbering in table

Y

ykchanaed

in previous versions of Word, numbering inside table can be chosed row by row
, or column by column.
In 2003, this function can not be found. Numbering can only be sideway, ie.
1st in top one, then 2nd in the next right cell, and so on.
I want to chose numbering downwards first,ie. next downward cell in the same
column till the end, then the next column.
can anyone help, thanks?
 
Y

ykchanaed

but then how about the next column?
In this case, I have to number this new column again but with the starting
number set as the next of the previous column.
 
G

Greg Maxey

I think you have to go pretty far back in Word to get that feature. Maybe
Word97. You can't do it easily in Word2000 +. Here is a macro that will
apply that numbering format.

If you change row or column count you can simply run it again.

Sub NumberTableTopToBottomLeftToRight()
Dim oTable As Table
Dim seqNum As Long
Dim oRng As Range
Dim i As Integer
Dim j As Integer

seqNum = 1
Set oTable = Selection.Tables(1)

For i = 1 To oTable.Columns.Count
For j = 1 To oTable.Rows.Count
If IsNumeric(Left(oTable.Cell(j, i).Range, 1)) Then
Set oRng = oTable.Cell(j, i).Range
oRng.End = oRng.End - 1
oRng.MoveEndUntil Cset:=Chr$(9), Count:=wdBackward
oRng.Delete
End If
oTable.Cell(j, i).Range.InsertBefore seqNum & "." & vbTab
oTable.Cell(j, i).Range.Paragraphs(1).LeftIndent = InchesToPoints(0.25)
oTable.Cell(j, i).Range.Paragraphs(1).FirstLineIndent =
InchesToPoints(-0.25)
seqNum = seqNum + 1
Next
Next
End Sub
 
Y

ykchanaed

Dear Greg,
It is quite a nice macro.
Although the numbers are not in numbering format, it works fine with me.
Thanks a lot.
 
Y

ykchanaed

Thanks a lot, Greg.
how about change this macro in a way that number the second column with
starting number start with the next number of the end of the previous column?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top