Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 107
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 618
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 107
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 107
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 107
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reusing formula Tony29 Excel Discussion (Misc queries) 7 September 7th 06 03:34 AM
subtracting two dates issue Outbacker Excel Discussion (Misc queries) 2 August 29th 06 05:46 PM
Deleting time part of a Date, subtracting dates Shirley Munro Excel Discussion (Misc queries) 3 June 21st 06 11:58 AM
formula needed to track dates event happened ilmeaz Excel Worksheet Functions 1 November 15th 05 02:52 AM
Formula including dates R L Sandel Excel Worksheet Functions 2 May 25th 05 12:30 PM


All times are GMT +1. The time now is 08:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"