I only need to get the first two lines as "wrapedtext1wrappedtext2". Is it possible.
Yes, maybe it can , but there is a NO SIMPLE way. There are many factors that you will have to consider.
1) Row height in pixels
2) Font Type and Size
3) Line spacing
4) Is the cell paired?
5) Is the cell in Autofit state
6) Is the text all in normal mode or does it have Bold / Italic / Underline characters, etc. etc.
Consider this snapshot

For example, the row height in pixels can be obtained from
Debug.Print Range("A1").Height * (24 / 18)
The font size in the above case can be achieved from this
Debug.Print Range("A1").Font.Size
But the problem is what will happen in the scenario below?

In my opinion, it would be too painful to achieve what you want. It is best to use ALT + Enter to insert line breaks and then to get text.
Followup
Rows are entered into the wrapped cell via vba code. So how to insert data by pressing alt + enter? - 1355 4 hours ago
In such a scenario, you can also use a similar approach.
Sub Sample() Dim strg As String strg = "This is a sample" & vbCrLf & _ "sentence which is" & vbCrLf & _ "in Cell A1 and the" & vbCrLf & _ "text is separated" & vbCrLf & _ "with line breaks" With Range("A1") .Columns(1).ColumnWidth = 16.86 .Font.Name = "Calibri" .Font.Size = 11 .Value = strg End With End Sub
NOTE For the above, you will need to record a macro and see what the font, font size and column width are, which can take on particular formatting. Again, you will need to consider the fact that the above example is an unformatted cell on a new sheet. If you are writing in a merged cell or in a formatted cell, you will have to change the code above accordingly, which can be easily done by writing a macro. I also assume that the ZOOM level is set to 100%
SNAPSHOTS

NTN
Sid
Siddharth route
source share