Setting fields from list

D

Dig

Thanks for the help on a prior question.

I know have a list that is formatted in word as follows

John Doe
1313 Mockingbird Lane
Mockingbird Heights, AZ, 10011

Jane Doe
4455 Shoe Road
Jackson, GA 320105

Is there a way to convert this type of list to a delimited list as follows?

"John Doe","1313 Mockingbird Lane","Mockingbird Heights","AZ","10011"
Etc

Thanks for the help!
 
P

Peter Jamieson

You could try the following sequence of Find/Replace operations.

First, you need to uncheck
Tools|AutoCorrect|"AutoFormat as you Type"|"Replace as you type"|"Straight
quotes with smart quotes"
and
Tools|AutoCorrect|AutoFormat|"Replace as you type"|"Straight quotes with
smart quotes"

Then, you need to make sure all the lines end in the same character (I use a
paragraph mark here). If they end in line feeds, do a replace of ^l by ^p.

In the Find/Replace dialog box, check the Wildcard option then do the
following finds/replaces, where the first line of each pair goes inthe Find
What and the second goes in the Replace With box.

^13([!,^13]@),([!0-9]@)([0-9]@)^13^13
^p\1^p\2^p\3^p¬^p

@^13
^p

,^13
^p

^13 @
^p

^13
",^p"

,^13"¬",
nothing

,^13
,

This may need a bit of tweaking. It can also be simplified if the City,
State Zip line is formatted more consistently than your example suggests.
 
D

Dig

Thanks for the info. great stuff and I will give it a try.

Thanks again for the effort.

Peter Jamieson said:
You could try the following sequence of Find/Replace operations.

First, you need to uncheck
Tools|AutoCorrect|"AutoFormat as you Type"|"Replace as you type"|"Straight
quotes with smart quotes"
and
Tools|AutoCorrect|AutoFormat|"Replace as you type"|"Straight quotes with
smart quotes"

Then, you need to make sure all the lines end in the same character (I use a
paragraph mark here). If they end in line feeds, do a replace of ^l by ^p.

In the Find/Replace dialog box, check the Wildcard option then do the
following finds/replaces, where the first line of each pair goes inthe Find
What and the second goes in the Replace With box.

^13([!,^13]@),([!0-9]@)([0-9]@)^13^13
^p\1^p\2^p\3^p¬^p

@^13
^p

,^13
^p

^13 @
^p

^13
",^p"

,^13"¬",
nothing

,^13
,

This may need a bit of tweaking. It can also be simplified if the City,
State Zip line is formatted more consistently than your example suggests.

--
Peter Jamieson
MS Word MVP

Dig said:
Thanks for the help on a prior question.

I know have a list that is formatted in word as follows

John Doe
1313 Mockingbird Lane
Mockingbird Heights, AZ, 10011

Jane Doe
4455 Shoe Road
Jackson, GA 320105

Is there a way to convert this type of list to a delimited list as follows?

"John Doe","1313 Mockingbird Lane","Mockingbird Heights","AZ","10011"
Etc

Thanks for the help!
 

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