How to change alpha numbering? - X, Y, Z, A1, B1, C1....

M

Mike

I have someone that is looking to do alpha auto numbering, but rather than
go A, B, C...X, Y, Z, AA, BB, CC - wants it to go A, B, C...X, Y, Z, A1, B1,
C1... I found what I thought was a close option, but it didn't work (for
doing AA, AB, AC, etc). Is there a way to do this?

Thanks in advance,

Mike
 
D

Doug Robbins

If you select the range of paragraphs to which you want to apply the
numbering and then run a macro containing the following code, it will number
them in that fashion:

Dim i As Long
For i = 1 To Selection.Paragraphs.Count
If i < 27 Then
Selection.Paragraphs(i).Range.InsertBefore Chr(64 + i) & vbTab
ElseIf i Mod 26 = 0 Then
Selection.Paragraphs(i).Range.InsertBefore "Z" & Int(i / 26) - 1 &
vbTab
Else
Selection.Paragraphs(i).Range.InsertBefore Chr((i Mod 26) + 64) &
Int(i / 26) & vbTab
End If
Next i


--
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
 

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