+ Reply to Thread
Results 1 to 11 of 11

Advanced Filter between two formatted Dates

  1. #1
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Advanced Filter between two formatted Dates

    hi all,

    I have a code filtering my database table by dates actually between two dates, but it's not workin with me

    and i dont know WHY

    please, anyone reviews that

    the code in userform2

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Mamud; 03-09-2012 at 07:51 AM.

  2. #2
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Advanced Filter between two formatted Dates

    Up

    Up

    UP

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Advanced Filter between two formatted Dates

    criteria range is wrong
    look here to see why
    http://www.contextures.com/xladvfilter01.html
    look at the bit filtering between dates your code should reflect this
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Advanced Filter between two formatted Dates

    sorry martindwilson, but i dont understand

    did u mean the AND statement is wrong ?????

    please kindly can u edit the attachment or mention the wrong line in code ??

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Advanced Filter between two formatted Dates

    You are trying to filter to a different sheet, it should be the same sheet

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  6. #6
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Advanced Filter between two formatted Dates

    thx royUK

    but it dosnt work also >>>>

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Advanced Filter between two formatted Dates

    Try using a Custom Filter

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Advanced Filter between two formatted Dates

    hi roy

    can i use Advancedfilter instead of autofilter ?

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Advanced Filter between two formatted Dates

    Hello Mamud,

    Here is the code for the filter. You have have to filter the data twice.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  10. #10
    Forum Contributor
    Join Date
    09-01-2011
    Location
    England
    MS-Off Ver
    Excel 365
    Posts
    126

    Re: Advanced Filter between two formatted Dates

    hi Leith

    it really works.....

    Thx Leith

  11. #11
    Registered User
    Join Date
    04-28-2016
    Location
    usa
    MS-Off Ver
    2007
    Posts
    48

    Re: Advanced Filter between two formatted Dates

    Dear Leith,

    I would like your help, as I am trying to creat a macro for searching between two dates usinng advanced filter, I have my data set as :

    date/ inventory/ sales/ wages/ (those are the columns) so this would be the lis to be filtered , the name of the sheet is (production) and the list to be filtere is a10:G5000

    CRITIRIA RANGE AND COPY TO WILL BE A SPOT ON THE SAME SHEET CALLED PRODUCTION

    could you please helpe me create this code, as I was not able to search between two dates using advanced filter, eventhough my advanced filter setup was successful and it does the job very well except for searching between two dates, and the auto filter between dates did not do the job wanted for me eventhough it did work

    many thanks in advance for your help

    Mark

+ 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