C
c8tz
HI,
I have this code which I am using to transpose data to one column....
Sub Transpose()
Dim i As Long, k As Long, j As Integer
Application. ScreenUpdating = False
Columns(1).Insert
i = 0
k = 1
While Not IsEmpty( Cells(k, 2))
j = 2
While Not IsEmpty(Cells(k, j))
i = i + 1
Cells(i, 1) = Cells(k, j)
Cells(k, j).Clear
j = j + 1
Wend
k = k + 1
Wend
Application.ScreenUpdating = True
End Sub
but this only works if all cells contain data. I have grid of data
where there are some empty cells - no data in them.
Need help to modify this code to accept the "null" (no data in cells).
Thanks heaps for your assistance.
I have this code which I am using to transpose data to one column....
Sub Transpose()
Dim i As Long, k As Long, j As Integer
Application. ScreenUpdating = False
Columns(1).Insert
i = 0
k = 1
While Not IsEmpty( Cells(k, 2))
j = 2
While Not IsEmpty(Cells(k, j))
i = i + 1
Cells(i, 1) = Cells(k, j)
Cells(k, j).Clear
j = j + 1
Wend
k = k + 1
Wend
Application.ScreenUpdating = True
End Sub
but this only works if all cells contain data. I have grid of data
where there are some empty cells - no data in them.
Need help to modify this code to accept the "null" (no data in cells).
Thanks heaps for your assistance.