selecting the first row after a filtered range
Thank you for pointing out the way. I used the following line in my code and
it worked
Set rng = rng.Offset(1).Resize(rng.Rows.Count - 1)
"Norman Jones" wrote:
Hi Farooq,
Try something like:
'=============
Public Sub Tester()
Dim rng As Range
Dim rng2 As Range
Set rng = ActiveSheet.AutoFilter.Range
Set rng = rng.Offset(1).Resize(rng.Rows.Count - 1)
On Error Resume Next
Set rng2 = rng.SpecialCells(xlCellTypeVisible)
On Error Resume Next
If Not rng2 Is Nothing Then
rng2.Copy Destination:=Sheets(1).Range("A1")
End If
End Sub
'<<=============
---
Regards,
Norman
"Farooq Sheri" wrote in message
...
I have a worksheet with information for about 18 nodes. I am able to locate
the data for a particular node and by using AutoFilter I can filter out
the
specific row which I require (always a single row). I want to copy this
row
to another sheet. xlCellTypeVisible does not work because there is visible
data for other nodes.
Thanks for your help.
Farooq
|