Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select first field whilst autofilter is on
Hi, I'm having trouble getting my macro to go to the first row which
is visible, whilst the autofilter is on. I can get to the last row by going to the bottom of the sheet, then using XlEndUp, but I can't use it for the top row. If I use offset, it will select one of the hidden cells... Any help would be appreciated. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select first field whilst autofilter is on
Option Explicit
sub testme() dim VRng as range with activesheet.autofilter.range if .columns(1).cells.specialcells(xlcelltypevisible). count = 1 then msgbox "no visible cells exit sub end if set Vrng = .columns(1).resize(.rows.count-1,1) _ .offset(1,0).cells.specialcells(xlcelltypevisible) end with vrng.cells(1).select end sub bony_tony wrote: Hi, I'm having trouble getting my macro to go to the first row which is visible, whilst the autofilter is on. I can get to the last row by going to the bottom of the sheet, then using XlEndUp, but I can't use it for the top row. If I use offset, it will select one of the hidden cells... Any help would be appreciated. Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dynamic autofilter field | Excel Discussion (Misc queries) | |||
How to select blank cells only whilst using sumproduct | Excel Worksheet Functions | |||
Summing a Field while Using an Autofilter | Excel Programming | |||
Autofilter with date field | Excel Programming | |||
Selection.AutoFilter Field:=1 | Excel Programming |