I am fighting with the code, which constantly returns one velue only. My amount of rows is flexible. Sometimes I have 10 sometimes 60, so i can't set the fixed range. The End(xlDown) doesn't help too.
To clarify roughly my problem I am showing the code and output image below:
Sub Texttocolumns()
Columns("E:E").Insert
Range("E1") = "SAO"
Range("D2", Range("D2).End(xlDown)).Texttocolumns _
Destination:=Range("D2"), DataType:=xlDelimited, Space:=True
Columns("D").AutoFit
Range("D2", Range("D2").End(xlDown)).Copy
Range("D2", Range ("D2").End(xlToRight).End(xlDown)).PasteSpecial _
Paste:=xlPasteFormats
Application.CutCopyMode = True
End Sub
I tried another ways like, instead of Range("D2")
I put Range("D")
, what didn't work. The same as in Destination, where instead of Range("D2") I put Range("D2").End(xlDown), what triggered an error from debugger.
How can I make this whole list running properly?