View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default String variable name is incorrectly used literally

use something like this

Sub test()
Dim ws As Worksheet
Dim lastrow As Long
Set ws = Worksheets("Sheet1")
lastrow = ws.Cells(Rows.Count, "A").End(xlUp).Row

With ws.Range("A1:C" & lastrow)
.AutoFilter Field:=1, Criteria1:="0", Operator:=xlAnd
End With
End Sub


--


Gary


"John Keith" wrote in message
...
On Sun, 14 Sep 2008 18:21:10 -0600, John Keith wrote:


So the problem seems to be that the
filter is not being applied to all the rows of data.


I think I just found the problem. There are some blank rows in ther
data and it looks like the filter stops at the first blank row.

Let me go test!

Thanks everyone.


John Keith