Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
Reverse table order/number rows
How can I:
a) Reverse the order of a table and b) Automatically number each row? Thanks, Jess |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
Reverse table order/number rows
Use a macro containing the following code
Dim i As Long With Selection.Tables(1) .Columns.Add beforecolumn:=.Columns(1) For i = 2 To .Rows.Count .Cell(i, 1).Range.Text = i - 1 Next i .SortDescending 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 "jessim" wrote in message ... How can I: a) Reverse the order of a table and b) Automatically number each row? Thanks, Jess |
#3
Posted to microsoft.public.word.tables
|
|||
|
|||
Reverse table order/number rows
Hi Doug,
The macro works great! Just one little problem: after it ran, the rows are now numbered descendingly 84-1 instead of 1-84 (84 rows in my table, natch). Is there a way to just reverse that 1 numbering column alone? Thanks again, Jess On Nov 29, 2:39 pm, "Doug Robbins - Word MVP" wrote: Use a macro containing the following code Dim i As Long With Selection.Tables(1) .Columns.Add beforecolumn:=.Columns(1) For i = 2 To .Rows.Count .Cell(i, 1).Range.Text = i - 1 Next i .SortDescending 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 "jessim" wrote in message ... How can I: a) Reverse the order of a table and b) Automatically number each row? Thanks, Jess |
#4
Posted to microsoft.public.word.tables
|
|||
|
|||
Reverse table order/number rows
Use
Dim i As Long With Selection.Tables(1) .Columns.Add beforecolumn:=.Columns(1) For i = 2 To .Rows.Count .Cell(i, 1).Range.Text = .Rows.Count - i + 1 Next i .SortAscending 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 "jessim" wrote in message ... Hi Doug, The macro works great! Just one little problem: after it ran, the rows are now numbered descendingly 84-1 instead of 1-84 (84 rows in my table, natch). Is there a way to just reverse that 1 numbering column alone? Thanks again, Jess On Nov 29, 2:39 pm, "Doug Robbins - Word MVP" wrote: Use a macro containing the following code Dim i As Long With Selection.Tables(1) .Columns.Add beforecolumn:=.Columns(1) For i = 2 To .Rows.Count .Cell(i, 1).Range.Text = i - 1 Next i .SortDescending 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 "jessim" wrote in message ... How can I: a) Reverse the order of a table and b) Automatically number each row? Thanks, Jess |
#5
Posted to microsoft.public.word.tables
|
|||
|
|||
Reverse table order/number rows
I think it's more due to my unfamiliarity with how macros work that I
just ended up accidentally deleting/fudging around with them. After they ran, my tables ended up looking funny, so I did a workaround by copy-and-pasting the first column to another document and reversing it there, then pasting it back. Otherwise, the macros worked great and did their job :-) Thanks a lot, Jess |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Arbitrary number of rows in a table | Mailmerge | |||
how can I count the number of rows in an existing table | Tables | |||
Count number of rows in table | Microsoft Word Help | |||
How can I reverse the order of page number and index entry? | Page Layout | |||
Limiting number of table rows per page | Tables |