View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Year & Month format

What is the format of cells in column A? Text or Date like "yyyy-mm"?
Stefi


€˛Christopher Naveen€¯ ezt Ć*rta:

Hi,

I have col which contains year & month. Now i want to pull the values which
is less than or equal to current month.

A
2006-08
2008-04
2007-11
2008-01
2007-11

I tried with this formula but it is not working. Can any one help me?

=IF(year(a2)&"-"&MONTH(A2)<=year(TODAY()&"-"&month(today()),MONTH(TODAY())&"-"&YEAR(TODAY()),"")


- Christ