View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] shahzad4u_ksa@yahoo.com is offline
external usenet poster
 
Posts: 68
Default Date Range (Starting & Ending Date) - syed shahzad

Hi,

I have a worksheet name is Data, having inventory information. and One
column is for the DatePurchased, where daily purchased material is
entered, since three months.

like this:

DatePurchased:
1 jan 07
2 jan 07
3 jan 07
14 jan 07
19 jan 07
25 jan 07
1 feb 07
5 feb 07
10 feb 07
25 feb 07
28 feb 07
3 march 07
5 march 07
till end of March 07 ............

Now I want to filter the data by using [StartDate] and [EndDate] so I
can get the specific records. What should I do. I used Advance Filter,
with this code, but I could not retrive the required data:

Sub Purchase_Query()

Sheets("Data").Select

Range("A5:P500").AdvancedFilter Action:=xlFilterCopy,
CriteriaRange:=Range( _
"AT2:BI3"), CopyToRange:=Range("AT5:BI500"), Unique:=False
' Range("A1").Select

End Sub


I used operators and < and <= and <= with the date , but I could
not get the specified records according to my requirement.

is there any way to feed StartingDate and EndingDate method, so I can
solve my problem.

I used this thing in Access Query, it was fine, but in Excel how to
do, please help me.

Thanks for your support in Advance.

Syed shahzad zafar
Madinah - KSA