Easy way to parse...

D

Diane

Does anyone know of an easy way to separate fields in a single cell? I have
a database of about 1000 rows and one column is city, state and sometimes
zip which I need to separate to three columns. The problem is that there is
no consistent pattern between them. Some include the zip; some don't.

Any help would be appreciated.

Thanks,
Diane
 
B

Bob Phillips

Diane,

Unless you have some rules, it will be difficult. For instance

San Fancisco California

could be interpreted as a 2 name city, 2 name state, or one and one and a
ZIP.

What delimiter do you have, if it is not space, you could use Data>Text to
Columns with that delimiter.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
B

Bucky

Diane said:
Does anyone know of an easy way to separate fields in a single cell? I have
a database of about 1000 rows and one column is city, state and sometimes
zip which I need to separate to three columns. The problem is that there is
no consistent pattern between them. Some include the zip; some don't.

You can do it, but it won't be easy since you don't have a consistent
pattern. You'll probably have to identity every possible pattern, then
write a complex formula using IF and string fuctions. It may help to do
the parsing into several intermediate columns, that way the formulas
won't be too ridiculous.
 
Top