close

Hi,

I need help on following problem.

There are about 1000 rows in a sheet. When I apply Auto filter it get
about 200 rows. I require to navigate to each of the filtered row and
do some checks and based on that some actions in each of the row. I
want to do this using a macro. But I do nopt know how to navigate to
next filtered row. Offset command is taking to immediate next row and
not the visible row on filter.

Could somebdy please help me on this with a macro.

Thanks for help in advance

Regards
Anand--
anandmr65
------------------------------------------------------------------------
anandmr65's Profile: www.excelforum.com/member.php...oamp;userid=30728
View this thread: www.excelforum.com/showthread...hreadid=514657Hi Anand,

Try something like:

'=============gt;gt;
Public Sub Tester001()
Dim rng As Range
Dim rng2 As Range
Dim rCell As Range

Set rng = ActiveSheet.AutoFilter.Range
Set rng = Intersect(rng, Columns(1))
Set rng = rng.Offset(1).Resize(rng.Rows.Count - 1)
Set rng2 = rng.SpecialCells(xlVisible)

For Each rCell In rng2.Cells
'do something, e.g.:
MsgBox rCell.Address
Next rCell

End Sub
'lt;lt;=============---
Regards,
Norman
quot;anandmr65quot; gt; wrote
in message ...
gt;
gt; Hi,
gt;
gt; I need help on following problem.
gt;
gt; There are about 1000 rows in a sheet. When I apply Auto filter it get
gt; about 200 rows. I require to navigate to each of the filtered row and
gt; do some checks and based on that some actions in each of the row. I
gt; want to do this using a macro. But I do nopt know how to navigate to
gt; next filtered row. Offset command is taking to immediate next row and
gt; not the visible row on filter.
gt;
gt; Could somebdy please help me on this with a macro.
gt;
gt; Thanks for help in advance
gt;
gt; Regards
gt; Anand
gt;
gt;
gt; --
gt; anandmr65
gt; ------------------------------------------------------------------------
gt; anandmr65's Profile:
gt; www.excelforum.com/member.php...oamp;userid=30728
gt; View this thread: www.excelforum.com/showthread...hreadid=514657
gt;

Thanks a lot for the help. I will try this solution out.

Regards
Anand--
anandmr65
------------------------------------------------------------------------
anandmr65's Profile: www.excelforum.com/member.php...oamp;userid=30728
View this thread: www.excelforum.com/showthread...hreadid=514657

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()