Custom format for cell not working properly

Copper Contributor

I have set cell C3 to custom format mm.yy;;; but when i enter the date '02.24' it changes the cell to '01.00'. It is working for other cells on this sheet.

 

From what I have read, this may be excel thinking mm is minute however this should only happen if a h is present before the m. In my case there is no h and yet it will not format my cell to be the custom date format that I need (mm/yy). 

 

My language is appropriately set to English - UK. 

2 Replies

Hi @emmadgncs,

the problem is that the custom format mm.yy;;; is not unambiguous. It could be interpreted as either a date format or a number format, depending on the context. In your case, Excel is interpreting it as a number format.

To fix this, you need to add a [Date] prefix to the custom format. This tells Excel that the format should be interpreted as a date format. The updated custom format would be [Date]mm.yy;;;.

To apply the updated custom format, follow these steps:

  1. Select cell C3.
  2. On the Home tab, in the Number group, click the Format dropdown menu.
  3. Select Custom.
  4. In the Type box, enter the following custom format:

 

[Date]mm.yy;;;​

 

  1. Click OK.

Now, when you enter the date 02.24 into cell C3, it will be formatted correctly as 02.24.

Here are some links you can use:


Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.


If the post was useful in other ways, please consider giving it Like.


Kindest regards,


Leon Pavesic
(LinkedIn)

Thank you, but it didn't solve the issue.

When I added [Date], excel would not allow me to hit ok and the pop up reads 'Microsoft Excel cannot use the number format you typed. Try using one of the built-in number formats.'