LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
RCL RCL is offline
external usenet poster
 
Posts: 10
Default Range inside Array not working

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Array Formula Not Working with Range with Formulas [email protected] Excel Discussion (Misc queries) 4 February 1st 06 02:01 PM
Question about working with range array 39N 95W Excel Programming 2 January 18th 06 11:49 PM
Assigning range to array not working Marston Excel Programming 2 August 12th 04 11:38 PM
Assigning array to range inside Excel Object Jon Peltier Excel Programming 0 April 1st 04 11:14 PM
Check if a String is inside an Array Alan Beban[_3_] Excel Programming 0 September 3rd 03 07:44 PM


All times are GMT +1. The time now is 01:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"