LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Code for Printing Discontiguous Ranges


Excel version: 11 (2003 SP2)
OS: WXP SP2

I have a worksheet that has monthly, quarterly and year columns. The
rows are various items whose sales figures are recorded in the cells.
The columnar layout is the three months of a quarter followed by the
quarter summary.

For the yearly summary report, I want to print each quarter and the
year totals adjacent to each other. Operating on the worksheet itself,
i.e., without VBA code, this is fairly straightforward. Hide all months
and print the area with the quarter and year columns.

When I specify a print area in VBA as, for example, ThisPrintArea =
"Q1, Q2, Q3, Q4, Year", where Qx and Year are non-adjacent ranges, I
get five pages instead of one. Each page has the horizontal and
vertical repeating rows with one range on each page.

I know I can change the layout so that all the months are together and
all the quarters plus the year are together but I'd like to know how
one accomplishes the desired result in VBA.

Thanks,

- Al


--
GoFigure
------------------------------------------------------------------------
GoFigure's Profile: http://www.excelforum.com/member.php...fo&userid=4274
View this thread: http://www.excelforum.com/showthread...hreadid=493043

 
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
Deselect a cell in a discontiguous range Excel_VBA_Newb Excel Discussion (Misc queries) 3 October 8th 09 09:02 PM
Is it possible to plot discontiguous cells? Peter Bernadyne Charts and Charting in Excel 8 May 11th 06 09:45 PM
Is it possible to plot discontiguous cells? Peter Bernadyne Excel Discussion (Misc queries) 0 May 9th 06 10:32 PM
discontiguous ranges in charts Pilgrim Excel Programming 1 July 3rd 04 05:53 PM
Defining a discontiguous Range object Charley Kyd[_2_] Excel Programming 15 December 30th 03 12:33 AM


All times are GMT +1. The time now is 03:36 AM.

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

About Us

"It's about Microsoft Excel"