Convert a Text to Range using Excel VBA
The following snippet converts the Text to an Array by splitting using Semi Colon delimiter and uses the Transpose Function to place it in the Range
The following snippet converts the Text to an Array by splitting using Semi Colon 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
No comments:
Post a Comment