ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AutoFilter returning All Rows (https://www.excelbanter.com/excel-programming/338585-autofilter-returning-all-rows.html)

Jim Zeeb[_2_]

AutoFilter returning All Rows
 
I have a criteria range that looks like below:
Active Class-1 Class-2 Class-3 Class-4 Class-5
Y 10
Y 10
Y 10
Y 10
Y 10

This criteria range(A1:F6) returns ALL rows.
If I set the criteria to (A1:E5), it works just fine and returns the rows
with Active=Y and a 10 in any of the Class-x columns.
Is there some limitation on the size of a criteria range?

Here is the filter command:
Range("customer_db").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("LB_Criteria"), _
CopyToRange:=Range("LB_Extract"), Unique:=False



Jim Zeeb[_2_]

AutoFilter returning All Rows
 
I found the problem:
The Class-5 column in the "Customer_db" was named Class_5 (underscore
instead of dash)

Sorry for the premature posting.
....jz

"Jim Zeeb" wrote:

I have a criteria range that looks like below:
Active Class-1 Class-2 Class-3 Class-4 Class-5
Y 10
Y 10
Y 10
Y 10
Y 10

This criteria range(A1:F6) returns ALL rows.
If I set the criteria to (A1:E5), it works just fine and returns the rows
with Active=Y and a 10 in any of the Class-x columns.
Is there some limitation on the size of a criteria range?

Here is the filter command:
Range("customer_db").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("LB_Criteria"), _
CopyToRange:=Range("LB_Extract"), Unique:=False




All times are GMT +1. The time now is 05:05 AM.

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