LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Action to take after autofilter

On Sun, 13 Dec 2009 21:53:00 -0500, "Gary Keramidas"
<GKeramidasAtMSN.com wrote:

Sub test()
Dim ws As Worksheet
Dim lastrow As Long
Dim frow As Long
Set ws = Worksheets("Sheet1")
lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row
With ws.Range("A1:M" & lastrow)
.AutoFilter field:=9, Criteria1:="Lbl"
frow =
.Columns(9).Offset(1).SpecialCells(xlCellTypeVisi ble).Cells.Row
lastrow = .Cells(Rows.Count, "I").End(xlUp).Row
End With
With ws.Range(Cells(frow, 9).Address & ":" & Cells(lastrow,
9).Address).SpecialCells(xlCellTypeVisible)
.Value = ""
End With
ws.AutoFilterMode = False
End Sub


Gary,

I finally had time today to check your suggestion, it works as needed,
thanks.

Do I understand:

frow is the variable pointing to the first found row after the filter
is applied?

What does the Offset(1) do in the line where frow is defined?


John Keith

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excell copy action pauses for 15 second for the smallest action Meekal Excel Discussion (Misc queries) 1 January 28th 10 04:30 PM
autofilter, launch action spirosu[_2_] Excel Programming 0 March 15th 06 10:12 PM
Autofilter launching action spirosu Excel Discussion (Misc queries) 1 March 15th 06 06:23 PM
Macro to select the result of an autofilter action [email protected] Excel Programming 1 December 22nd 05 11:08 AM


All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"