Macro - Move Cursor Down in the Filter Range

seageath

Board Regular
Joined
Oct 29, 2009
Messages
102
Hi, I need to create macro to move 1 cell down in the filter rows as per image attached, using record macro it will recorded as below:

VBA Code:
Range("A9850").Select

My scenario is: Goto A1, Down 1 Cell, and select all remaining rows for me to delete these rows.

But under different circumstances the row number might be different.
Let me know if need more details to explain the scenario.

~SEA~
 

Attachments

  • Screenshot 2023-05-10 163315.jpg
    Screenshot 2023-05-10 163315.jpg
    32.1 KB · Views: 5

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Found it, posted 12 years back :)

In short, this is the function:

VBA Code:
Function findFirstVisibleFilteredCell(StartCell As Range)
    
    Dim aRng As Range
    Set aRng = StartCell.CurrentRegion  'aRng also contains the header row
    Set aRng = aRng.Offset(1, 0).Resize(aRng.Rows.Count - 1) 'and now it doesn't
    Set findFirstVisibleFilteredCell = aRng.SpecialCells(xlCellTypeVisible).Cells(1, 1)

End Function

Your welcome :cool:
 
Upvote 0
Solution

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top