Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 871
  • Last Modified:

Changing Date format in Excel

I have some files sent to me that have the dates as YYMMDD and I would like a Macro that will change the date to MM/DD/YYYY can any one help me?
0
akeyes
Asked:
akeyes
  • 2
  • 2
1 Solution
 
iaminitCommented:
You probably don't need a macro.  It may be that the dates are simply formatted as YYMMDD.  In this case, select the dates and then change the format:

format|cells|custom|mm/dd/yyyy

Or, if the dates are currently entered as text or numbers, use a formula to convert.  For example, if the date is in cell A1, use the formula
=DATE(LEFT(A1,2),MID(A1,3,2),RIGHT(A1,2))
Copy and paste special|values to convert from a formula to a value.  Then format as in the first case.


0
 
akeyesAuthor Commented:
I tried this format|cells|custom|mm/dd/yyyy
my 740108 and changed it to 5/6/3926.  So this did not work for me.    

0
 
akeyesAuthor Commented:
After playing around a little I was able to get this to work, Thanks.
0
 
criCommented:
akeyes, iaminit second procedure most probably will fix it.
0
 
criCommented:
I said so.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now