View Single Post
  #3   Report Post  
ElizabethWells ElizabethWells is offline
Junior Member
 
Posts: 5
Default

Quote:
Originally Posted by GS[_2_] View Post
Hi, I was looking for a cell formula to return the next July 1 or
January 1 (whichever falls first) after a given date.

Examples:

3/8/2013 would return 7/1/2013

or

8/21/2014 would return 1/1/2015

Any ideas?

Thanks!


Assuming the date is in colA, and the cell containing this formula is
'Date' format...

=IF(MONTH(A1)<7,DATE(YEAR(A1),7,1),DATE(YEAR(A1)+1 ,1,1))

Perhaps, though, our local formula wizard Claus will have something
better...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
Thanks very much Garry.