wrapping columns

M

mcarrington

Hi,
I have 4 columns of data that are over 1000 rows. I would like to wra
those 4 columns so that I can fit 3 sets of the columns on a printe
page. Is there a way to do this short of copying and pasting?

Thanks, Mega
 
D

David McRitchie

Hi Megan,
You can wrap cells by selecting cells (or columns) and
using Format, cells, alignment, [x] wrap cells

That will not get you columns
A-B-C rows 1-50, A-B-C rows 1 & 51-99, A-B-C rows 1 & 100-149
on the same page as Excel does not provide for that (Word does).
For that you would have to use a macro see
http://www.mvps.org/dmcritchie/excel/snakecol.htm

This question was answered in an Excel newsgroup, unaffiliated with
any spammy website.
---i
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
 
G

Gord Dibben

Are you up for some VBA?

Public Sub Snake4to12()
Dim myRange As Range
Dim colsize As Long
Dim maxrow As Long
Const numgroup As Integer = 3
Const NUMCOLS As Integer = 12
On Error GoTo fileerror
colsize = Int((ActiveSheet.UsedRange.Rows.Count + _
((NUMCOLS - 1)) / NUMCOLS)) / numgroup
MsgBox "Number of Rows to Move is: " & colsize
Range("A1").Select
With ActiveCell.Parent.UsedRange
maxrow = .Cells(.Cells.Count).Row + 1
End With
ActiveCell.Parent.Cells(maxrow, ActiveCell.Column) _
.End(xlUp).Offset(1, 0).Select
Set myRange = Range(ActiveCell.Address & ":" _
& ActiveCell.Offset(-colsize, (NUMCOLS - 1)).Address)
myRange.Cut Destination:=ActiveSheet.Range("A1").Offset(0, _
((NUMCOLS - 1) - numgroup))
Range("A1").Select
Cells.End(xlDown).Offset(1, 0).Select
Set NextRange = Range(ActiveCell.Address & ":" _
& ActiveCell.Offset(-colsize, (numgroup)).Address)
NextRange.Cut Destination:=ActiveSheet.Range("A1"). _
Offset(0, (NUMCOLS / numgroup))
Application.CutCopyMode = False
Range("A1").Select
fileerror:
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

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

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and Insert>Module. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to Tool>Macro>Macros.

You can also assign this macro to a button or a shortcut key combo.



Gord Dibben MS Excel MVP

Hi,
I have 4 columns of data that are over 1000 rows. I would like to wrap
those 4 columns so that I can fit 3 sets of the columns on a printed
page. Is there a way to do this short of copying and pasting?

Thanks, Megan

Gord Dibben MS Excel MVP
 
Top