Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Macro filter based on date criteria

Hi, i need a macro that can filter range A8:G200 based on criteria in G column.
Criteria is date, and i need to filter based on today's date. If today is
19.09.2009, then the macro to filter range and to show only rows with
19.09.2009 in G column.
Cand this be done?
Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Macro filter based on date criteria

Yes it can but I don't think that you need a macro to do it.

I have just set up your example and got it to work no problem.

In Excel 2007 take the following actions:-

1. Click anywhere in your data then:-

Data / Filter

This will turn on drop down arrows (at top of data).

2. Click on the downwards facing arrow in column G and select Data Filters
then Today.

The above will give you what you want.

Please click on Yes if my comments have been helpful to you.

Thanks!



"puiuluipui" wrote:

Hi, i need a macro that can filter range A8:G200 based on criteria in G column.
Criteria is date, and i need to filter based on today's date. If today is
19.09.2009, then the macro to filter range and to show only rows with
19.09.2009 in G column.
Cand this be done?
Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Macro filter based on date criteria

Hi, the problem is that i have Excel 2003. If i can do in Excel 2003 like you
show me before with 2007, it will be great.
But this is what i need. I need to filter this range based on criteria in G
column. Criteria to be today, so to view only rows with today's date in G
column. After i filter range, i need to copy filtered rows to another
workbook. That's why i need an macro to filter. To adjust the macro to
copy/paste i will do it with record, but the filter range is a little bit
different.
Can this be done?
Thanks!

"trip_to_tokyo" wrote:

Yes it can but I don't think that you need a macro to do it.

I have just set up your example and got it to work no problem.

In Excel 2007 take the following actions:-

1. Click anywhere in your data then:-

Data / Filter

This will turn on drop down arrows (at top of data).

2. Click on the downwards facing arrow in column G and select Data Filters
then Today.

The above will give you what you want.

Please click on Yes if my comments have been helpful to you.

Thanks!



"puiuluipui" wrote:

Hi, i need a macro that can filter range A8:G200 based on criteria in G column.
Criteria is date, and i need to filter based on today's date. If today is
19.09.2009, then the macro to filter range and to show only rows with
19.09.2009 in G column.
Cand this be done?
Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default Macro filter based on date criteria

You can record the whole macro. Turn on the macro recorder before you start
filtering your data. Turn it off after you finish your copying.

You will likely have to adjust your macro slightly, and that's where this
board can help. But to create the whole procedure, you're better off
recording the macro yourself than asking someone else to create it for you.
In order for someone else to create the code for you, they would have to
know whether your cells have real dates in them, or are text. If text, then
what format. The macro recorder is a much faster solution.

Regards,
Fred.

"puiuluipui" wrote in message
...
Hi, the problem is that i have Excel 2003. If i can do in Excel 2003 like
you
show me before with 2007, it will be great.
But this is what i need. I need to filter this range based on criteria in
G
column. Criteria to be today, so to view only rows with today's date in G
column. After i filter range, i need to copy filtered rows to another
workbook. That's why i need an macro to filter. To adjust the macro to
copy/paste i will do it with record, but the filter range is a little bit
different.
Can this be done?
Thanks!

"trip_to_tokyo" wrote:

Yes it can but I don't think that you need a macro to do it.

I have just set up your example and got it to work no problem.

In Excel 2007 take the following actions:-

1. Click anywhere in your data then:-

Data / Filter

This will turn on drop down arrows (at top of data).

2. Click on the downwards facing arrow in column G and select Data
Filters
then Today.

The above will give you what you want.

Please click on Yes if my comments have been helpful to you.

Thanks!



"puiuluipui" wrote:

Hi, i need a macro that can filter range A8:G200 based on criteria in G
column.
Criteria is date, and i need to filter based on today's date. If today
is
19.09.2009, then the macro to filter range and to show only rows with
19.09.2009 in G column.
Cand this be done?
Thanks!


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Macro filter based on date criteria

This is a duplicate posting. I've been working the problem for a couple of
days. I think the issue is the dates may be a combination of US and English
dates. See posting
http://www.microsoft.com/office/comm...6-848f9223a2d1

"puiuluipui" wrote:

Hi, the problem is that i have Excel 2003. If i can do in Excel 2003 like you
show me before with 2007, it will be great.
But this is what i need. I need to filter this range based on criteria in G
column. Criteria to be today, so to view only rows with today's date in G
column. After i filter range, i need to copy filtered rows to another
workbook. That's why i need an macro to filter. To adjust the macro to
copy/paste i will do it with record, but the filter range is a little bit
different.
Can this be done?
Thanks!

"trip_to_tokyo" wrote:

Yes it can but I don't think that you need a macro to do it.

I have just set up your example and got it to work no problem.

In Excel 2007 take the following actions:-

1. Click anywhere in your data then:-

Data / Filter

This will turn on drop down arrows (at top of data).

2. Click on the downwards facing arrow in column G and select Data Filters
then Today.

The above will give you what you want.

Please click on Yes if my comments have been helpful to you.

Thanks!



"puiuluipui" wrote:

Hi, i need a macro that can filter range A8:G200 based on criteria in G column.
Criteria is date, and i need to filter based on today's date. If today is
19.09.2009, then the macro to filter range and to show only rows with
19.09.2009 in G column.
Cand this be done?
Thanks!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to filter list based on multiple criteria JSBPL New Users to Excel 1 July 21st 09 10:16 AM
Copying data based on filter criteria no_rhythm Excel Worksheet Functions 1 January 10th 08 09:45 PM
Run Filter criteria based on data in range Mitch4 Excel Discussion (Misc queries) 0 October 17th 07 04:15 PM
data filter criteria based on cell references? scshop Excel Worksheet Functions 1 June 22nd 07 03:16 AM
filter or format based on criteria in more than one column tabbicat Excel Worksheet Functions 4 March 13th 07 02:24 PM


All times are GMT +1. The time now is 05:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"