ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date ranges and advanced filter (https://www.excelbanter.com/excel-programming/318135-date-ranges-advanced-filter.html)

rt

Date ranges and advanced filter
 
I want to create the vb code for an advanced filter type operation whereby I
filter between two dates. For example I want to filter for all birthdays
between 1/1/2004 and 5/1/2004.

I can't seem to get it to work. I understand the concept of the advanced
filter but no the logic for the whole date range thing

Thanks
j

Ron de Bruin

Date ranges and advanced filter
 
Hi rt

You can use Autofilter (custom) for this also
Record a macro when you do it.

Or use this Add-in
http://www.rondebruin.nl/easyfilter.htm
That have more options





--
Regards Ron de Bruin
http://www.rondebruin.nl


"rt" wrote in message ...
I want to create the vb code for an advanced filter type operation whereby I
filter between two dates. For example I want to filter for all birthdays
between 1/1/2004 and 5/1/2004.

I can't seem to get it to work. I understand the concept of the advanced
filter but no the logic for the whole date range thing

Thanks
j




SR

Date ranges and advanced filter
 
Thanks for the tip on the easyfilter. The only problem is I cannot be sure
that the other members of the management team will have the add-in installed
and configured properly.

I need to be able to select by way of filtering with the advanced filter for
all birthdays between 1/1/2004 and 5/1/2004.

rt

"Ron de Bruin" wrote:

Hi rt

You can use Autofilter (custom) for this also
Record a macro when you do it.

Or use this Add-in
http://www.rondebruin.nl/easyfilter.htm
That have more options





--
Regards Ron de Bruin
http://www.rondebruin.nl


"rt" wrote in message ...
I want to create the vb code for an advanced filter type operation whereby I
filter between two dates. For example I want to filter for all birthdays
between 1/1/2004 and 5/1/2004.

I can't seem to get it to work. I understand the concept of the advanced
filter but no the logic for the whole date range thing

Thanks
j





Ron de Bruin

Date ranges and advanced filter
 
Hi sr

You can use Autofilter (custom) for this also
Record a macro when you do it.



When you do this you will get something like this

Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="=1/1/2004", Operator:=xlAnd, _
Criteria2:="<=1/5/2004"



--
Regards Ron de Bruin
http://www.rondebruin.nl


"sr" wrote in message ...
Thanks for the tip on the easyfilter. The only problem is I cannot be sure
that the other members of the management team will have the add-in installed
and configured properly.

I need to be able to select by way of filtering with the advanced filter for
all birthdays between 1/1/2004 and 5/1/2004.

rt

"Ron de Bruin" wrote:

Hi rt

You can use Autofilter (custom) for this also
Record a macro when you do it.

Or use this Add-in
http://www.rondebruin.nl/easyfilter.htm
That have more options





--
Regards Ron de Bruin
http://www.rondebruin.nl


"rt" wrote in message ...
I want to create the vb code for an advanced filter type operation whereby I
filter between two dates. For example I want to filter for all birthdays
between 1/1/2004 and 5/1/2004.

I can't seem to get it to work. I understand the concept of the advanced
filter but no the logic for the whole date range thing

Thanks
j








All times are GMT +1. The time now is 10:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com