+ Reply to Thread
Results 1 to 2 of 2

Advance filter to find date wise?

  1. #1
    Tiya
    Guest

    Advance filter to find date wise?

    Wish u all a happy x'mas
    Hi
    I am using Advance Filter for data like...
    Date,PartyName,Item,Gross,Mel,Labr.

    Sub test()

    Sheets("DATA").Select

    Range("A5:J600").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
    "A1:J2"), CopyToRange:=Range("M5:v5"), Unique:=False


    Range("M5:V5").Select
    Range(Selection, Selection.End(xlDown)).Select
    Range("M5:V30").Select
    Selection.Copy
    Sheets("Day Report").Select
    ActiveSheet.Paste
    Range("A2").Select
    Sheets("data").Select
    Range("A6").Select

    End Sub

    Where i want to find data list for Date wise like
    Date start from 1 oct 05 to 30 oct 05 or so on.
    but i am not able to do this. I have record this macro.

    Any Help.

    thanks

    Tiya

  2. #2
    Bob Phillips
    Guest

    Re: Advance filter to find date wise?

    Tiya,

    Instead of using the data as a range, create a new criteria range of say

    L1: Date
    L2: =">="&DATE(2005,10,1)
    L3: "=<="&DATE(2005,10,30)

    and then use code of

    Range("A5:J600").AdvancedFilter _
    Action:=xlFilterCopy, _
    CriteriaRange:=Range("J1:J3"), _
    CopyToRange:=Range("M5:V5"), _
    Unique:=False


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Tiya" <[email protected]> wrote in message
    news:[email protected]...
    > Wish u all a happy x'mas
    > Hi
    > I am using Advance Filter for data like...
    > Date,PartyName,Item,Gross,Mel,Labr.
    >
    > Sub test()
    >
    > Sheets("DATA").Select
    >
    > Range("A5:J600").AdvancedFilter Action:=xlFilterCopy,

    CriteriaRange:=Range( _
    > "A1:J2"), CopyToRange:=Range("M5:v5"), Unique:=False
    >
    >
    > Range("M5:V5").Select
    > Range(Selection, Selection.End(xlDown)).Select
    > Range("M5:V30").Select
    > Selection.Copy
    > Sheets("Day Report").Select
    > ActiveSheet.Paste
    > Range("A2").Select
    > Sheets("data").Select
    > Range("A6").Select
    >
    > End Sub
    >
    > Where i want to find data list for Date wise like
    > Date start from 1 oct 05 to 30 oct 05 or so on.
    > but i am not able to do this. I have record this macro.
    >
    > Any Help.
    >
    > thanks
    >
    > Tiya




+ 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