Want date in format mmm-yy

vbanovice123

Board Regular
Joined
Apr 15, 2011
Messages
91
Hi

I have the value as 201004 and format is General.

If I need to change the cell value to Apr-10 what should I do?

Is there a formula I can use?

Thanks

Regards,
vbanovice123
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Try this:

=--TEXT(A1, "0000\/00""/01""")
 
Upvote 0
Try this:

=--TEXT(A1, "0000\/00""/01""")
A touch shorter...

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

Also, I like using dashes rather than slashes when the order is yyyy mm dd... I am thinking this might be a preferred internation symbol for that date ordering (in any case, it helps makes things more compact).
 
Upvote 0
Thanks. But I want the format as Apr-10 (mmm-yy)
Once you employ either "shg" or my formulas, you will have a real Excel date (in serial number form) which you can then use Format Cells to format the cell as a Date (or Custom) in order to display the value anyway you want (formulas cannot format cells, so you have to do that step manually).
 
Last edited:
Upvote 0
This is a bit longer, but I think it gives you what you are looking for:

Code:
=TEXT(DATE(LEFT(A1,4),RIGHT(A1,2),1),"mmm-yy")

Mike
 
Upvote 0
This is a bit longer, but I think it gives you what you are looking for:

Code:
=TEXT(DATE(LEFT(A1,4),RIGHT(A1,2),1),"mmm-yy")
That, of course, is returning a text value and not a date, which may be sufficient for the OP's needs. If so, here is a shorter formula (7 characters and 2 function calls less) than the one you posted...

=TEXT(TEXT(A1, "0000-00-\01"),"mmm-yy")
 
Upvote 0
A touch shorter...

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

Also, I like using dashes rather than slashes when the order is yyyy mm dd... I am thinking this might be a preferred internation symbol for that date ordering (in any case, it helps makes things more compact).
Nice one, Rick!
 
Upvote 0
A touch shorter...

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

Also, I like using dashes rather than slashes when the order is yyyy mm dd... I am thinking this might be a preferred internation symbol for that date ordering (in any case, it helps makes things more compact).
How about going just a little bit shorter (without getting too arcane):
Code:
=--TEXT(A1,"0000-00-1")
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,289
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top