![]() |
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" |
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" |
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" |
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 |
All times are GMT +1. The time now is 04:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com