try the following code
Public Sub program()
Dim i As Long
Dim j As Long
i = 1
j = 1
Do While Cells(i, "A").Value <> ""
Cells(j, "C").Value = Cells(i, "A").Value
j = j + 1
Cells(j, "C").Value = Cells(i, "B").Value
i = i + 1
j = j + 1
Loop
End Sub
source
to share