Sub test()
'Assuming your data starts in cell A2
Dim IntCol As Long
Dim LCol As Long, LCol1 As Long
Dim LRow As Long
Dim CuVal As Long
Dim i As Long
IntCol = 1
CuVal = 0
LCol = Sheets("SheetName").Cells(1, Columns.Count).End(xlToLeft).Column
LCol1 = Sheets("SheetName").Cells(1, Columns.Count).End(xlToLeft).Column + 1
LRow = Sheets("SheetName").Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LRow
Do
If Not Sheets("SheetName").Cells(i, IntCol) = 0 Then
CuVal = Sheets("SheetName").Cells(i, IntCol)
End If
IntCol = IntCol + 1
Loop Until IntCol = LCol
Sheets("SheetName").Cells(i, LCol1).Value = CuVal
Next i
End Sub