View Single Post
 
Old 01-31-2012, 01:45 AM
Catalin.B Catalin.B is offline Windows Vista Office 2010 32bit
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

You can try the code:
Code:
Option Explicit
Sub test()
Dim LastRow As Long, i, j As Integer, Val As String
With Sheets("Sheet1")
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
j = 2
For i = 1 To LastRow
Val = .Cells(i, 1)
.Cells(1, j) = Left(Val, Application.Find(":", Val, 1))
.Cells(2, j) = Right(Val, Len(Val) - Application.Find(":", Val, 1))
j = j + 1
Next i
.Columns("A:A").Delete
End With
End Sub
If you find them useful, the formulas used in the macro are in the file attached
Attached Files
File Type: xlsm split.xlsm (19.3 KB, 18 views)
Reply With Quote