printing help

N

nnkk

hi,
I'm trying to print a worksheet whit only two columns and multiple row
(say 1000). The columns are very narrow and can fit on a single pag
several times, but I don't know how to do that
 
D

Don Guillett

One way
Sub movenums()
lr = Cells(Rows.Count, "a").End(xlUp).Row
For i = 51 To lr Step 50
lc = Cells(1, "iv").End(xlToLeft).Column + 1
'either of these lines will work
Cells(i, "a").Resize(50, 1).Cut Cells(1, lc)
'Range(Cells(i, "a"), Cells(i + 49, "a")).Cut Cells(1, lc)
Next
End Sub
 
G

Gord Dibben

nnkk

The code below will change two columns into 8 columns

Rows 1-50, 51-100, 101-150 etc.

Sub Move_Sets()
Dim iSource As Long
Dim iTarget As Long

iSource = 1
iTarget = 1

Do
Cells(iSource, "A").Resize(50, 2).Cut _
Destination:=Cells(iTarget, "A")
Cells(iSource + 50, "A").Resize(50, 2).Cut _
Destination:=Cells(iTarget, "C")
Cells(iSource + 100, "A").Resize(50, 2).Cut _
Destination:=Cells(iTarget, "E")
Cells(iSource + 150, "A").Resize(50, 2).Cut _
Destination:=Cells(iTarget, "G")
iSource = iSource + 200
iTarget = iTarget + 51
Loop Until IsEmpty(Cells(iSource, "A").Value)

End Sub

Gord Dibben Excel MVP
 
Top