ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Autofilter input (https://www.excelbanter.com/excel-programming/274098-re-autofilter-input.html)

Abdul salam

Autofilter input
 
Hi,

you could do something like:

x = Sheets("Sheet1").Range("A1")
Selection.AutoFilter Field:=1, Criteria1:=x

Abdul Salam

-----Original Message-----
Hello,

I have a question:
Is it possible to autofilter based on a specific cell
input?

The line normally is:
Selection.AutoFilter Field:=1, Criteria1:="ABC"

However if I need BCD and this is located in Cell A1 you
would could something like:
Selection.AutoFilter Field:=1, Criteria1:="A1" or A1

However this doesn't work, does anybody know how it can
work and also with the field chooser?

Thank you very much,
Hans
.


Hans Weustink

Autofilter input
 
Dear Abdul,

It works! Thank you very much

Kind regards,
Hans

-----Original Message-----
Hi,

you could do something like:

x = Sheets("Sheet1").Range("A1")
Selection.AutoFilter Field:=1, Criteria1:=x

Abdul Salam

-----Original Message-----
Hello,

I have a question:
Is it possible to autofilter based on a specific cell
input?

The line normally is:
Selection.AutoFilter Field:=1, Criteria1:="ABC"

However if I need BCD and this is located in Cell A1 you
would could something like:
Selection.AutoFilter Field:=1, Criteria1:="A1" or A1

However this doesn't work, does anybody know how it can
work and also with the field chooser?

Thank you very much,
Hans
.

.



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

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