Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I would like a VBA code that will allow me to hide certain rows. That is, if cell A3 has a "1" in it, then I want that entire row (only on this worksheet, not throughout the workbook) to be hidden. I would also like it to hide all of the totally blank rows at the bottom of the worksheet. The last request is that this is a constantly running and as each cell in column A changes to a "1" then the row is hidden. Thanks, Jon |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jon
Worksheet event code........ Private Sub Worksheet_Change(ByVal Target As Excel.Range) 'when entering data in a cell in Col A On Error GoTo enditall Application.EnableEvents = False If Target.Cells.Column = 1 Then n = Target.Row If Excel.Range("A" & n).Value = 1 Then Excel.Range("A" & n).EntireRow.Hidden = True End If End If enditall: Application.EnableEvents = True End Sub Gord Dibben Excel MVP On Wed, 10 Nov 2004 17:09:02 -0800, Vlookup help wrote: Hi, I would like a VBA code that will allow me to hide certain rows. That is, if cell A3 has a "1" in it, then I want that entire row (only on this worksheet, not throughout the workbook) to be hidden. I would also like it to hide all of the totally blank rows at the bottom of the worksheet. The last request is that this is a constantly running and as each cell in column A changes to a "1" then the row is hidden. Thanks, Jon |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is what I use:
For I = 1 To 800 Range("A" & I).Select If ActiveCell.Value = "0" Then Selection.EntireRow.Hidden = True Else End If Next I "Vlookup help" wrote: Hi, I would like a VBA code that will allow me to hide certain rows. That is, if cell A3 has a "1" in it, then I want that entire row (only on this worksheet, not throughout the workbook) to be hidden. I would also like it to hide all of the totally blank rows at the bottom of the worksheet. The last request is that this is a constantly running and as each cell in column A changes to a "1" then the row is hidden. Thanks, Jon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CONDITIONAL HIDE/UNHIDE ROWS | Excel Discussion (Misc queries) | |||
Hide rows with conditional formatting | Excel Discussion (Misc queries) | |||
Using VBA to Conditional Hide Rows? | Excel Discussion (Misc queries) | |||
Conditional Hide/Unhide Rows | Excel Discussion (Misc queries) | |||
Conditional hide rows macros | Excel Programming |