Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Row Based on cell value
What may I do to automatically hide all rows whos first
cell has the value "NA"? Thank you, gary |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Row Based on cell value
Hi Gary,
Here is one way Sub CopyMe() Dim sToFind As String Dim clastrow As Long Dim myRange As Range With ActiveSheet clastrow = .Cells(Rows.Count, "A").End(xlUp).Row .Range("A1").EntireRow.Insert sToFind = "NA" .Columns("A:A").AutoFilter Field:=1, Criteria1:=sToFind Set myRange = .Rows("2:" & clastrow + 1).SpecialCells(xlCellTypeVisible).Rows .Range("A1").EntireRow.Delete End With myRange.Hidden = True End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "GaryF" wrote in message ... What may I do to automatically hide all rows whos first cell has the value "NA"? Thank you, gary |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Row Based on cell value
Thank you Bob.
Gary -----Original Message----- Hi Gary, Here is one way Sub CopyMe() Dim sToFind As String Dim clastrow As Long Dim myRange As Range With ActiveSheet clastrow = .Cells(Rows.Count, "A").End(xlUp).Row .Range("A1").EntireRow.Insert sToFind = "NA" .Columns("A:A").AutoFilter Field:=1, Criteria1:=sToFind Set myRange = .Rows("2:" & clastrow + 1).SpecialCells(xlCellTypeVisible).Rows .Range("A1").EntireRow.Delete End With myRange.Hidden = True End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "GaryF" wrote in message ... What may I do to automatically hide all rows whos first cell has the value "NA"? Thank you, gary . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hide Row Based on cell value
A pleasure Gary.
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Gary Fuller" wrote in message ... Thank you Bob. Gary -----Original Message----- Hi Gary, Here is one way Sub CopyMe() Dim sToFind As String Dim clastrow As Long Dim myRange As Range With ActiveSheet clastrow = .Cells(Rows.Count, "A").End(xlUp).Row .Range("A1").EntireRow.Insert sToFind = "NA" .Columns("A:A").AutoFilter Field:=1, Criteria1:=sToFind Set myRange = .Rows("2:" & clastrow + 1).SpecialCells(xlCellTypeVisible).Rows .Range("A1").EntireRow.Delete End With myRange.Hidden = True End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "GaryF" wrote in message ... What may I do to automatically hide all rows whos first cell has the value "NA"? Thank you, gary . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
hide row based on cell value | Excel Worksheet Functions | |||
Hide row based on cell value | Excel Worksheet Functions | |||
Hide sheets based on Cell value | Excel Discussion (Misc queries) | |||
hide rows based on cell value | New Users to Excel | |||
Is there a way to HIDE a row based on a value of a cell ? | Excel Discussion (Misc queries) |