View Single Post
  #36   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Days to next anniversary

-AND(MONTH(A2)=2,DAY(A2)=29,ISERR(--TEXT("2/29/"&YEAR(NOW()),"m/d/yy")))

That non-leap year test of yours...

ISERR(--TEXT("2/29/"&YEAR(NOW()),"m/d/yy")))

Why so many characters?

ISERR(VALUE("2/29/"&YEAR(now())))

Savings? Eleven characters (sorry, couldn't resist). <g


More straight forward than the above...

(MONTH(DATE(YEAR(NOW()),2,29))=3)

Same number of characters though :-(

Rick