PC Review


Reply
Thread Tools Rate Thread

Filter between Dates

 
 
shriil
Guest
Posts: n/a
 
      20th Sep 2010

I have an excel sheet where I keep track of maintenance jobs done
throughout the year. The data looks like as mentioned below:

A1 B1 C1

Descr Job no Job Date

AAA 25/1 12/08/10

BBB 12/2 14/08/10

CCC 30/2 15/08/10

DDD 05/3 02/09/10

.... .... ........

I would like to run a macro where I will filter out the above range
between two dates, (i.e I input a Start Date and a End Date) and copy
the filtered list to a new sheet.

I normally use the Custom Filter Option for doing the same but it
would be very helpful if the same can be run with a code.

Thanks for the help



 
Reply With Quote
 
 
 
 
Don Guillett Excel MVP
Guest
Posts: n/a
 
      20th Sep 2010
On Sep 20, 2:27*am, shriil <(E-Mail Removed)> wrote:
> I have an excel sheet where I keep track of maintenance jobs done
> throughout the year. The data looks like as mentioned below:
>
> * * * * *A1 * * * * * * * * B1 * * * * * * * C1
>
> * * * *Descr * * * * * *Job no * * * *Job Date
>
> * * * * AAA * * * * * * * 25/1 * * * * * 12/08/10
>
> * * * * BBB * * * * * * * *12/2 * * * * * 14/08/10
>
> * * * * CCC * * * * * * * * 30/2 * * * * *15/08/10
>
> * * * * *DDD * * * * * * * 05/3 * * * * * *02/09/10
>
> * * * * *.... * * * * * * * * * * *.... * * * * ........
>
> I would like to run a macro where I will filter out the above range
> between two dates, (i.e I input a Start Date and a End Date) and copy
> the filtered list to a new sheet.
>
> I normally use the Custom Filter Option for doing the same but it
> would be very helpful if the same can be run with a code.
>
> Thanks for the help


You could have done wheat I just did. RECORD a macro while doing it.

Sub Macro3()
'
' Macro3 Macro
' Macro recorded 9/20/2010 by Donald B. Guillett
'

'
Selection.AutoFilter Field:=1, Criteria1:=">=8/15/2010",
Operator:=xlAnd _
, Criteria2:="<=8/23/2010"
End Sub
 
Reply With Quote
 
 
 
 
shriil
Guest
Posts: n/a
 
      20th Sep 2010
On Sep 20, 5:10*pm, Don Guillett Excel MVP <(E-Mail Removed)>
wrote:
> On Sep 20, 2:27*am, shriil <(E-Mail Removed)> wrote:
>
>
>
>
>
> > I have an excel sheet where I keep track of maintenance jobs done
> > throughout the year. The data looks like as mentioned below:

>
> > * * * * *A1 * * * * * * * * B1 * * * * * * * C1

>
> > * * * *Descr * * * * * *Job no * * * *Job Date

>
> > * * * * AAA * * * * * * * 25/1 * * * * * 12/08/10

>
> > * * * * BBB * * * * * * * *12/2 * * * ** 14/08/10

>
> > * * * * CCC * * * * * * * * 30/2 * * * * *15/08/10

>
> > * * * * *DDD * * * * * * * 05/3 * * * ** *02/09/10

>
> > * * * * *.... * * * * * * * * * * *....* * * * ........

>
> > I would like to run a macro where I will filter out the above range
> > between two dates, (i.e I input a Start Date and a End Date) and copy
> > the filtered list to a new sheet.

>
> > I normally use the Custom Filter Option for doing the same but it
> > would be very helpful if the same can be run with a code.

>
> > Thanks for the help

>
> You could have done wheat I just did. RECORD a macro while doing it.
>
> Sub Macro3()
> '
> ' Macro3 Macro
> ' Macro recorded 9/20/2010 by Donald B. Guillett
> '
>
> '
> * * Selection.AutoFilter Field:=1, Criteria1:=">=8/15/2010",
> Operator:=xlAnd _
> * * * * , Criteria2:="<=8/23/2010"
> End Sub- Hide quoted text -
>
> - Show quoted text -


yes.. but what about selecting the specified range , a user form for
entering start date and end date, and finally outputting the same to
another desired range
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to filter out all the partial dates from a big list of dates? =?Utf-8?B?VGl3YXJy?= Microsoft Excel Misc 1 14th Sep 2006 05:35 PM
Calculating number of days between two dates that fall between two other dates richard.goodger@gmail.com Microsoft Excel Misc 5 26th Oct 2005 06:18 PM
Dates dates dates dates... SQL and ASP.NET David Lozzi Microsoft ASP .NET 1 30th Sep 2005 03:18 PM
Dates, Dates, Dates bw Microsoft Access Reports 1 1st Feb 2004 06:08 AM
Dates Dates and more Dates Frick Microsoft Excel Worksheet Functions 1 29th Aug 2003 06:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:07 AM.