Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to subtract two date Problem
Hi
I have a sheet to calculate the number of months between to date. in A1 = 05/26/2007 B1 =06/26/2006 C1 = =DATEVALUE (B1-A1) After that C1 shows me €śvalue€ť which is an error Can any body help me solving this problem? Thanks!! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to subtract two date Problem
=(b1-a1)/365*12 and format C1 as number not a date
-- paul remove nospam for email addy! c1=b1-a1 "ghost" wrote: Hi I have a sheet to calculate the number of months between to date. in A1 = 05/26/2007 B1 =06/26/2006 C1 = =DATEVALUE (B1-A1) After that C1 shows me €śvalue€ť which is an error Can any body help me solving this problem? Thanks!! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to subtract two date Problem
DATEVALUE() converts a text representation of a date into a real date.
To get the number of days between the two dates simply subtract them: =B1-A1 To get the number of years use DATEDIF() as in: =DATEDIF(A1,B1,"y") or for the number of months left over use: =DATEDIF(A1,B1,"ym") and for thr odd days use: =DATEDIF(A1,B1,"md") to combine them all together: =DATEDIF(A1,B1,"y") & " Years "&DATEDIF(A1,B1,"ym")&" Months "&DATEDIF(A1,B1,"md")&" Days" -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "ghost" wrote in message ... Hi I have a sheet to calculate the number of months between to date. in A1 = 05/26/2007 B1 =06/26/2006 C1 = =DATEVALUE (B1-A1) After that C1 shows me "value" which is an error Can any body help me solving this problem? Thanks!! |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to subtract two date Problem
Try,
=MONTH(B1)-MONTH(A1) Format as general. Mike "ghost" wrote: Hi I have a sheet to calculate the number of months between to date. in A1 = 05/26/2007 B1 =06/26/2006 C1 = =DATEVALUE (B1-A1) After that C1 shows me €śvalue€ť which is an error Can any body help me solving this problem? Thanks!! |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to subtract two date Problem
http://www.cpearson.com/excel/datedif.htm
-- Kind regards, Niek Otten Microsoft MVP - Excel "ghost" wrote in message ... | Hi | I have a sheet to calculate the number of months between to date. | in A1 = 05/26/2007 | B1 =06/26/2006 | C1 = =DATEVALUE (B1-A1) | After that C1 shows me "value" which is an error | Can any body help me solving this problem? | Thanks!! | |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to subtract two date Problem
Because the dates are in different years your formula returns 1 for dates 13
months apart. -- Regards, Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "Mike H" wrote in message ... Try, =MONTH(B1)-MONTH(A1) Format as general. Mike "ghost" wrote: Hi I have a sheet to calculate the number of months between to date. in A1 = 05/26/2007 B1 =06/26/2006 C1 = =DATEVALUE (B1-A1) After that C1 shows me "value" which is an error Can any body help me solving this problem? Thanks!! |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to subtract two date Problem
thanks, it works
"paul" wrote: =(b1-a1)/365*12 and format C1 as number not a date -- paul remove nospam for email addy! c1=b1-a1 "ghost" wrote: Hi I have a sheet to calculate the number of months between to date. in A1 = 05/26/2007 B1 =06/26/2006 C1 = =DATEVALUE (B1-A1) After that C1 shows me €śvalue€ť which is an error Can any body help me solving this problem? Thanks!! |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to subtract two date Problem
thanks, it works
"paul" wrote: =(b1-a1)/365*12 and format C1 as number not a date -- paul remove nospam for email addy! c1=b1-a1 "ghost" wrote: Hi I have a sheet to calculate the number of months between to date. in A1 = 05/26/2007 B1 =06/26/2006 C1 = =DATEVALUE (B1-A1) After that C1 shows me €śvalue€ť which is an error Can any body help me solving this problem? Thanks!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
add/subtract dates problem in Excel..... | Excel Discussion (Misc queries) | |||
Formula to subtract a date from current date | Excel Worksheet Functions | |||
Text to date then subtract... | Excel Discussion (Misc queries) | |||
How do I subtract a date from a date for a sum of total years? | Excel Discussion (Misc queries) | |||
how can i subtract time from two different date? | Excel Worksheet Functions |