Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to get the last row in cell in excel

enter image description here

I need help to get the last line of a cell that has 10 lines in excel.
Which means ı have 10 line in a single excel line and need to copy the last line(After pressing ALT+Enter) and paste to a different excel cell.

Basically, extract the last line from a cell containing multiple lines separated by ALT+Enter.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Assuming no Excel Constraints as per the tags posted then the following formula should work as per your post explanations:

enter image description here


=TAKE(TEXTSPLIT(A1,,CHAR(10)),-1)

Or, Using FILTERXML()

=FILTERXML("<m><b>"&SUBSTITUTE(A1,CHAR(10),"</b><b>")&"</b></m>","//b[last()]")

Or for older versions:

=TRIM(RIGHT(SUBSTITUTE(A1,CHAR(10),REPT(" ",100)),100))

Or Using TEXTAFTER()

=TEXTAFTER(A1,CHAR(10),-1)

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading