View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Macro to split the contents in a single cell separated by "," into next cell in that column

Here is another way to do it...

Sub SplitDownwardColumnC()
Dim X As Long, LastRow As Long, StartRow As Long
Dim Cell As Range, Parts As Variant
StartRow = 2
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
For X = LastRow To StartRow Step -1
Parts = Split(Cells(X, "C").Value, ",")
Rows(X).Offset(1).Resize(UBound(Parts)).Insert
Cells(X, "C").Resize(UBound(Parts) + 1).Value = _
WorksheetFunction.Transpose(Parts)
Next
End Sub

--
Rick (MVP - Excel)


"anshu minocha" wrote in message
...
Found the code:
http://groups.google.com/group/micro...5587d778c2c275
thanks