Thread: edate 1 March!!
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld[_2_] Ron Rosenfeld[_2_] is offline
external usenet poster
 
Posts: 1,045
Default edate 1 March!!

On Wed, 1 Aug 2012 02:23:48 +0000, Yangas wrote:


ok
I'm trying to get column a to display todays day, but the month to
increase by one all the way down. I need a formula to do this (in
xl2003) recognising days with 31 days and February.

=IF((MONTH(A226)+1)=2,DATE(YEAR(A226),MONTH(A226) +1,DAY(IF(DAY(TODAY())28,28,TODAY()))),DATE(YEAR( A226),MONTH(A226)+1,DAY(TODAY())))
doesn't seem to work on the 31st of each month i get #N/A
nor
=IF(EOMONTH(A228,0),EOMONTH(A228,1),EDATE(A228,1) ) this seems to return
-1day

thanks in advance



The key is to make everything relative to the first row in which you have your initial date; and not to the previous row.
For example:

=edate($A$1,ROWS($1:1))

or, if you do not want to have the ATP installed in your Excel 2003:

=MIN(DATE(YEAR($A$1),MONTH($A$1)+ROWS($1:1)+{1,0}, DAY($A$1)*{0,1}))