#1   Report Post  
Posted to microsoft.public.excel.misc
jason2444
 
Posts: n/a
Default Formating years.

have a csv file that in one column has years 89-99, 99-04 can I format that
column so that it changes those years to 1989-1999, 1999-2004
  #2   Report Post  
Posted to microsoft.public.excel.misc
DBsWifeLB
 
Posts: n/a
Default Formating years.


I believe that when you format the cells to the date format you just
need to enter yyyy. For a column that is all in 1900's you would enter
19yy as a custom date entry.
Hope this info helps.


--
DBsWifeLB
------------------------------------------------------------------------
DBsWifeLB's Profile: http://www.excelforum.com/member.php...o&userid=10802
View this thread: http://www.excelforum.com/showthread...hreadid=522288

  #3   Report Post  
Posted to microsoft.public.excel.misc
Miguel Zapico
 
Posts: n/a
Default Formating years.

You can add a new column is Excel with a formula like this:
=IF(LEFT(A1,1)="0","20",19) & LEFT(A1,2) & "-" & IF(MID(A1,4,1)="0","20",19)
& RIGHT(A1,2)
That hardcode the format in your values.
---

"jason2444" wrote:

have a csv file that in one column has years 89-99, 99-04 can I format that
column so that it changes those years to 1989-1999, 1999-2004

  #4   Report Post  
Posted to microsoft.public.excel.misc
jason2444
 
Posts: n/a
Default Formating years.

Changed the formula slightly to fit my file.
=IF(LEFT(E2,1)="0","20",19) & LEFT(E2,2) & "-" & IF(MID(E2,4,1)="0","20",19)

on a cell containing 99 - 06 it is coming up with 1999 - 20 how do I get it
to add the 06

"Miguel Zapico" wrote:

You can add a new column is Excel with a formula like this:
=IF(LEFT(A1,1)="0","20",19) & LEFT(A1,2) & "-" & IF(MID(A1,4,1)="0","20",19)
& RIGHT(A1,2)
That hardcode the format in your values.
---

"jason2444" wrote:

have a csv file that in one column has years 89-99, 99-04 can I format that
column so that it changes those years to 1989-1999, 1999-2004

  #5   Report Post  
Posted to microsoft.public.excel.misc
Miguel Zapico
 
Posts: n/a
Default Formating years.

Add "& RIGHT(E2,2)" to the end, it was trimmed by the mail.

"jason2444" wrote:

Changed the formula slightly to fit my file.
=IF(LEFT(E2,1)="0","20",19) & LEFT(E2,2) & "-" & IF(MID(E2,4,1)="0","20",19)

on a cell containing 99 - 06 it is coming up with 1999 - 20 how do I get it
to add the 06

"Miguel Zapico" wrote:

You can add a new column is Excel with a formula like this:
=IF(LEFT(A1,1)="0","20",19) & LEFT(A1,2) & "-" & IF(MID(A1,4,1)="0","20",19)
& RIGHT(A1,2)
That hardcode the format in your values.
---

"jason2444" wrote:

have a csv file that in one column has years 89-99, 99-04 can I format that
column so that it changes those years to 1989-1999, 1999-2004



  #6   Report Post  
Posted to microsoft.public.excel.misc
jason2444
 
Posts: n/a
Default Formating years.

one last question in some of the cells it 04+ or 03+ the + meaning to current
year. is there a what to make it display 2004 - 2006
2003 - 2006

"Miguel Zapico" wrote:

Add "& RIGHT(E2,2)" to the end, it was trimmed by the mail.

"jason2444" wrote:

Changed the formula slightly to fit my file.
=IF(LEFT(E2,1)="0","20",19) & LEFT(E2,2) & "-" & IF(MID(E2,4,1)="0","20",19)

on a cell containing 99 - 06 it is coming up with 1999 - 20 how do I get it
to add the 06

"Miguel Zapico" wrote:

You can add a new column is Excel with a formula like this:
=IF(LEFT(A1,1)="0","20",19) & LEFT(A1,2) & "-" & IF(MID(A1,4,1)="0","20",19)
& RIGHT(A1,2)
That hardcode the format in your values.
---

"jason2444" wrote:

have a csv file that in one column has years 89-99, 99-04 can I format that
column so that it changes those years to 1989-1999, 1999-2004

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
Convert years to years and days Kimmie B Excel Discussion (Misc queries) 3 February 7th 06 08:06 PM
Years of Service Question? Kane New Users to Excel 2 February 3rd 06 03:05 PM
Data Range Mess Karen Charts and Charting in Excel 18 January 14th 06 02:34 PM
To create formula to add 3 years and subtract 1 day from a date? rostroncarlyle Excel Worksheet Functions 2 December 8th 05 11:21 PM
I need the difference between two dates expressed as 4 years 3 mo. Dean Excel Discussion (Misc queries) 2 December 1st 05 05:11 AM


All times are GMT +1. The time now is 03:58 AM.

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

About Us

"It's about Microsoft Excel"