Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2008

Tip: Looking for answers? Try searching our database.

Convert a Column of Data into multiple rows

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
introtologic - 27 Mar 2008 19:00 GMT
I am trying to convert a column of data into multiple rows but cant
seem to figure out how to do it.

e.g.

a
b
c
d
e
f
g
h
i

I want this column to be broken down into rows of 3 items

a b c
d e f
g h i

Thanks in advance
Karol Stachura - 27 Mar 2008 20:00 GMT
1.Fill a B column with numbers in order, start from number 3 ->
3,4,5,6,7,8... and so on
2.In cell C1 add =if(MOD(B1;3)<>0;"";A1) - drag command in column C to the
end of data
3.In cell D1 add =if(MOD(B1;3)<>0;"";A2) - drag command in column D to the
end of data
4.In cell E1 add  =if(MOD(B1;3)<>0;"";A3)- drag command in column E to the
end of data
5.In cell F1 add  =if(MOD(B1;3)<>0;"";B1/3) - drag command in column F to
the end of data
6.Copy columns C,D,E,F and paste special as values in the same columns.
7.Sort C,D,E,F by column D
Regards,
Karol Stachura
Gord Dibben - 27 Mar 2008 22:24 GMT
Sub ColtoRows()
Dim rng As Range
Dim I As Long
Dim J As Long
   Set rng = Cells(Rows.Count, 1).End(xlUp)
   J = 1
   On Error Resume Next
   nocols = InputBox("Enter Number of Columns Desired")
       For I = 1 To rng.Row Step nocols
       Cells(J, "A").Resize(1, nocols).Value = _
               Application.Transpose(Cells(I, "A") _
               .Resize(nocols, 1))
       J = J + 1
   Next
   Range(Cells(J, "A"), Cells(rng.Row, "A")).ClearContents
   Exit Sub
End Sub

Enter 3 in the inputbox to get the configuration you want.

Gord Dibben  MS Excel MVP

>I am trying to convert a column of data into multiple rows but cant
>seem to figure out how to do it.
[quoted text clipped - 18 lines]
>
>Thanks in advance
introtologic - 28 Mar 2008 14:45 GMT
Thank you!

Both solutions worked excellent

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.