View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default If date in column A is less than 15th of month can I display next.

Another version based on Max's idea:

=IF(A1="","",DATE(YEAR(A1),MONTH(A1)+(DAY(A1)=15) ,1))

(day(a1)=15) will return True or false.
When added to a number (like month(a)), it's like adding 1 (true) or 0 (false).





Angela wrote:

If date in column A is less than 15th of month is there a formula I can use
to display the next mth in column B such that I can obtain the following

Column A Column B
05-Oct-07 Oct-07
05-Nov-07 Nov-07
15-Oct-07 Nov-07
19-Nov-07 Dec-07

Thanks
--
Angela


--

Dave Peterson