formula to Take first row of data from a cell

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,
I'm not sure if this is easy or difficult to sort out?
I have a list of companies, the data is all in one cell but on separate lines as shown below,
I would like a formula to Pull the First Line of data from the cell and another formula the pulls all but the first line of data from the cell?
any ideas how I can do this?

Example of data:
PBK Architects
14001 N. Dallas Pkwy, Ste 400
Dallas, Texas 75240
972-233-1323
SHW Architects, LLP
5717 Legacy Dr, Suite 250
Plano, Texas 75024
214-473-2400
Corgan Associates, Inc.
401 N Houston Street
Dallas, Texas 75202
214-748-2000
PBK Architects

14001 N. Dallas Pkwy, Ste 400
Dallas, Texas 75240
972-233-1323

<COLGROUP><COL style="WIDTH: 176pt; mso-width-source: userset; mso-width-alt: 8557" width=234><TBODY>
</TBODY>
So as above I'd like to Separate the Red Data from the Black?

Please help if you can

Thanks

Tony
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Thank you rick, that's the first line sorted, now how can I get everything but the first line?
Thanks
Tony
 
Upvote 0
Thank you rick, that's the first line sorted, now how can I get everything but the first line?
Give this formula a try...

=MID(A1,FIND(CHAR(10),A1&CHAR(10))+1,999)

I would note, though, that your last example which shows a blank line between the company name and the rest of the data, will have a Line Feed character at the beginning of the text returned by the formula. That blank line is really a possibility with your some of your data, then you should use this formula to make sure the output is "pure"...

=MID(SUBSTITUTE(A1,CHAR(10)&CHAR(10),CHAR(10)),FIND(CHAR(10),A1&CHAR(10))+1,999)
 
Upvote 0
Thanks Rick, second one worked perfectly thank you very much for your help again :)
 
Upvote 0
Hi rick, just one question,
because not all the data has Comers or spaces between them when we join then together I get the last word and the first word of the next line joining up like "RoadStreet" in stead of Road, street,
is there a way to add a space and a comer between them?
 
Upvote 0
Hi rick, just one question,
because not all the data has Comers or spaces between them when we join then together I get the last word and the first word of the next line joining up like "RoadStreet" in stead of Road, street,
is there a way to add a space and a comer between them?
You have to turn word wrapping on for the cell you put the formula(s) in. Select the cell(s), press CTRL+1, click the Alignment tab, put a check mark in the Checkbox labeled "Wrap text" and click OK.
 
Upvote 0
Hi Everyone,
I'm not sure if this is easy or difficult to sort out?
I have a list of companies, the data is all in one cell but on separate lines as shown below,
I would like a formula to Pull the First Line of data from the cell and another formula the pulls all but the first line of data from the cell?
any ideas how I can do this?

Example of data:
PBK Architects
14001 N. Dallas Pkwy, Ste 400
Dallas, Texas 75240
972-233-1323
SHW Architects, LLP
5717 Legacy Dr, Suite 250
Plano, Texas 75024
214-473-2400
Corgan Associates, Inc.
401 N Houston Street
Dallas, Texas 75202
214-748-2000
PBK Architects

14001 N. Dallas Pkwy, Ste 400
Dallas, Texas 75240
972-233-1323

<tbody>
</tbody>
So as above I'd like to Separate the Red Data from the Black?

Please help if you can

Thanks

Tony

Hi Tony,
Assume your data is in A1
A2: =substitute(A1,char(10)," ") will show all items in this cell separated by a space (or whatever punctuation)
A3: =left(substitute(A1,char(10)," "),find(" ",A1)) shows only the first item in cell.
Hope this helps
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,715
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top