The following snippet converts the Text to an Array by splitting using SemiColon delimiter and uses the Transpose Function to place it in the Range
Sub ConvertText2Range() Dim sText As String, arText sText = Range("c16").Value arText = Split(sText, ";") Range("D16:D" & CStr(16 + UBound(arText))).Value = WorksheetFunction.Transpose(arText) End Sub
Could you post a modification so the result would show up horizontally instead of vertically?
ReplyDeleteskip transpose
DeleteMay be
ReplyDeleteSub ConvertTextToRange()
Dim sText As String, ArrText
sText = Range("C16").Value
ArrText = Split(sText, ",")
Range("D16").Resize(1, UBound(ArrText) + 1).Value = ArrText
End Sub