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 add end rows after suppressing prior rows

Hi all,
I've got a worksheet designed to do estimates (for
products). It's set-up for the largest possible number
of items included in a quote for calculation purposes.
The end users are sales people, with end viewer being the
customer.

Sheet is 102 rows, product lines run rows 15-98, totals
run lines 99-102. GOAL - automatically suppress unused
lines between rows 15-98.

I've currently got a button set-up (use me to print
nice!) for the sales people to click, which uses the
following (thank you Tom!):

Sub suppressrows()
Dim pntrng As Range

lastrow = ActiveSheet.Range("a102").End(xlUp).Row
If ActiveSheet.Name = "Estimate_test2" Then
Set pntrng = Range("a1").CurrentRegion
lastcol = pntrng.Columns.Count
Else
lastcol = 11
End If
ActiveSheet.PageSetup.PrintArea = Range(Cells(1, 1), Cells
(lastrow + 1, lastcol)).Address
End Sub

This works beautifully in suppressing product line rows
not used. Problem is it also suppresses totals (pre-set
to do calculations). How can I add the info that appears
in rows 99-102 back into the printarea (moving it to the
end of the used product lines/rows)??

FYI - just suppressing all blank rows throughout document
is not an option (had a nice little macro for that!).
Moving totals to top of page is not an option either.

Seems like this should be easy, but I've spent hours
trying to figure it out. Any and all suggestions are
greatly appreciated. Thanks!!
 
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
Suppressing Blank Rows Sue C Excel Discussion (Misc queries) 0 March 5th 09 02:45 PM
Suppressing detail rows da Excel Discussion (Misc queries) 1 January 13th 09 12:59 AM
Finding a value and then suppressing ALL rows WITHOUT the found va Tom Setting up and Configuration of Excel 4 February 2nd 08 10:00 PM
How do I group rows prior to a data sort so they stay together? Linda Mills Excel Discussion (Misc queries) 4 August 17th 05 08:28 PM
Pivot Tables: How do I show ALL field rows, including empty rows?? [email protected] Excel Worksheet Functions 2 April 8th 05 06:21 PM


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