column wrapping

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is it possible in office 2003 - excel to wrap the columns?

explanation:
i have a spreadsheet that has over 1000 rows in one column... i want to be
able to create a break (per se) every 150 (for instance) rows and create a
new column. (headers arent necessary in this.)

Any comments/questions are welcomed.
 
Maybe not exactly what you require, but have a look here:

http://www.mvps.org/dmcritchie/excel/snakecol.htm

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| is it possible in office 2003 - excel to wrap the columns?
|
| explanation:
| i have a spreadsheet that has over 1000 rows in one column... i want to be
| able to create a break (per se) every 150 (for instance) rows and create a
| new column. (headers arent necessary in this.)
|
| Any comments/questions are welcomed.
 
With a macro.

Public Sub SplitToCols()
Dim NUMCOLS As Integer
Dim i As Integer
Dim colsize As Long
On Error GoTo fileerror

NUMCOLS = InputBox("Choose Final Number of Columns")
colsize = Int((ActiveSheet.UsedRange.Rows.Count + _
(NUMCOLS - 1)) / NUMCOLS)
For i = 2 To NUMCOLS
Cells((i - 1) * colsize + 1, 1).Resize(colsize, 1).Copy Cells(1, i)
Next i
Range(Cells(colsize + 1, 1), Cells(Rows.Count, 1)).Clear
fileerror:
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top