Printing side by side

California Kid

New Member
Joined
Mar 26, 2008
Messages
15
I have a very long but very narrow listing of data that I would like to print in a side by side layout. For example printing items 1-50 on left of page one and 51-100 on right of page one and then 101-150 on left of page two. Seems like it would be wasy I have simply not been able to locate how to do this. I appreciate your assistance.
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

jolivanes

Well-known Member
Joined
Sep 5, 2004
Messages
1,690
Office Version
  1. 2013
  2. 2007
Platform
  1. Windows
Give this a try and adjust to your needs

Code:
Sub test()
Dim rng As Range, col As Integer, r As Long, op As Range
On Error GoTo Last
Set rng = Application.InputBox("Select range to convert", Type:=8)
col = Application.InputBox("Enter number of columns", Type:=1)
Set op = Application.InputBox("Select cell to output", Type:=8)
r = Application.RoundUp(rng.Count / col, 0)
For i = 1 To r
    For ii = 1 To col
        If iii < rng.Count Then
            iii = iii + 1
            op.Range("a1").Offset(i - 1, ii - 1) = rng.Item(iii)
        End If
    Next
Next
Last:
End Sub
 

California Kid

New Member
Joined
Mar 26, 2008
Messages
15
Thanks for the assistance however as may be noted by my question my skills are limited. Does this work for a multi column situation or just single column. Also not clear on how put this code into action? I have not used much code in my excel experiance although I am sure it would help me through a lot of my stumbling blocks. I am however interested in doing so. Thanks again.
 

jolivanes

Well-known Member
Joined
Sep 5, 2004
Messages
1,690
Office Version
  1. 2013
  2. 2007
Platform
  1. Windows
Kid.
The code is not from me, it is from a gentleman named jindon.
If you copy the code and paste it in a module and then run the code, you'll see that a messagebox will pop up asking which range needs to be used. When you put in the range, for instance A1:A500, it then asks how many columns you want to use. If you use 50 rows for each page, you could use 10 columns. Next it asks for the first cell where you want to start putting the split cells. Now you can set your printing range and print.
This is the only way I know how to solve your particular problem. There are quite a few intelligent Excel people on this forum so more then likely someone with more savvy then me will come and give you a better solution.
Hope this works for you though.
Regards
John
 

California Kid

New Member
Joined
Mar 26, 2008
Messages
15
Thanks for both of your direction. I was able to make it work and suit my needs. Thanks for helping out.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,709
Messages
5,597,697
Members
414,164
Latest member
ARTW

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top