A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date format



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2010, 02:17 PM posted to microsoft.public.excel.misc
Katerinia
external usenet poster
 
Posts: 21
Default Date format

Text in Column E is a date mddyyyy
I need to calculate the age but the text format of this date is throwing off
the number. Any suggestions

8241938
4121939
8071965
2251950
2101940
12201964
1241980
5311961
3281982
3021967
9171961
10211977

--
Excel isnt just a program its a metaphor for life. Sometimes it is easy and
boring.. sometimes it is a little challenging and great.. then there are days
it will drive you absolutely INSANE.
  #2  
Old April 20th, 2010, 02:26 PM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Date format

To calculate the age with data as such ...try

=DATEDIF(DATE(RIGHT(TEXT(A1,"00000000"),4),
LEFT(TEXT(A1,"00000000"),2),MID(TEXT(A1,"00000000" ),3,2)),
TODAY(),"y") & " years"

--
Jacob (MVP - Excel)


"Katerinia" wrote:

Text in Column E is a date mddyyyy
I need to calculate the age but the text format of this date is throwing off
the number. Any suggestions

8241938
4121939
8071965
2251950
2101940
12201964
1241980
5311961
3281982
3021967
9171961
10211977

--
Excel isnt just a program its a metaphor for life. Sometimes it is easy and
boring.. sometimes it is a little challenging and great.. then there are days
it will drive you absolutely INSANE.

  #3  
Old April 20th, 2010, 02:34 PM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Date format

Forgot to mention...If you want to convert that to a valid date apply the
below formula to a column near by and format to date....

=--TEXT(A1,"00\/00\/0000")

--
Jacob (MVP - Excel)


"Katerinia" wrote:

Text in Column E is a date mddyyyy
I need to calculate the age but the text format of this date is throwing off
the number. Any suggestions

8241938
4121939
8071965
2251950
2101940
12201964
1241980
5311961
3281982
3021967
9171961
10211977

--
Excel isnt just a program its a metaphor for life. Sometimes it is easy and
boring.. sometimes it is a little challenging and great.. then there are days
it will drive you absolutely INSANE.

  #4  
Old April 20th, 2010, 02:40 PM posted to microsoft.public.excel.misc
MS-Exl-Learner
external usenet poster
 
Posts: 135
Default Date format

Assume that you are having the one of the data in A1 cell.

If your system date format is MM/DD/YYYY then copy and paste the below
formula in B1 cell

=IF(A1="","",IF(LEN(TRIM(A1))=7,VALUE(LEFT(TRIM(A1 ),1)&"/"&MID(TRIM(A1),2,2)&"/"&RIGHT(TRIM(A1),4)),IF(LEN(TRIM(A1))=8,VALUE(LEFT (TRIM(A1),2)&"/"&MID(TRIM(A1),3,2)&"/"&RIGHT(TRIM(A1),4)))))

If your system date format is DD/MM/YYYY then copy and paste the below
formula in B1 cell

=IF(A1="","",IF(LEN(TRIM(A1))=7,VALUE(MID(TRIM(A1) ,2,2)&"/"&LEFT(TRIM(A1),1)&"/"&RIGHT(TRIM(A1),4)),IF(LEN(TRIM(A1))=8,VALUE(MID( TRIM(A1),3,2)&"/"&LEFT(TRIM(A1),2)&"/"&RIGHT(TRIM(A1),4)))))

--
Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Katerinia" wrote:

Text in Column E is a date mddyyyy
I need to calculate the age but the text format of this date is throwing off
the number. Any suggestions

8241938
4121939
8071965
2251950
2101940
12201964
1241980
5311961
3281982
3021967
9171961
10211977

--
Excel isnt just a program its a metaphor for life. Sometimes it is easy and
boring.. sometimes it is a little challenging and great.. then there are days
it will drive you absolutely INSANE.

  #5  
Old April 20th, 2010, 02:51 PM posted to microsoft.public.excel.misc
Katerinia
external usenet poster
 
Posts: 21
Default Date format

Thanks so so so so much Jacob! Both worked wonderfully!
--
Excel isnt just a program its a metaphor for life. Sometimes it is easy and
boring.. sometimes it is a little challenging and great.. then there are days
it will drive you absolutely INSANE.


"Jacob Skaria" wrote:

To calculate the age with data as such ...try

=DATEDIF(DATE(RIGHT(TEXT(A1,"00000000"),4),
LEFT(TEXT(A1,"00000000"),2),MID(TEXT(A1,"00000000" ),3,2)),
TODAY(),"y") & " years"

--
Jacob (MVP - Excel)


"Katerinia" wrote:

Text in Column E is a date mddyyyy
I need to calculate the age but the text format of this date is throwing off
the number. Any suggestions

8241938
4121939
8071965
2251950
2101940
12201964
1241980
5311961
3281982
3021967
9171961
10211977

--
Excel isnt just a program its a metaphor for life. Sometimes it is easy and
boring.. sometimes it is a little challenging and great.. then there are days
it will drive you absolutely INSANE.

  #6  
Old April 21st, 2010, 12:44 AM posted to microsoft.public.excel.misc
David Biddulph
external usenet poster
 
Posts: 8,714
Default Date format

.... but only if your Windows Regional Options (in Control Panel, not in
Excel) are set to mddyyyy, rather than dmmyyyy.
--
David Biddulph


"Jacob Skaria" wrote in message
...
Forgot to mention...If you want to convert that to a valid date apply the
below formula to a column near by and format to date....

=--TEXT(A1,"00\/00\/0000")

--
Jacob (MVP - Excel)


"Katerinia" wrote:

Text in Column E is a date mddyyyy
I need to calculate the age but the text format of this date is throwing
off
the number. Any suggestions

8241938
4121939
8071965
2251950
2101940
12201964
1241980
5311961
3281982
3021967
9171961
10211977

--
Excel isnt just a program its a metaphor for life. Sometimes it is easy
and
boring.. sometimes it is a little challenging and great.. then there are
days
it will drive you absolutely INSANE.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:37 PM.


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