Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Suppressing Blank Rows | Excel Discussion (Misc queries) | |||
Suppressing detail rows | Excel Discussion (Misc queries) | |||
Finding a value and then suppressing ALL rows WITHOUT the found va | Setting up and Configuration of Excel | |||
How do I group rows prior to a data sort so they stay together? | Excel Discussion (Misc queries) | |||
Pivot Tables: How do I show ALL field rows, including empty rows?? | Excel Worksheet Functions |