Date Format Problem

A

Alain

I have a worksheet with a column formatted as 022008 which is suppose to mean
Feb 2008 or 02/2008. I can't seem to figure out how to change the cell format
to reflect this. I want it to display 02/2008.
 
G

Gary''s Student

In another cell enter:

=LEFT(A1,2) & "/" & RIGHT(A1,4)

or

=DATE(RIGHT(A1,4),LEFT(A1,2),1) and format as mm/yyyy
 
D

David Biddulph

That's OK if the 022008 is text, but if it is the number 22008 formatted as
000000, you'd need to change to

=LEFT(TEXT(A1,"000000"),2) & "/" & RIGHT(A1,4)
or
=DATE(RIGHT(A1,4),LEFT(TEXT(A1,"000000"),2),1)

You might instead try
=TEXT(A1,"00\/0000")
or (if your Windows Regional Options are appropriately set)
=--TEXT(A1,"00\/0000") formatted as mm/yyyy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top