ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to paste the 4 lines in a single row in excel? (https://www.excelbanter.com/excel-discussion-misc-queries/101586-how-paste-4-lines-single-row-excel.html)

lalitha

How to paste the 4 lines in a single row in excel?
 
"APPASAMY KRISHNA HOSPITAL
DR RAJAKANNAN
OPP VIJAYA NAGAR BUS TERMINAL, 100 FT ROAD
VELACHERY, CHENNAI - 42"

above is the address. i want to paste this in a single row and to filter it
in area wise. please give some idea.

Greg Wilson

How to paste the 4 lines in a single row in excel?
 
Perhaps this:

Sub Test()
Dim arr As Variant
arr = Split(ActiveCell.Value, Chr(10))
ActiveCell.Resize(1, UBound(arr) + 1) = arr
End Sub

Regards,
Greg

"lalitha" wrote:

"APPASAMY KRISHNA HOSPITAL
DR RAJAKANNAN
OPP VIJAYA NAGAR BUS TERMINAL, 100 FT ROAD
VELACHERY, CHENNAI - 42"

above is the address. i want to paste this in a single row and to filter it
in area wise. please give some idea.



All times are GMT +1. The time now is 04:41 AM.

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