Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With macro recorder I generated this code
Sub Macro6() ActiveSheet.Range("$A$1:$I$5004").AutoFilter Field:=1, _ Criteria1:=Array("1", "2"), Operator:=xlFilterValues End Sub My objetive is to replace the array values with my named range, so I do this: In cell A1 I write value 1 In cell A2 I write value 2 I create a named range called "CR", wich refers to range("A1:A2") Then I modify my macro to this, to include the named range inside the array: Sub Macro6() ActiveSheet.Range("$A$1:$I$5004").AutoFilter Field:=1, _ Criteria1:=Array(Range("CR")), Operator:=xlFilterValues End Sub The problem is that it doesn´t work...What I am doing wrong? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Array Formula Not Working with Range with Formulas | Excel Discussion (Misc queries) | |||
Question about working with range array | Excel Programming | |||
Assigning range to array not working | Excel Programming | |||
Assigning array to range inside Excel Object | Excel Programming | |||
Check if a String is inside an Array | Excel Programming |