RE: Autofilter Range
- From: ND Pard <NDPard@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 6 May 2008 10:00:08 -0700
Open your VBA editor (Alt & F11), insert a Module, copy and paste the macro
below.
Go Back to your spread*** and place your cursor in any of the Filtered
cells.
Run the macro (Alt & F8).
Good Luck.
Sub FilteredData_1st_n_Last_Rows()
Selection.CurrentRegion.Select
Range(ActiveCell.Offset(1), ActiveCell.Offset _
(Selection.Rows.Count - 1, Selection.Columns.Count - 1)).Select
Do While ActiveCell.Height = 0
ActiveCell.Offset(1).Select
Loop
MsgBox "First Row = " & ActiveCell.Row
Selection.CurrentRegion.Select
MsgBox "Last Row = " & Selection.SpecialCells(xlCellTypeLastCell).Row
End Sub
"Nigel" wrote:
Hi All.
After I apply an autofilter, how can I determine the first visible row
number and last visible row number of the filtered list ?
Cheers
--
Regards,
Nigel
nigelnospam@xxxxxxxxx
- Follow-Ups:
- Re: Autofilter Range
- From: Nigel
- Re: Autofilter Range
- References:
- Autofilter Range
- From: Nigel
- Autofilter Range
- Prev by Date: Re: Run Macro on all WS in active workbook..
- Next by Date: Re: Disabling Autocalculation when opening CSV files
- Previous by thread: Autofilter Range
- Next by thread: Re: Autofilter Range
- Index(es):