+ Reply to Thread
Results 1 to 2 of 2

Error in advanced filters

  1. #1
    Registered User
    Join Date
    08-09-2011
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2003
    Posts
    10

    Error in advanced filters

    Hello i am using a advanced filter to extract from a exchange rate database the ones that are only between the time interval i need.

    In the criteria range i wrote ">14-01-2010" and, althought the advanced filter executed in the ribbon works just fine, the code returns no value.

    I am using the following code:

    Range("A1:B1").Select
    Range(Selection, Selection.End(xlDown)).AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
    Sheets("apoio").Range("A4:C5"), Unique:=False

    It doesn´t really make any sense, can anyone help me figure out what is wrong in the code?

    Thanks

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Error in advanced filters

    Hi,

    2 things -

    Please edit your post and put code tags around you code. Have a look at my signature to see how.
    You mention that you clicked on the advanced filter button on the ribbon, but your profile says you are using XL 2003?


    Excel is getting a bit confused by the date you've put in the cell. You can rewrite it like such as either of these to remove any confusion:

    =">"&DATE(2010,1,14)

    or

    >2010-01-14
    Hope that helps,

    Colin

    RAD Excel Blog

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1