jeevankg09@gmail.com
New Member
I have this file where in column A the data are clubbed w.r.t to other columns.
I need to split the value in a Column A on each cell rows into multiple rows by inserting rows and copy the remaining column data B onwards.
I have started with this code below but now I am lost. Can you please help me to complete. The file is attached
Sub splitText()
Dim splitVals As Variant
Dim totalVals As Long
Dim FRow As Long
Dim LRow As Long
Dim R As Long
Dim Col As Variant
Col = "A"
FRow = 2
LRow = Cells(Rows.Count, "A").End(xlUp).Row
With ActiveSheet
For R = LRow To FRow + 1 Step -1
splitVals = Split(Cells(LRow, Col).Value, Chr(10))
totalVals = UBound(splitVals) + 1
Cells(R, Col).EntireRow.Resize(totalVals).Insert
??
I need to split the value in a Column A on each cell rows into multiple rows by inserting rows and copy the remaining column data B onwards.
I have started with this code below but now I am lost. Can you please help me to complete. The file is attached
Sub splitText()
Dim splitVals As Variant
Dim totalVals As Long
Dim FRow As Long
Dim LRow As Long
Dim R As Long
Dim Col As Variant
Col = "A"
FRow = 2
LRow = Cells(Rows.Count, "A").End(xlUp).Row
With ActiveSheet
For R = LRow To FRow + 1 Step -1
splitVals = Split(Cells(LRow, Col).Value, Chr(10))
totalVals = UBound(splitVals) + 1
Cells(R, Col).EntireRow.Resize(totalVals).Insert
??