Experimente:
Sub Transpondo()
Dim Linha As Integer, lDest As Integer
Dim Separa() As String
Linha = Sheets("movimentoembarqueanalitico").Cells(Cells.Rows.Count, "A").End(xlUp).Row
For x = 2 To Linha
Separa = Split(Sheets("movimentoembarqueanalitico").Cells(x, "C"), "", -1, vbTextCompare)
lDest = Sheets("Plan2").Cells(Cells.Rows.Count, "A").End(xlUp).Row + 1
With Sheets("Plan2")
For y = LBound(Separa) To UBound(Separa)
.Cells(lDest + y, 1) = Sheets("movimentoembarqueanalitico").Cells(x, 1)
.Cells(lDest + y, 2) = Sheets("movimentoembarqueanalitico").Cells(x, 2)
.Cells(lDest + y, 3) = Separa(y)
Next
End With
Next
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 23/07/2014 1:45 pm