I need help getting information from Word and sending it to Excel

D

Dingo

My company has a word document containing customer data. It's
something along the lines of this:

NAME: JOHN DOE
SSN: 444-444-4444 TELE: 999-999-9999

NAME: JANE DOE
SSN: 555-555-5555 TELE: 888-888-8888

And so forth, for all of our customers. About 200 in total.

Note that the headings such as "NAME", "SSN" etc are repeated for each
customer, but the data that follows is unique. Also, these headings
are sometimes two to a line. I have eleven headings that I'd like to
use in total.

The data is not in a table, and using text to table conversion didn't
work, even though Excel thought it was delimited.

How can I get Word, via Macro or otherwise, to:

a) Automatically use the headings just once to create column headings.

b) Automatically use the data that follows to fill the rows below the
appropriate headings.

The resulting table can be in word or excel...I just want to be able
to sort the data more easily.

Thanks,

D
 
D

Doug Robbins - Word MVP

We would really need to see the whole of the data to make sure of this, but
something along the lines of the following process should do it without the
need for a macro.

1. Use Edit>Replace to replace NAME: with XXXX
2. Use Edit>Replace to replace ^p with ^t
3. Use Edit>Replace to replace XXXX with ^p
4. Use a Wildcard Edit>Replace to replace [A-Z]{3,}: with ^t
5. Use and ordinary Edit>Replace to replace ^t^t with ^t
6. Repeat step 5 as required to remove any multiple tab spaces
7. Add a header row into which you enter the field names, separated by
tabs.

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