Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Inputting criteria into a macro/vb code
I don't know if anyone can help. I need to create some code that operates
autofilter, I don't have a problem doing this: Sub TEST() Sheets("Store Data").Select Selection.AutoFilter Field:=8, Criteria1:="10", Operator:=xlTop10Items Selection.AutoFilter Field:=20, Criteria1:="30", Operator:=xlAnd Selection.AutoFilter Field:=21, Criteria1:="50", Operator:=xlAnd End Sub However, the criteria and operator will change everytime, the user will be putting the criteria and operator into cells on another sheet and I need the code to pick up this data from the cells. Plus, there will sometimes be only 1, 2 or 3 critieria, ie, not all three selections will be made everytime. Is this at all possible? Thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inputting numbers using a macro. | Excel Discussion (Misc queries) | |||
Deleting code from a macro (by a macro) | Excel Discussion (Misc queries) | |||
Code help, delete rows based on column criteria | Excel Discussion (Misc queries) | |||
inputting data | Excel Discussion (Misc queries) | |||
Problem with criteria when using it from VBA Code | Excel Worksheet Functions |