Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
LT LT is offline
external usenet poster
 
Posts: 25
Default VBA & Advanced Autofilter

Hello everyone.

I need some help in figuring out how to get Excel VBA to filter a
record for a specific month.

I'm trying to code a macro that will generate a list of all employees
born in a certain month and Excel keeps adding 2007 to my filter.
I've tried with just dd/mm, using the Month(1) function and a bunch of
other little things.

Any ideas what I'm doing (or not doing) wrong?

Thanks in advance!

(My example code)

Worksheets("CustomReports").Range("B1").Value = "Date of Birth"
Worksheets("CustomReports").Range("B2").Value = "January"

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default VBA & Advanced Autofilter

Hi LT

Example

A6 = header
A7:A100 dates

leave A1 empty
in A2 enter this formula =MONTH(A6)=1

Use as criteria A1:A2

You can rerord a macro when you do this

I also have a add-in that you can use if you want
http://www.rondebruin.nl/easyfilter.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"LT" wrote in message oups.com...
Hello everyone.

I need some help in figuring out how to get Excel VBA to filter a
record for a specific month.

I'm trying to code a macro that will generate a list of all employees
born in a certain month and Excel keeps adding 2007 to my filter.
I've tried with just dd/mm, using the Month(1) function and a bunch of
other little things.

Any ideas what I'm doing (or not doing) wrong?

Thanks in advance!

(My example code)

Worksheets("CustomReports").Range("B1").Value = "Date of Birth"
Worksheets("CustomReports").Range("B2").Value = "January"

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default VBA & Advanced Autofilter

I see I have a typo

in A2 enter this formula =MONTH(A6)=1


Must be

=MONTH(A7)=1

The first cell with a date (A6 = the header)


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ron de Bruin" wrote in message ...
Hi LT

Example

A6 = header
A7:A100 dates

leave A1 empty
in A2 enter this formula =MONTH(A6)=1

Use as criteria A1:A2

You can rerord a macro when you do this

I also have a add-in that you can use if you want
http://www.rondebruin.nl/easyfilter.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"LT" wrote in message oups.com...
Hello everyone.

I need some help in figuring out how to get Excel VBA to filter a
record for a specific month.

I'm trying to code a macro that will generate a list of all employees
born in a certain month and Excel keeps adding 2007 to my filter.
I've tried with just dd/mm, using the Month(1) function and a bunch of
other little things.

Any ideas what I'm doing (or not doing) wrong?

Thanks in advance!

(My example code)

Worksheets("CustomReports").Range("B1").Value = "Date of Birth"
Worksheets("CustomReports").Range("B2").Value = "January"

  #4   Report Post  
Posted to microsoft.public.excel.programming
LT LT is offline
external usenet poster
 
Posts: 25
Default VBA & Advanced Autofilter

On May 22, 5:15 pm, "Ron de Bruin" wrote:
I see I have a typo

in A2 enter this formula =MONTH(A6)=1


Must be

=MONTH(A7)=1

The first cell with a date (A6 = the header)

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

"Ron de Bruin" wrote in l...



Hi LT


Example


A6 = header
A7:A100 dates


leave A1 empty
in A2 enter this formula =MONTH(A6)=1


Use as criteria A1:A2


You can rerord a macro when you do this


I also have a add-in that you can use if you want
http://www.rondebruin.nl/easyfilter.htm


--


Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"LT" wrote in ooglegroups.com...
Hello everyone.


I need some help in figuring out how to get Excel VBA to filter a
record for a specific month.


I'm trying to code a macro that will generate a list of all employees
born in a certain month and Excel keeps adding 2007 to my filter.
I've tried with just dd/mm, using the Month(1) function and a bunch of
other little things.


Any ideas what I'm doing (or not doing) wrong?


Thanks in advance!


(My example code)


Worksheets("CustomReports").Range("B1").Value = "Date of Birth"
Worksheets("CustomReports").Range("B2").Value = "January"- Hide quoted text -


- Show quoted text -


Ron, thank you very much for your help and input. Also I will be
trying your app. Cool stuff! Thanks!
-LT

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
excel 2007 autofilter change to 2003 autofilter functionality? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 10:05 PM
2007 excel autofilter change back to 2003 autofilter? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 05:53 PM
Advanced autofilter not working in macro Nirmal Excel Discussion (Misc queries) 3 January 6th 07 12:30 AM
Advanced Conditional Formatting Ideas Needed! (ok, maybe not that advanced...) shadestreet Excel Discussion (Misc queries) 2 July 21st 06 03:04 PM
deleting duplicated cells in a list via advanced autofilter? petevang Excel Discussion (Misc queries) 1 December 7th 05 03:54 PM


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

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

About Us

"It's about Microsoft Excel"