filmov
tv
Split Text to Rows in Excel (3 Easy Ways)
Показать описание
In this video, I will show you three ways to split text into rows in Excel. While Text to Columns is an everyday need, many times, you may also want to split the text in a cell into separate rows.
This can be done easily thanks to some awesome formulas in Excel and VBA.
00:00 Intro
00:46 Split Text to Rows using TEXTSPLIT function
06:42 Split Text to Rows using Text to Columns and Transpose
09:10 VBA to Split Text to Rows in Excel
---------------------------------------------------------------------------------
Below is the VBA code used in this video
Function SplitCellToRows(CellValue As Range, Delimiter As String)
Dim SplitValues() As String
'Split the value by the specified delimiter into an array
SplitValues = Split(CellValue.Value, Delimiter)
'Go through each element of the array and remove any leading or trailing spaces
For i = LBound(SplitValues) To UBound(SplitValues)
SplitValues(i) = Trim(SplitValues(i))
Next i
'Return the array
SplitCellToRows = WorksheetFunction.Transpose(SplitValues)
End Function
---------------------------------------------------------------------------------------
#Excel #ExcelTips #ExcelTutorial
This can be done easily thanks to some awesome formulas in Excel and VBA.
00:00 Intro
00:46 Split Text to Rows using TEXTSPLIT function
06:42 Split Text to Rows using Text to Columns and Transpose
09:10 VBA to Split Text to Rows in Excel
---------------------------------------------------------------------------------
Below is the VBA code used in this video
Function SplitCellToRows(CellValue As Range, Delimiter As String)
Dim SplitValues() As String
'Split the value by the specified delimiter into an array
SplitValues = Split(CellValue.Value, Delimiter)
'Go through each element of the array and remove any leading or trailing spaces
For i = LBound(SplitValues) To UBound(SplitValues)
SplitValues(i) = Trim(SplitValues(i))
Next i
'Return the array
SplitCellToRows = WorksheetFunction.Transpose(SplitValues)
End Function
---------------------------------------------------------------------------------------
#Excel #ExcelTips #ExcelTutorial
Комментарии