LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default transposing multiple rows into one column

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.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transposing One Column to Multiple Rows Jose Excel Worksheet Functions 1 August 14th 08 09:26 PM
transposing data from 1 column into multiple rows Gina Excel Discussion (Misc queries) 2 April 5th 07 06:06 PM
Transposing a column to several rows [email protected] Excel Discussion (Misc queries) 4 May 26th 05 09:06 PM
Transposing a column to several rows [email protected] Excel Worksheet Functions 4 May 26th 05 09:06 PM
Transposing a column to several rows [email protected] Excel Programming 4 May 26th 05 09:06 PM


All times are GMT +1. The time now is 08:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"