Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Code to hide rows
I want a macro that hides a dyamic named range. For example:
A 1 unhide 2 unhide 3 unhide 4 hide 5 hide 6 hide 7 unhide The hide/unhide are based on the contents of what is in column B, therefore the rows that indicate hide won't be static. However the cells indicating hide will always be next to each other (no overlap)... I was thinking that I need to define a named range which would include the rows that indicate hide in column A and then hide that named range. (ie in this case my named range would consist of rows 4-6, but again it wont always be this way.) I have numerous lines of data and do NOT want the macro to have to read through 4000 cells... I figured this would be much quicker! Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Code to hide rows
Hi, what if you had the cells that you want to hide contain a blank
value (""). The solution could be pretty simple: Sub uHide() Cells.Rows.Hidden = False Columns(1).EntireColumn.SpecialCells(xlBlanks).Row s.Hidden End Sub HTH--Lonnie M. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB Code to hide rows
Correction:
* Columns(1).EntireColumn.SpecialCells(xlBlanks).Row s.Hidden Should read: Columns(1).EntireColumn.SpecialCells(xlBlanks).Row s.Hidden = True |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro code to hide rows and not calculate hidden rows | Excel Discussion (Misc queries) | |||
Enabling option „Format rows“ to hide/unhide rows using VBA-code? | Excel Discussion (Misc queries) | |||
Code for Excel 2007 to hide rows based on sum of several rows not ina range | Excel Programming | |||
Code to Hide Rows | Excel Programming | |||
Modification in the CODE to HIDE rows and columns that start with ZERO (code given) | Excel Programming |