LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Advanced filter with naming range

Hi,

I need to copy all the data from SheetB with ENV_342 criteria to SheetA. I
am using the advanced filter. In this code I am using the range A5:B911, but
I need to replace this by FILTER naming range. If I just replace the text
A5:B911 with FILTER I received the execute error message 1004. Do anyone
have a solution?

I am using Excel 2003.

This is my actual code

Sheets("Sheet B").Range("A5:B911").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("A1:A2"), CopyToRange:=Range("A3"), Unique:=False

Range("A4").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Names.Add Name:="ENV_342", RefersTo:=Selection


Thanks
Catherine

 
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
using advanced filter in VBA with a dynamic range Dave F Excel Programming 1 October 2nd 06 09:19 PM
Advanced Filter to Dynamic Range John Excel Programming 5 November 12th 05 09:12 PM
Automatic Range Naming using Advanced Filter? ArthurJ Excel Programming 2 August 26th 05 04:51 PM
advanced filter a range Il Principe Excel Worksheet Functions 2 August 1st 05 03:27 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM


All times are GMT +1. The time now is 06:35 AM.

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"