manoj_arsul
Board Regular
- Joined
- Jun 27, 2018
- Messages
- 61
Can any help me correct the below program
Sub Serpentine()
Dim N As Long, i As Long, j As Long
Dim sh5 As Worksheet
K = 1
Set sh5 = Sheets("Common")
N = sh5.Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To N
For j = 1 To Columns.Count
If sh5.Cells(i, j) <> "" Then
sh5.Cells(i, 1).Value = sh5.Cells(i, j).Value
K = K + 1
Else
Exit For
End If
Next j
Next i
End Sub
Sub Serpentine()
Dim N As Long, i As Long, j As Long
Dim sh5 As Worksheet
K = 1
Set sh5 = Sheets("Common")
N = sh5.Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To N
For j = 1 To Columns.Count
If sh5.Cells(i, j) <> "" Then
sh5.Cells(i, 1).Value = sh5.Cells(i, j).Value
K = K + 1
Else
Exit For
End If
Next j
Next i
End Sub