Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Splitting the contents.
I need to split the contets of column B and paste it in the rows
automatically. (As in the Answer below. Question Cloumn A Column B EQ097-011210 EQ097-011202, EQ097-011203, EQ097-011204 Answer EQ097-011210 EQ097-011202 EQ097-011203 EQ097-011204 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Splitting the contents.
You need a macro like the one below
Sub SplitCol() LastRow = Range("B" & Rows.Count).End(xlUp).Row RowCount = 1 Do While RowCount <= LastRow If InStr(Range("B" & RowCount), ",") 0 Then Rows(RowCount + 1).Insert Rowdata = Range("B" & RowCount) Range("B" & RowCount) = _ Trim(Left(Rowdata, InStr(Rowdata, ",") - 1)) Range("B" & (RowCount + 1)) = _ Trim(Mid(Rowdata, InStr(Rowdata, ",") + 1)) LastRow = LastRow + 1 End If RowCount = RowCount + 1 Loop End Sub "Naveed" wrote: I need to split the contets of column B and paste it in the rows automatically. (As in the Answer below. Question Cloumn A Column B EQ097-011210 EQ097-011202, EQ097-011203, EQ097-011204 Answer EQ097-011210 EQ097-011202 EQ097-011203 EQ097-011204 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
splitting out cell contents | Excel Discussion (Misc queries) | |||
Splitting cell contents | Excel Discussion (Misc queries) | |||
Splitting cell contents | Excel Discussion (Misc queries) | |||
Splitting the contents of a cell? | Excel Worksheet Functions | |||
Splitting up a cells contents | Excel Worksheet Functions |