Re: Formatting index entries



Hi Salty:

Ahhh... That's what I like... A "challenge" :-)

The following procedure will do what you want, and it takes about five extra
minutes once you know how. But make some copies and do some practice: you
may not get it right the first time!

Yours is one of the very few publications for which a Concordance File will
produce valid results :-)

Let's assume that all of your text entries are First Middle Last (e.g. John
Graham McGhie)...

1) mark your index entries

2) Generate your index

3) Copy the index and paste as Unformatted Text into a blank document

4) replace each space with a tab character

5) Convert the whole thing to a table

6) delete the column containing the page numbers

7) Insert three columns to the right of the 3rd column

8) Copy Column 3 (the last names) and paste into Column 4

9) Copy column 1 (First Names) into column 5 and column 2 (Middle names)
into Column 6

10) Add a column between columns 4 and 5

11) Add a column between columns 3 and 4

12) Type a @ (or any other character that isn't used) in the first cell in
Column 4 (the blank one).

13) Copy the whole cell

14) Select cells 2 to last in that column and paste. You will have an at
sign in each cell

15) Repeat steps 12 to 14 in the other blank column to add a colon to the
right of the second Last Name column.

You should now have a table in which each line reads:

First | Middle | Last | @ | Last | : | First | Middle |

16) Select the whole thing and use Table>Convert>Table to text. Choose
"Tabs" as the separator character.

17) Now, use Edit>Replace to replace every tab with a space.

18) This is a great time to tidy up any extraneous spaces: Use Edit>Replace
to replace each instance of " " two spaces with " " one space.

19) Now use Edit>Replace to replace every @ with a tab

20) Now select all of the text and use Table>Convert>Text to Table to
convert the whole thing back into a table.

You will now have a two-column table with:
First Middle Last | Last:First Middle |

21) Save that document.

22) Make a copy of the main document and save under a new name, just in
case of accidents.

23) Now use Edit>Replace to find all tags of type XE and replace with
Nothing.

That's right, you want to rip all the Index tags out of the main document.

Now read the help CAREFULLY about Concordance Files. You have just made
one! Use it.

24) Regenerate the Index, this time using your Concordance File and no tags
at all.

The concordance file will re-tag your your document with new XE tags. The
previously tagged terms will be re-tagged with the names transposed. The
index it produces will be sorted character-for-character in transposed
collation order.

The reason you use a colon, not a comma, in the table is to produce an index
in the format:

Smith
John James
Lucy Annabel
Maureen Daisy

Tolhurst
Graham
Peter Michael

Etc...

Cheers


On 12/5/06 12:58 PM, in article 2006051122584516807-elburro@theminecom,
"Salty" <el_burro@xxxxxxxxxxx> wrote:

I am polishing a 700+ page geneaology project for a client. In
generating the index, I am finding that the names are being
alphabetized by first name as marked. Makes sense, but I need it to
reverse to:

<LastName>, <FirstName> <Middle>

I looked at switches in the Fields dialogs for Index and XE, but nothing
there.

Anyone know an automated solution? I have about 1000 names in one
chapter. Could be 10,000 plus in the entire volume.


--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <john@xxxxxxxxxxx>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 (0) 4 1209 1410

.



Relevant Pages

  • Re: One letter per cell
    ... If you wanted to go back and edit the cell the same code ... but typing a single character ... after typing e.g. tab, return - and then you would get a double tab ... I want my cursor to tab to the next cell in the grid automatically. ...
    (microsoft.public.excel.programming)
  • Re: FIND TAB, Replace with Spaces (3) or ...
    ... It would be the same as =charin a cell, but alt-0009 didn't work for me. ... BEEJAY wrote: ... What character to be used to enter a "tab" in the find box? ...
    (microsoft.public.excel.misc)
  • RE: how can I make a cell content equal the tab name sheet1 ?
    ... finds the] character in that string and for the sheet name you start 1 ... The 256 is how many characters to display for the Sheet name. ... of that spread sheet w/o having to type the tab name into the cell? ...
    (microsoft.public.excel.worksheet.functions)
  • Can Excel pass variable from a spreadsheet to IE
    ... Is it possible to pass a cell value plus a "tab" character to IE to fill in ... a form online?? ...
    (microsoft.public.excel.programming)
  • Re: Rotated Text Help Needed
    ... cell heights as you said happened on your XP. ... > characters such that the top left corner of the character cell sits at the ... > character cell as well as the character glyph itself. ... > Private Const LF_FACESIZE = 32 ...
    (comp.lang.basic.visual.misc)