ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Extracting data on third line in a cell (https://www.excelbanter.com/excel-discussion-misc-queries/246102-extracting-data-third-line-cell.html)

maccboy

Extracting data on third line in a cell
 
Hi - and thanks for reading this!
I have a csv which I need to run a few format routines on to enable me
to use it. The first column contains data that is wrapped into 4 lines
- using carriage returns (?). I need to extract just the third line of
text. I'm guessing that there is a way of determining where the end of
each line is - but I don't know how!
Thanks!

Roger Govier[_3_]

Extracting data on third line in a cell
 
Hi

The carriage returns will be represented by Char(10)
Substituting the third one with a circumflex "^" and then finding that, will
allow the extraction of the 4th line.

=MID(A1,FIND("^",SUBSTITUTE(A1,CHAR(10),"^",3))+1, 255)

--
Regards
Roger Govier

"maccboy" wrote in message
...
Hi - and thanks for reading this!
I have a csv which I need to run a few format routines on to enable me
to use it. The first column contains data that is wrapped into 4 lines
- using carriage returns (?). I need to extract just the third line of
text. I'm guessing that there is a way of determining where the end of
each line is - but I don't know how!
Thanks!

__________ Information from ESET Smart Security, version of virus
signature database 4530 (20091021) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 4530 (20091021) __________

The message was checked by ESET Smart Security.

http://www.eset.com




maccboy

Extracting data on third line in a cell
 
On Oct 21, 6:48*pm, "Roger Govier"
<roger@technology4unospamdotcodotuk wrote:
Hi

The carriage returns will be represented by Char(10)
Substituting the third one with a circumflex "^" and then finding that, will
allow the extraction of the 4th line.

=MID(A1,FIND("^",SUBSTITUTE(A1,CHAR(10),"^",3))+1, 255)

--
Regards
Roger Govier

"maccboy" wrote in message

...





Hi - and thanks for reading this!
I have a csv which I need to run a few format routines on to enable me
to use it. The first column contains data that is wrapped into 4 lines
- using carriage returns (?). I need to extract just the third line of
text. I'm guessing that there is a way of determining where the end of
each line is *- but I don't know how!
Thanks!


__________ Information from ESET Smart Security, version of virus
signature database 4530 (20091021) __________


The message was checked by ESET Smart Security.


http://www.eset.com


__________ Information from ESET Smart Security, version of virus signature database 4530 (20091021) __________

The message was checked by ESET Smart Security.

http://www.eset.com


Thanks Roger!

That has sorted that bit of the problem. I'm now working on extracting
the data after the second ^ and before the third ^ (if there is one!)

Cheers.

bla bla

Extracting data on third line in a cell
 
extracting data is always a time consuming process, for extracting
data from documents, the web, websites, or data files, i found
http://www.extractingdata.com to be really useful, they build quick
custom web scraping and data extracting programs


All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com