Subtracting dates from formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
Hi Sunnyskies

Assume A1 houses October-2006 and D1 houses 770809345987:
=YEAR(A1)-VALUE(LEFT(D1,2)+1900)

HTH
Jon
 
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:
 
If you've got your date in A1 and your identity number in A2, try
=YEAR(A1)-(1900+LEFT(A2,2))
 
Works, thanks.

Stefi said:
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:
 
Back
Top