select the first cell containing data after using autofilter

Hi Experts !
How do I select the first cell containing data (if any) after using autofilter ?
thanks

try this

Sheets(1).Range("a1").CurrentRegion.SpecialCells(xlCellTypeVisible).Areas(2).Columns(1).Cells(1, 1).Select

Nick's picture

nice 1 Ashish... I have a

nice 1 Ashish...

I have a suggested improvement:

Sub SelectFirstPopulatedAutofilteredCell()
If Sheets(1).UsedRange.SpecialCells(xlCellTypeVisible).Areas.Count > 1 Then
 
 Sheets(1).UsedRange.SpecialCells(xlCellTypeVisible).Areas(2).Columns(1).Cells(1, 1).Select
Else
 MsgBox "No populated cells"
End If
 
End Sub

- to account for data with blank rows, and when the autofilter does not return anything

... however, a bug remains in that if blank cells are included in the autofilter, they're not selected