Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Subtracting dates from formula
Morning,
I have got a date October-2006 now I need to subtract from a calculated cell of an identity number ie.770809345987. So taking the first two digits ie.77 add on 19 to the front and you now get 1977, which I want to subtract from October-2006 to get the age which in this case should be 29. How can this be done? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Subtracting dates from formula
Hi Sunnyskies
Assume A1 houses October-2006 and D1 houses 770809345987: =YEAR(A1)-VALUE(LEFT(D1,2)+1900) HTH Jon -- Two heads are better than one! Email: subst1tut3 numb3rs for l3tt3rs... "Sunnyskies" wrote: Morning, I have got a date October-2006 now I need to subtract from a calculated cell of an identity number ie.770809345987. So taking the first two digits ie.77 add on 19 to the front and you now get 1977, which I want to subtract from October-2006 to get the age which in this case should be 29. How can this be done? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Subtracting dates from formula
Say 770809345987 is in A1
October-2006 is inB1 then =DATEDIF(DATE("19"&LEFT(A1,2),1,1),B1,"y") Regards, Stefi €˛Sunnyskies€¯ ezt Ć*rta: Morning, I have got a date October-2006 now I need to subtract from a calculated cell of an identity number ie.770809345987. So taking the first two digits ie.77 add on 19 to the front and you now get 1977, which I want to subtract from October-2006 to get the age which in this case should be 29. How can this be done? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Subtracting dates from formula
If you've got your date in A1 and your identity number in A2, try
=YEAR(A1)-(1900+LEFT(A2,2)) -- David Biddulph "Sunnyskies" wrote in message ... Morning, I have got a date October-2006 now I need to subtract from a calculated cell of an identity number ie.770809345987. So taking the first two digits ie.77 add on 19 to the front and you now get 1977, which I want to subtract from October-2006 to get the age which in this case should be 29. How can this be done? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Subtracting dates from formula
Works, thanks.
"Jon von der Heyden" wrote: Hi Sunnyskies Assume A1 houses October-2006 and D1 houses 770809345987: =YEAR(A1)-VALUE(LEFT(D1,2)+1900) HTH Jon -- Two heads are better than one! Email: subst1tut3 numb3rs for l3tt3rs... "Sunnyskies" wrote: Morning, I have got a date October-2006 now I need to subtract from a calculated cell of an identity number ie.770809345987. So taking the first two digits ie.77 add on 19 to the front and you now get 1977, which I want to subtract from October-2006 to get the age which in this case should be 29. How can this be done? |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Subtracting dates from formula
Works, thanks.
"Stefi" wrote: Say 770809345987 is in A1 October-2006 is inB1 then =DATEDIF(DATE("19"&LEFT(A1,2),1,1),B1,"y") Regards, Stefi €˛Sunnyskies€¯ ezt Ć*rta: Morning, I have got a date October-2006 now I need to subtract from a calculated cell of an identity number ie.770809345987. So taking the first two digits ie.77 add on 19 to the front and you now get 1977, which I want to subtract from October-2006 to get the age which in this case should be 29. How can this be done? |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Subtracting dates from formula
Works, thanks. I think I will use this one as its shorter.
"David Biddulph" wrote: If you've got your date in A1 and your identity number in A2, try =YEAR(A1)-(1900+LEFT(A2,2)) -- David Biddulph "Sunnyskies" wrote in message ... Morning, I have got a date October-2006 now I need to subtract from a calculated cell of an identity number ie.770809345987. So taking the first two digits ie.77 add on 19 to the front and you now get 1977, which I want to subtract from October-2006 to get the age which in this case should be 29. How can this be done? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reusing formula | Excel Discussion (Misc queries) | |||
subtracting two dates issue | Excel Discussion (Misc queries) | |||
Deleting time part of a Date, subtracting dates | Excel Discussion (Misc queries) | |||
formula needed to track dates event happened | Excel Worksheet Functions | |||
Formula including dates | Excel Worksheet Functions |