Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Days not years?
Thanks for the Reply Tom,
BUT i STILL get the code adding DAYS and NOT years??? Corey "Tom Ogilvy" wrote in message ... Try: Range("D2").Value = DateAdd("yyyy", Clng(TextBox11.Value), cdate(TextBox4.Value)) I guess Range("D2").Text was for illustration since that would raise an error. ? dateAdd("yyyy",3,Date) 03/23/2010 ? dateAdd("yyyy",3,"11/22/1998") 11/22/2001 -- Regards, Tom Ogilvy "Coza" wrote: Range("D2").Text = DateAdd("yyyy", TextBox11.Value, TextBox4.Value) Why does this not add years? Textbox11.value = "5" Ctm |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Adding Days not years?
CORRECTION.
My mistake. As i had an IF statement, i placed it in the option 2 and the option 1 was selected and thus didi not work. You code works greate TOM. Thank you. "Coza" wrote in message ... Thanks for the Reply Tom, BUT i STILL get the code adding DAYS and NOT years??? Corey "Tom Ogilvy" wrote in message ... Try: Range("D2").Value = DateAdd("yyyy", Clng(TextBox11.Value), cdate(TextBox4.Value)) I guess Range("D2").Text was for illustration since that would raise an error. ? dateAdd("yyyy",3,Date) 03/23/2010 ? dateAdd("yyyy",3,"11/22/1998") 11/22/2001 -- Regards, Tom Ogilvy "Coza" wrote: Range("D2").Text = DateAdd("yyyy", TextBox11.Value, TextBox4.Value) Why does this not add years? Textbox11.value = "5" Ctm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
converting days to years & months & days | Excel Discussion (Misc queries) | |||
how do i convert a number of days to years, months & days? | Excel Discussion (Misc queries) | |||
Convert years to years and days | Excel Discussion (Misc queries) | |||
convert Days to Years, Months, Days | Excel Discussion (Misc queries) | |||
Convert # of days to years/days | Excel Discussion (Misc queries) |