View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel.programming
Fred Smith[_4_] Fred Smith[_4_] is offline
external usenet poster
 
Posts: 2,389
Default Update a date into the same cell?

If you always want 364 days after your control date, use:
=if(today()a2,a2+364)

Will general June 30 in non-leap years, and June 29 in leap years.
Is this what you want?

Regards,
Fred.

"Greg L" wrote in message
...
That was a good start, but I wanted something that I didn't have to
change every year and would work with leap years, etc.

Any other ideas?

TIA

On Sun, 28 Jun 2009 15:13:01 -0700, Sean Timmons
wrote:

If you have a control cell that shows "7/1/2009", then you can do

=IF(today()A2,date(year(A2)+1,month(A2),day(A2) )-1)

Otherwise, if you want to update the cell based on the actual cell, you're
looking at Macro, which would be better asked within the Programming
section
of this group.

"Greg L" wrote:

Is there a way to update a date cell with a new date after the date in
the cell has passed?

ie. I have 7/1/2009 in a cell. After 7/1/2009 has passed, I want it to
display the date that is 364 days past 7/1/2009. This would be
6/30/2010.

I've been trying to figure this out for a while now. Seems simple, but
I must be missing something.

TIA
Greg L