Identify second line

  • Thread starter Thread starter yagna
  • Start date Start date
Y

yagna

I have a strange issue, in a cell I have two lines which is entered by the
user using alt+enter. Now I need to segregate only the second from each cell
& manipulate teh data furhter. This data is full of text.
for eg: NCO
Yagna

Text to columns delimit or fixed width is not sovling the issue, the data I
require. Any help on this.

thanks,
Yagna.
 
This worksheet function should do it

=MID(D1,FIND(CHAR(10),D1)+1,99)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
You could try the following code, Works for me when trying it.
You'll have to change the sheet name and which cells to look at (obviously).
Hope this helps.


Dim splitArray() As String
splitArray = Split(Sheets("SheetName").Cells(1, 1).Value, vbLf)
MsgBox splitArray(1) 'Displays the second word from the sheet.
 

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

Back
Top