• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to separate every line??

Hi Team

I have attached the file where I have data in cell A1. In which, there are some special characters which are separating the lines.

What I am looking, to make separate records of every line.

Is there any way either by formula or VBA.

Please help.

Thanks
Ratan
 

Attachments

  • Data.xlsx
    11.7 KB · Views: 19
One solution using formula will be concatenating the lines by using char(10) i.e. if you write the formula as ="A"& char(10) &"B", then A & B will be shown in 2 lines..
 
Hi,

your data file seems to be one data.. what you want to separate in them? every new line in a separate cell?

if yes, use vba.split() function with delimiter as Char(10)

and store the array into rows or columns you want.

Regards,
Prasad DN
 
Or......

In cell A2, formula copy down :

=TRIM(MID(SUBSTITUTE(" "&TRIM(SUBSTITUTE(SUBSTITUTE($A$1,CHAR(13),CHAR(10)),CHAR(10)," "))," ",REPT(" ",500)),ROWS($A$2:$A2)*500,500))

Edit : the data line separator found in CHAR(10) and CHAR(13)

Regards
Bosco
 
Back
Top