ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can I change 080402 to 08/04/02? (https://www.excelbanter.com/excel-worksheet-functions/117461-how-can-i-change-080402-08-04-02-a.html)

Bobbie

How can I change 080402 to 08/04/02?
 


S S

How can I change 080402 to 08/04/02?
 
I think you need to format the cell from text to date


"Bobbie" wrote in message
...




Sandy Mann

How can I change 080402 to 08/04/02?
 
Without any explanation in the body of the post I will assume form the
leading zero that the cell is formatted as text. If that is so then try the
formula:

=DATE(1900+RIGHT(E9,2)+(--RIGHT(E9,2)<=30)*100,MID(E9,3,2),LEFT(E9,2))

This is for British style dates. For American dates try:

=DATE(1900+RIGHT(E9,2)+(--RIGHT(E9,2)<=30)*100,LEFT(E9,2),MID(E9,3,2))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Bobbie" wrote in message
...




JMB

How can I change 080402 to 08/04/02?
 
This seemed to work okay (U.S format). Change the cell format to date.
=--(LEFT(E9,2)&"/"&MID(E9,3,2)&"/"&RIGHT(E9,2))



"Sandy Mann" wrote:

Without any explanation in the body of the post I will assume form the
leading zero that the cell is formatted as text. If that is so then try the
formula:

=DATE(1900+RIGHT(E9,2)+(--RIGHT(E9,2)<=30)*100,MID(E9,3,2),LEFT(E9,2))

This is for British style dates. For American dates try:

=DATE(1900+RIGHT(E9,2)+(--RIGHT(E9,2)<=30)*100,LEFT(E9,2),MID(E9,3,2))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Bobbie" wrote in message
...





Gord Dibben

How can I change 080402 to 08/04/02?
 
DataText to ColumnsNextNextColumn Data FormatDateDMY and Finish.


Gord Dibben MS Excel MVP

On Fri, 3 Nov 2006 12:07:02 -0800, Bobbie
wrote:




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com