Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Printing macro, selected rows only

Hi,

I have a macro to import a file and sort by column A and set a page break
each time the value on column A changes. Next I only want to print certain
rows on each page and I can't figure out how to do it.

For example, I only want to print row 2 if the value of cells P2 through U2
are all zero(invidually, not a sum) and the value of cell V2 is zero.

Any thoughts?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Printing macro, selected rows only

Hide the rows not needed

Range("a1,a7,a10:a15").EntireRow.Hidden = True
'other code
Rows.Hidden = False
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Matt G" wrote in message
...
Hi,

I have a macro to import a file and sort by column A and set a page break
each time the value on column A changes. Next I only want to print
certain
rows on each page and I can't figure out how to do it.

For example, I only want to print row 2 if the value of cells P2 through
U2
are all zero(invidually, not a sum) and the value of cell V2 is zero.

Any thoughts?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Printing macro, selected rows only

Hi Don,

It is hiding the rows listed but I need it to hide rows based on the values
of the cells below. I'm fairly new at this so maybe I'm missing something.
The 'other code I assumed was the "sheets.printout" commands. Where am I
going wrong?

"Don Guillett" wrote:

Hide the rows not needed

Range("a1,a7,a10:a15").EntireRow.Hidden = True
'other code
Rows.Hidden = False
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Matt G" wrote in message
...
Hi,

I have a macro to import a file and sort by column A and set a page break
each time the value on column A changes. Next I only want to print
certain
rows on each page and I can't figure out how to do it.

For example, I only want to print row 2 if the value of cells P2 through
U2
are all zero(invidually, not a sum) and the value of cell V2 is zero.

Any thoughts?




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
printing multiple selected rows peyman Excel Discussion (Misc queries) 13 August 14th 07 09:56 PM
Help printing selected rows kcowan Excel Discussion (Misc queries) 4 January 2nd 06 11:52 PM
Printing selected rows maacmaac Excel Discussion (Misc queries) 1 December 8th 05 05:15 PM
Printing selected rows rjamison Excel Programming 0 June 14th 05 12:14 AM
Printing selected rows Mark Excel Programming 1 April 20th 05 02:51 PM


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