Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi ,
I have the following code wich hides lines in an income statement if active cell is equal to "Hide". "Hide" is displayed when a divisional total =0. Each division is shown on a separate page. Sub Hide_Blanks() Range("AU14").Select ' Test contents of active cell; if active cell is "end" Do Until ActiveCell = "end" ActiveCell.Select If ActiveCell = "Hide" Then Call hideblanks ' Step down 1 row to the next cell. ActiveCell.Offset(1, 0).Select ' Return to top of loop. Loop Range("a8").Select End Sub Sub hideblanks() ActiveCell.Select ActiveCell.Offset(1, 0).Select ActiveCell.PageBreak = False ActiveCell.Offset(-1, 0).Select Range(Selection, Selection.End(xlUp)).Select Selection.EntireRow.Hidden = True Selection.End(xlDown).Select ActiveCell.Offset(-1, 0).Select End Sub For some reason it hides the rows with data but when I come tp print the spreadsheet the page still prints off. Tha page is not completely hidden. I hope I am making sense. Thanks, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to HIDE blank rows | Excel Worksheet Functions | |||
How to hide rows, but not blank rows used for formatting | Excel Programming | |||
Macro hide rows with blank data in cells | Excel Programming | |||
Macro to hide blank rows | Excel Programming | |||
macro to hide rows if cell is blank | Excel Worksheet Functions |