View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default 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



.