ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   First Filtered cell in range (https://www.excelbanter.com/excel-programming/378329-first-filtered-cell-range.html)

John

First Filtered cell in range
 
Hi,

Using Cells.SpecialCells(xlLastCell).Select will take the Cellpointer to the
last cell.
How do i get XlFirstCell please?

Thanks

John


Don Guillett

First Filtered cell in range
 
try this, but why do you need to select?

Sub gotofirstcellinfilteredrng()
Range("b2:b22").SpecialCells(xlVisible).Cells(1, 1).Select
End Sub

--
Don Guillett
SalesAid Software

"John" wrote in message
...
Hi,

Using Cells.SpecialCells(xlLastCell).Select will take the Cellpointer to
the
last cell.
How do i get XlFirstCell please?

Thanks

John




John

First Filtered cell in range
 
Hi Don,

Thank's for a solution.

The Filtered data is put into a Listbox. Problem i've got is the Filtered
range is including the Field Heading in the Listbox as well, so thought if i
could get the first row of Filtered data then i could define the range to use.

I guess another way around would be to select the first row in column D (my
source data range) as the Column heading in the Listbox.

John


"Don Guillett" wrote:

try this, but why do you need to select?

Sub gotofirstcellinfilteredrng()
Range("b2:b22").SpecialCells(xlVisible).Cells(1, 1).Select
End Sub

--
Don Guillett
SalesAid Software

"John" wrote in message
...
Hi,

Using Cells.SpecialCells(xlLastCell).Select will take the Cellpointer to
the
last cell.
How do i get XlFirstCell please?

Thanks

John






All times are GMT +1. The time now is 03:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com