View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Using the If function for a date range

Hi Jon,

Am Wed, 30 Jan 2013 12:04:20 +0000 schrieb Jon Keym:

I'm trying to set up a formular that says if A1 (which is a date) is
between 01/01/2012-31/12/12 then B1 will say "2012".
If A1 is between 01/01/2013-31/12/2013 then B1 will say "2013" and so
on.


in B1 try:
=YEAR(A1)


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2