View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Filter date by month and year

Yes with advanced file you can use this for Feb 2007

=AND(YEAR(A2)= 2007,MONTH(A2)=2)

A1 is the header cell and a2 is the first date
See Debra's site for more info
http://www.contextures.com/xladvfilter02.html

Easyfilter is much easier


--

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


"Peter" wrote in message ups.com...
On 6 Feb, 10:02, "Ron de Bruin" wrote:
Hi Peter

You can insert a helper column with the worksheet function Year or Month
Or install EasyFilterhttp://www.rondebruin.nl/easyfilter.htm

Or use advancedfilter, you only have to have one cell with the formula and use that cell in your criteria.

--

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



"Peter" wrote in ooglegroups.com...
I have a column of dates that I am trying to filter on just the month
and year.


Date
22/05/1981
16/03/1981
26/01/2006
01/05/1986


Is it possible to filter on only the last 4 digits of a cell?


Thanks,


Peter- Hide quoted text -


- Show quoted text -


Thank you but I am actually trying to tell the macro to look at the
last 7 digits of a cell and filter it by that. Is this possible?