#1   Report Post  
dawgpilot
 
Posts: n/a
Default column

I have a range with 3 columns and about 120 records. When left in this
format it prints 3 columns over two pages using only 1/2 of each page. I
want excel to print my data on one page with six columns (two ranges with the
same headings). This is an active database that is changed regularly so for
me to cut and paste is not effecient enough.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Here's an interesting little trick that I picked up from Tom Ogilvy the
other day

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.Range("A61:B120").Copy Destination:=Range("C1")
.Range("A61:B120").ClearContents
Application.EnableEvents = False
.PrintOut
.Range("C1:D60").Copy Destination:=Range("A61")
.Range("C1:D60").ClearContents
Cancel = True
Application.EnableEvents = True
End With
End Sub


'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

You might want to add a test for the specific worksheet name if there are
many.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"dawgpilot" wrote in message
...
I have a range with 3 columns and about 120 records. When left in this
format it prints 3 columns over two pages using only 1/2 of each page. I
want excel to print my data on one page with six columns (two ranges with

the
same headings). This is an active database that is changed regularly so

for
me to cut and paste is not effecient enough.



  #3   Report Post  
RagDyeR
 
Posts: n/a
Default

Check out this web page of David McRitchie:

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

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"dawgpilot" wrote in message
...
I have a range with 3 columns and about 120 records. When left in this
format it prints 3 columns over two pages using only 1/2 of each page. I
want excel to print my data on one page with six columns (two ranges with
the
same headings). This is an active database that is changed regularly so for
me to cut and paste is not effecient enough.


  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Slight adjustment to the spec, and error handling :-)

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.Range("A61:C120").Copy Destination:=Range("D1")
.Range("A61:C120").ClearContents
On Error Goto cleanup
Application.EnableEvents = False
.PrintOut
.Range("D1:F60").Copy Destination:=Range("A61")
.Range("D1:F60").ClearContents
Cancel = True
End With
cleanup:
Application.EnableEvents = True
End Sub


--
HTH

Bob Phillips

"Bob Phillips" wrote in message
...
Here's an interesting little trick that I picked up from Tom Ogilvy the
other day

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.Range("A61:B120").Copy Destination:=Range("C1")
.Range("A61:B120").ClearContents
Application.EnableEvents = False
.PrintOut
.Range("C1:D60").Copy Destination:=Range("A61")
.Range("C1:D60").ClearContents
Cancel = True
Application.EnableEvents = True
End With
End Sub


'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

You might want to add a test for the specific worksheet name if there are
many.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"dawgpilot" wrote in message
...
I have a range with 3 columns and about 120 records. When left in this
format it prints 3 columns over two pages using only 1/2 of each page.

I
want excel to print my data on one page with six columns (two ranges

with
the
same headings). This is an active database that is changed regularly so

for
me to cut and paste is not effecient enough.





  #5   Report Post  
dawgpilot
 
Posts: n/a
Default

Thank you, Bob. I have only one problem. When I right click and open view
code the microsoft visual basic window opens. How do enter info? Almost all
menu items are disabled and I cannot copy/pasted anywhere. The visual basic
help menu is no help whatsoever.

"Bob Phillips" wrote:

Slight adjustment to the spec, and error handling :-)

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.Range("A61:C120").Copy Destination:=Range("D1")
.Range("A61:C120").ClearContents
On Error Goto cleanup
Application.EnableEvents = False
.PrintOut
.Range("D1:F60").Copy Destination:=Range("A61")
.Range("D1:F60").ClearContents
Cancel = True
End With
cleanup:
Application.EnableEvents = True
End Sub


--
HTH

Bob Phillips

"Bob Phillips" wrote in message
...
Here's an interesting little trick that I picked up from Tom Ogilvy the
other day

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.Range("A61:B120").Copy Destination:=Range("C1")
.Range("A61:B120").ClearContents
Application.EnableEvents = False
.PrintOut
.Range("C1:D60").Copy Destination:=Range("A61")
.Range("C1:D60").ClearContents
Cancel = True
Application.EnableEvents = True
End With
End Sub


'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

You might want to add a test for the specific worksheet name if there are
many.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"dawgpilot" wrote in message
...
I have a range with 3 columns and about 120 records. When left in this
format it prints 3 columns over two pages using only 1/2 of each page.

I
want excel to print my data on one page with six columns (two ranges

with
the
same headings). This is an active database that is changed regularly so

for
me to cut and paste is not effecient enough.








  #6   Report Post  
Bob Phillips
 
Posts: n/a
Default

Is the workbook protected or shared?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"dawgpilot" wrote in message
...
Thank you, Bob. I have only one problem. When I right click and open

view
code the microsoft visual basic window opens. How do enter info? Almost

all
menu items are disabled and I cannot copy/pasted anywhere. The visual

basic
help menu is no help whatsoever.

"Bob Phillips" wrote:

Slight adjustment to the spec, and error handling :-)

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.Range("A61:C120").Copy Destination:=Range("D1")
.Range("A61:C120").ClearContents
On Error Goto cleanup
Application.EnableEvents = False
.PrintOut
.Range("D1:F60").Copy Destination:=Range("A61")
.Range("D1:F60").ClearContents
Cancel = True
End With
cleanup:
Application.EnableEvents = True
End Sub


--
HTH

Bob Phillips

"Bob Phillips" wrote in message
...
Here's an interesting little trick that I picked up from Tom Ogilvy

the
other day

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.Range("A61:B120").Copy Destination:=Range("C1")
.Range("A61:B120").ClearContents
Application.EnableEvents = False
.PrintOut
.Range("C1:D60").Copy Destination:=Range("A61")
.Range("C1:D60").ClearContents
Cancel = True
Application.EnableEvents = True
End With
End Sub


'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

You might want to add a test for the specific worksheet name if there

are
many.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"dawgpilot" wrote in message
...
I have a range with 3 columns and about 120 records. When left in

this
format it prints 3 columns over two pages using only 1/2 of each

page.
I
want excel to print my data on one page with six columns (two ranges

with
the
same headings). This is an active database that is changed

regularly so
for
me to cut and paste is not effecient enough.







  #7   Report Post  
dawgpilot
 
Posts: n/a
Default

I did not know that it was shared. I removed the sharing and was able to
paste the workbook event code. It works nearly flawlessly. The only
glitches are my header row not extending across all six columns. Also my
database ends up with almost all records on one page with 5-10 records each
on two other pages. I will adjust my sheet and page settings to see if this
corrects my problem. Thank you very much, Bob, and if continue to encounter
problems I'll post my questions.

"Bob Phillips" wrote:

Is the workbook protected or shared?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"dawgpilot" wrote in message
...
Thank you, Bob. I have only one problem. When I right click and open

view
code the microsoft visual basic window opens. How do enter info? Almost

all
menu items are disabled and I cannot copy/pasted anywhere. The visual

basic
help menu is no help whatsoever.

"Bob Phillips" wrote:

Slight adjustment to the spec, and error handling :-)

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.Range("A61:C120").Copy Destination:=Range("D1")
.Range("A61:C120").ClearContents
On Error Goto cleanup
Application.EnableEvents = False
.PrintOut
.Range("D1:F60").Copy Destination:=Range("A61")
.Range("D1:F60").ClearContents
Cancel = True
End With
cleanup:
Application.EnableEvents = True
End Sub


--
HTH

Bob Phillips

"Bob Phillips" wrote in message
...
Here's an interesting little trick that I picked up from Tom Ogilvy

the
other day

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet
.Range("A61:B120").Copy Destination:=Range("C1")
.Range("A61:B120").ClearContents
Application.EnableEvents = False
.PrintOut
.Range("C1:D60").Copy Destination:=Range("A61")
.Range("C1:D60").ClearContents
Cancel = True
Application.EnableEvents = True
End With
End Sub


'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

You might want to add a test for the specific worksheet name if there

are
many.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"dawgpilot" wrote in message
...
I have a range with 3 columns and about 120 records. When left in

this
format it prints 3 columns over two pages using only 1/2 of each

page.
I
want excel to print my data on one page with six columns (two ranges
with
the
same headings). This is an active database that is changed

regularly so
for
me to cut and paste is not effecient enough.








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I sort by row instead of by column? PercivalMound Excel Worksheet Functions 7 August 28th 06 10:41 PM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM
How do I reference every "n" cell in a column in Excel? Alma Excel Worksheet Functions 2 March 22nd 05 06:19 PM
Formula for a column comicfly Excel Discussion (Misc queries) 2 March 11th 05 12:16 PM


All times are GMT +1. The time now is 11:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"