Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 4 of 4

Thread: Advanced Filter - Extract Range Has A Missing Or Illegal Field Name

  1. #1
    Join Date
    6th August 2010
    Posts
    5

    Advanced Filter - Extract Range Has A Missing Or Illegal Field Name

    Morning All,

    I'm using the below code to paste unique values from column 'D' to cells 'A6001:A11000'.

    I'm getting the following error message:

    Run-Time error '1004'

    The Extract Range Has A Missing Or Illegal Field Name

    Can anybody see anything immediatley wrong?

    VB:
    ActiveSheet.Range("D:D").Select 
    Columns("D:D").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _ 
    "A6001:A11000"), Unique:=True 
    
    

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    19th January 2007
    Location
    South Carolina, USA
    Posts
    9,206

    Re: Advanced Filter - Extract Range Has A Missing Or Illegal Field Name

    There are links in Possible Answers section at the bottom of this thread that address this very topic. Have you tried them?

    You don't need to select cells in VBA, just reference them and act on them. Also, it is best to set the paste range as a single cell and let Excel adjust the size of the paste range.

    VB:
    ActiveSheet.Columns("D:D").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("A6001"), Unique:=True 
    
    
    Last edited by AAE; August 27th, 2010 at 22:30.
    AAE
    ----------------------------------------------------

    Forum Rules | Message to Cross Posters | How to use Tags

  3. #3
    Join Date
    6th August 2010
    Posts
    5

    Re: Advanced Filter - Extract Range Has A Missing Or Illegal Field Name

    I've looked at the previous posts and it doesn't really help. My data range has a header. Can't seem to work out why its not working!

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    19th January 2007
    Location
    South Carolina, USA
    Posts
    9,206

    Re: Advanced Filter - Extract Range Has A Missing Or Illegal Field Name

    Try:

    1. Press Ctrl + F3 keys to open the Name Manager
    2. Delete the extract range
    3. Select the paste range (A6001 to end of the column) and delete the cells
    4. Save and close the workbook
    5. Reopen and try running the filter

    If this doesn't work, you should upload a sample workbook.

    I would also add to the code this line to clear the paste range so that it only contains the recent filter results.
    VB:
    Range("A6001:A" & Cells(Rows.Count, "A").End(xlUp).Row).ClearContents 
    
    
    AAE
    ----------------------------------------------------

    Forum Rules | Message to Cross Posters | How to use Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Replies: 18
    Last Post: August 28th, 2006, 12:11
  2. Replies: 4
    Last Post: August 14th, 2006, 14:10
  3. Replies: 2
    Last Post: April 21st, 2006, 15:39
  4. AdvancedFilter - Illegal or Missing Field Name
    By Bronsted in forum EXCEL HELP
    Replies: 3
    Last Post: September 21st, 2004, 04:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno