Custom Formatting "Sept '18" - is this possible

bearcub

Well-known Member
Joined
May 18, 2005
Messages
734
Office Version
  1. 365
  2. 2013
  3. 2010
  4. 2007
Platform
  1. Windows
Is this possible to insert an apostrophe between the month and year (replacing the date with an apostrophe) using the custom format dialog box

For Example:

Is it possible to format Sept 1, 2018 in a cell to display Sept '18.


When I've done this in the past I've had to manually type this into the cell. I was wondering if there was a way of doing this using custom formatting so the underlying value isn't replaced with text.

Michaeo
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
There is no cell format that would product a 4-character month name, only a 3-character one (the apostrophe would be easy). We can write a VBA event procedure that will do it, but first you need to show us all of the month abbreviations you want to use (I'm guessing you don't want things like Janu, Marc, Augu for example).
 
Upvote 0
Hi Rick,

My bad about the 4 month character, it is only 3 as you say.

(the apostrophe would be easy)

How would I include the apostrophe to create something like this "Sep ' 18".


I tried this a couple of different ways but I got an error message?

Would I use mmm ' yy?

What would the VB code look like, just curious?

thank you for your help,

Michael
 
Upvote 0
yeah, putting mmm 'yy in the custom format should work unless your cell doesnt contain a valid date and just has text of the date
 
Upvote 0
here's the macro recording of it so you know what the code looks like

Code:
Sub Macro3()
'
' Macro3 Macro
'

'
    Selection.NumberFormat = "mmm 'yy"
End Sub
 
Upvote 0
Thank you both for the update. I think when I applied the custom format I didn't have an actually date in the cell. I'll do it again to see if it works.

Michael
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,215
Members
452,618
Latest member
Tam84

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