How to Move the ActiveCell to the next row

Closed
sshyl Posts 2 Registration date Monday July 6, 2009 Status Member Last seen July 7, 2009 - Jul 7, 2009 at 09:38 AM
venkat1926 Posts 1864 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jul 12, 2009 at 08:50 PM
Hello,
Move the ActiveCell to the next row is simple:
ActiveCell.Offset(1,0).Select
Ok. But if AutoFilter is on, that command can lead me to a non shown cell.
How can I do if I only want to iterate across the shown cell?
Example below table in A1 and B1
name gender
Jeni Female
Jhon Male
Alex Male
Peter Male
Flex Male
Once I filter critera as Male from column B Row 2 will not be shown.
Now if I use ActiveCell.Offset(1,0).Select from B1 it will take me to B2 only but I need the cell in B3
I would appreciate very much a help.

Thanks.
Shylendra

1 reply

venkat1926 Posts 1864 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 810
Jul 12, 2009 at 08:50 PM
try this code statement

ActiveCell.Cut
ActiveCell.End(xlDown).Select
ActiveSheet.Paste
Application.CutCopyMode = False
5