Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding cell data into a macro to allow specified information filte
I have a macro which filters information in a worksheet and then copies certain columns of the filtered data to another worksheet. The macro that does this already contains the filter criteria. What I would like to do is allow a user to type information into a given cell which the macro will read and use as the filter criteria (when the macro runs). Can this be done? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding cell data into a macro to allow specified information filte
One way:
Sheets("Sheet1").Range("A1").AutoFilter _ Field:=1, _ Criteria1:=Sheets("Sheet1").Range("J10").Value, _ VisibleDropDown:=True Or, more efficiently: With Sheets("Sheet1") .Range("A1").AutoFilter, _ Field:=1, _ Criteria1:=.Range("J10").Value, _ VisibleDropDown:=True End With In article , mattguerilla wrote: I have a macro which filters information in a worksheet and then copies certain columns of the filtered data to another worksheet. The macro that does this already contains the filter criteria. What I would like to do is allow a user to type information into a given cell which the macro will read and use as the filter criteria (when the macro runs). Can this be done? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding cell data into a macro to allow specified information filte
Using Autofilter?
instead of Criteria1:="ABC" put in Criteria1:=Worksheets(1).Range("E9").Value -- Regards, Tom Ogilvy "mattguerilla" wrote in message ... I have a macro which filters information in a worksheet and then copies certain columns of the filtered data to another worksheet. The macro that does this already contains the filter criteria. What I would like to do is allow a user to type information into a given cell which the macro will read and use as the filter criteria (when the macro runs). Can this be done? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
adding cell data into a macro to allow specified information f
thankyou very much lads...excellent
Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to get a copy of the first row Text value displayed in a filte | Excel Discussion (Misc queries) | |||
Allow users of protected sheet to use macro involving custom filte | Excel Discussion (Misc queries) | |||
Adding Data Information to a Chart | Charts and Charting in Excel | |||
Duplicate Data -Adding information to another column in row & dele | Excel Discussion (Misc queries) | |||
Macro to move information to different cell | Excel Programming |