Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Numbering / February 2006

Tip: Looking for answers? Try searching our database.

Reverse order numbered list

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Captain Frog - 12 Feb 2006 03:01 GMT
Hi All,

Is there a simple method to display a numbered list in reverse order? Like
Dave Letterman's Top 10 List: 10, 9, 8... Any help is gratefully
appreciated.

Regards,
Robert
Greg Maxey - 12 Feb 2006 03:28 GMT
Skipper,

Simple?  debatable.

If you select the list of Dave's favorites and run the following macro
(provided each item in the list is an individual paragraph), they will be
numbered as desired.

Sub RevNum()
Dim i As Long
Dim j As Long
Dim myRng As Range
j = Selection.Paragraphs.Count
For i = 1 To Selection.Paragraphs.Count
 Set myRng = Selection.Paragraphs(i).Range
 myRng.InsertBefore j + 1 - i & ". "
Next i
End Sub

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Hi All,
>
[quoted text clipped - 4 lines]
> Regards,
> Robert
Greg Maxey - 12 Feb 2006 03:42 GMT
Skipper,

As a 10 is wider than a 1 or 9, you might want to use a Tab instead of a
space.

Sub RevNum()
Dim i As Long
Dim j As Long
Dim myRng As Range
Selection.ParagraphFormat.TabStops.Add Position:=InchesToPoints(0.25)
j = Selection.Paragraphs.Count
For i = 1 To Selection.Paragraphs.Count
 Set myRng = Selection.Paragraphs(i).Range
 myRng.InsertBefore j + 1 - i & "." & vbTab
Next i
End Sub

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Hi All,
>
[quoted text clipped - 4 lines]
> Regards,
> Robert
Suzanne S. Barnhill - 12 Feb 2006 04:47 GMT
See http://homepage.swissonline.ch/cindymeister/NbrFAQ.htm#RevNbr for a
method that doesn't require VBA.

Signature

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.

> Hi All,
>
[quoted text clipped - 4 lines]
> Regards,
> Robert
Greg Maxey - 12 Feb 2006 05:48 GMT
Suzanne,

I am aware of that link, and didn't recommend it as the user seemed to
already have a list that he needed to number in reverse.  So select it and
run the macro. Cindy's method is good, yet sort of impractical.  I mean your
have to know the high number in advance, set up the fields and then type the
sequence.

Consider:
one
two
three
four
five
six
seven
eight
nine
ten

It is much easier to select that then run my proposed macro than it is to
set up the field codes, save then (I guess as AutoTex) and then type the
list (would you agree?)

The challenge (and I can't figure it out) is to create such a sequence as my
method and Cindy's does quite well and then delete one of the sequence
members and the list update accordingly.  I mean consider the following (in
no particular order):

10. Rolling Stones
9.   Little Feat
8.   Crosby, Stills, Nash and Young
7.   The Doors
6.   U2
5.   Johnny Cash
4    Jewel
3.   Brotha Iz
2.   Alice Cooper
1.  Johnny Love Jazz

Lets delete one of the members (say number 5).  Wouldn't it be nice if the
result would be:

9. Rolling Stones
8.   Little Feat
7.   Crosby, Stills, Nash and Young
6.   The Doors
5.   U2
4    Jewel
3.   Brotha Iz
2.   Alice Cooper
1.  Johnny Love Jazz

I have been cracking my small skull trying to achieve the desired result
described above.  Hoping a small guy or gal will provide.

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> See http://homepage.swissonline.ch/cindymeister/NbrFAQ.htm#RevNbr for
> a method that doesn't require VBA.
[quoted text clipped - 7 lines]
>> Regards,
>> Robert
Greg Maxey - 12 Feb 2006 06:02 GMT
Here is hoping that anyone that reads my posts will excuse my terrible
spelling.   By "small" I meant of course "smart."

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Suzanne,
>
[quoted text clipped - 63 lines]
>>> Regards,
>>> Robert
Doug Robbins - Word MVP - 12 Feb 2006 08:33 GMT
Here's an old one of mine that could probably be re-written so that it
doesn't use the Selection object:

' Macro created 25/04/1999 by Doug Robbins to apply/re-apply reverse
sequential numbering

'

   Numparas = Selection.Paragraphs.Count

   Selection.MoveLeft Unit:=wdCharacter, Count:=1

   ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes

   Selection.Extend

   Selection.MoveRight Unit:=wdCharacter, Count:=1

   If InStr(Selection.Text, "SEQ") > 0 Then

       Selection.MoveRight Unit:=wdCharacter, Count:=2

       Selection.Delete Unit:=wdCharacter, Count:=1

   Else

       Selection.Collapse Direction:=wdCollapseStart

   End If

   Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _

   PreserveFormatting:=False

   Selection.TypeText Text:="=" & Numparas + 1 & "-"

   Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _

       PreserveFormatting:=False

   Selection.TypeText Text:="SEQ  ""ReverseList"""

   With Selection.ParagraphFormat

       .LeftIndent = CentimetersToPoints(1.27)

       .FirstLineIndent = CentimetersToPoints(-1.27)

   End With

   Selection.MoveRight Unit:=wdCharacter, Count:=4

   Selection.InsertAfter "." & vbTab

   Counter = 1

   While Counter < Numparas

       Selection.Move Unit:=wdParagraph, Count:=1

       Selection.Extend

       Selection.MoveRight Unit:=wdCharacter, Count:=1

       If InStr(Selection.Text, "SEQ") > 0 Then

           Selection.MoveRight Unit:=wdCharacter, Count:=2

           Selection.Delete Unit:=wdCharacter, Count:=1

       Else

           Selection.Collapse Direction:=wdCollapseStart

       End If

       Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _

       PreserveFormatting:=False

       Selection.TypeText Text:="=" & Numparas + 1 & "-"

       Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, _

       PreserveFormatting:=False

       Selection.TypeText Text:="SEQ ""ReverseList"""

       With Selection.ParagraphFormat

           .LeftIndent = CentimetersToPoints(1.27)

           .FirstLineIndent = CentimetersToPoints(-1.27)

       End With

       Selection.MoveRight Unit:=wdCharacter, Count:=4

       Selection.InsertAfter "." & vbTab

       Counter = Counter + 1

   Wend

   ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes

   ActiveDocument.Select

   ActiveDocument.Fields.Update

Signature

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

> Here is hoping that anyone that reads my posts will excuse my terrible
> spelling.   By "small" I meant of course "smart."
[quoted text clipped - 66 lines]
>>>> Regards,
>>>> Robert
Doug Robbins - Word MVP - 12 Feb 2006 10:45 GMT
The following is a far superior macro (than my 1999 effort) to
apply/re-apply reverse sequential numbering to a range of paragraphs:

Dim i As Long, Numrange As Range
Set Numrange = Selection.Range
With Numrange
   For i = 1 To .Paragraphs.Count
       If IsNumeric(.Paragraphs(i).Range.Characters(1)) Then
           With .Paragraphs(i).Range
               While IsNumeric(.Characters(1))
                   .Characters(1).Delete
               Wend
               .Characters(1).Delete
           End With
       End If
       .Paragraphs(i).Range.InsertBefore .Paragraphs.Count - i + 1 & vbTab
   Next i
End With

Signature

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

> Here is hoping that anyone that reads my posts will excuse my terrible
> spelling.   By "small" I meant of course "smart."
[quoted text clipped - 66 lines]
>>>> Regards,
>>>> Robert
Suzanne S. Barnhill - 12 Feb 2006 16:21 GMT
I had forgotten what Cindy's method actually was except that it involved
fields rather than a macro. But for Top 10 countdown lists, it is ideally
suited.

Signature

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.

> Suzanne,
>
[quoted text clipped - 63 lines]
> >> Regards,
> >> Robert
Captain Frog - 14 Feb 2006 01:32 GMT
Hi Everyone,

Thank you all for your help. Each method will probably do the trick. I'll
set both up and see which suits my need best. I really appreciate the great
job you do for everyone. It is nice to be so ably helped. Happy Valentine's
Day.

Regards,
Robert aka Captain Frog
> See http://homepage.swissonline.ch/cindymeister/NbrFAQ.htm#RevNbr for a
> method that doesn't require VBA.
[quoted text clipped - 8 lines]
>> Regards,
>> Robert
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.