I have some data on a spreadsheet. In particular i need the TIME that is in the first column and in the second one depending on the time, for strange reasons when i import the txt file into excel if the time is from 10 AM to 23.59 the time is on the column A otherwise time in in B.
I´m trying to make a VBA script that could allow me to put all the data in the same column (A).
My idea is :
 - for all the rows in the colum A
 - if the cell is empty copy the value of the B cell (same row) in the actual cell (ex. if A1 is empty then copy B1 in A1)
 - Stop

Sub Test()

```
Dim i As Integer
Dim lastRow As Long
Dim x, y As Integer
Dim rng As String

Sheets("Sheet1").Select
' count numer of recorsd (in the first column) - check the range
lastRow = Worksheets("Sheet1").Range("B:B").Cells.SpecialCells(xlCellTypeConstants).Count

For i = 1 To lastRow
   If IsEmpty(Worksheets("Sheet1").Range(Cells(1, i))) Then Range(Cells(2, i)).Select: Range (Cells     (1, i)).Copy: Range(Cells(1, i)).PasteSpecial:    Range(Cells(2, i)).Clear
Next i  

```

End Sub

I tryed to do somethings but it shows up an error: 
´run-time error ´1004´:  

Application-defined or object-defined error 

Any ideas?