Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Select and Print Dynamic # of Columns

I have a job cost sheet that is 47 rows long by a dynamic number of columns
wide. For each day there are two columns associated with that day. I would
like some help with a macro or formula adjustment that will search across to
the last day entered and print each sheet out on a weekly basis regardless of
the number of days (ie - 11 days would print out 2 sheets, one with seven
days and on it with 4 days on the second) in addition to repeating the first
seven columns B thru H on each page printed out. Below is the formula I have
been trying to make work with no avail as well as the macro I use to
reference to the formula. Any and all help is appreciated.

="$B$1:HB$"&TEXT(C102+8,"0")

Sub PrintCumCost()

ActiveSheet.PageSetup.PrintArea = Range("B102")
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

--
Thanks and Regards,
Don
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Select and Print Dynamic # of Columns


I don't understand your question(s).
Please note that Excel prints pages not sheets.
Also, setting a print area requires that a String be provided...
....PrintArea = Range("B102:D145").Address
-or-
....PrintArea = "B102:D145"
--
Jim Cone
Portland, Oregon USA



"SSDSCA"
wrote in message
I have a job cost sheet that is 47 rows long by a dynamic number of columns
wide. For each day there are two columns associated with that day. I would
like some help with a macro or formula adjustment that will search across to
the last day entered and print each sheet out on a weekly basis regardless of
the number of days (ie - 11 days would print out 2 sheets, one with seven
days and on it with 4 days on the second) in addition to repeating the first
seven columns B thru H on each page printed out. Below is the formula I have
been trying to make work with no avail as well as the macro I use to
reference to the formula. Any and all help is appreciated.

="$B$1:HB$"&TEXT(C102+8,"0")

Sub PrintCumCost()

ActiveSheet.PageSetup.PrintArea = Range("B102")
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub
--
Thanks and Regards,
Don
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
Select dynamic data in 2 columns, and repeat macro to next sheet Tasha Excel Discussion (Misc queries) 2 September 17th 09 07:00 PM
Select Number of Columns and Print Macro Don Excel Discussion (Misc queries) 0 November 10th 06 09:26 PM
how do i print select combinations of columns in Excel? jbrown Excel Discussion (Misc queries) 3 June 28th 06 10:48 PM
select dynamic range with dynamic start point Juli Excel Programming 1 August 31st 05 12:05 AM
Create a print macro that would automatically select print area? wastedwings Excel Worksheet Functions 7 August 22nd 05 10:36 PM


All times are GMT +1. The time now is 11:30 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"