Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

extracting lines with paragraph returns - Stuck


This topic is 7866 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello

I pasted into a field called "A" the business information of some clients.

I would like to write a script that sends the first line to an "Company" field and the second line to an "address" Field etc. I have a sample below of the data I am using in the format it is in each time

Adamski Moving & Storage Inc

113 Feasel Dr

Henrietta, NY 14467-9330

716-334-9230

PubDate: 04/1990

Since:

Business

Address has changed.

County: Monroe (36055)

MSA: Rochester, NY (6840)

Latitude: 43.053600

Longitude: -77.626680

Precision: Geocoded to address precision

SIC Codes

421401 - Moving and storage

421402 - Piano Moving

I want to break this up to have the following fields

Company,

Address

City

State

Zip

Phone

County

Latitude

Longitude

SIC CODE1

SIC CODE 2

SIC code name

I can understand how to get the city and zip and state from the thrid line but I don't know how to extract the third line.

I also don't know how to handle the spaces between, as in the data shown above.

I would appreciate any help here.

If you want I can upload a sample file with a few addresses

Thanks

David

Posted

Does the text in field A always have the same number of lines? If so then I think I have the answer as I have a similar solution.

Could you upload your sample file so I can test please

Thanks

Ed

Posted

Thanks for replying -

There are the same number of carriage returns and spaces between segments. There may be a difference in the end as to the number of SIC codes at the end some of my addresses have as many as 4 SIC codes.

thanks

Dave

Posted

Hi,

Can't open your attachment - I'm on Windows and don't have stuffit expander but I expect the formula to work so don't worry about it.

Set your Company name etc to a calculation field and the calculation will be:

Trim(Middle(A, Position(A,"

This topic is 7866 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.