Month question - Need leading zero

  • Thread starter Thread starter ngaisteve1
  • Start date Start date
N

ngaisteve1

Basically, I would like to create a function where example

if I type 02/04/2004, the column next to it will automaticall
increment of 2 months, become 02/06/2004.

So, my function is below:
=DAY(A1) & "/" & (MONTH(A1) + 2) & "/" & YEAR(A1)

But, this function got problem, which is the leading zero, meanin
02/04/2004 will become 2/6/2004

How do I fix this? Thanks
 
=date(year(a1),month(a1)+2,day(a1))

but use format|cells|number tab to give it the format you like.
mm/dd/yyyy
 
Try this instead

=DATE(YEAR(A1),MONTH(A1)+2,DAY(A1))

format dd/mm/yyyy

Your result is text the above returns a numeric value like the one in A1

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 
Back
Top