Excel : how to put a literal dot into a cell format

microsoft excelmicrosoft-excel-2010

Whenever I put a dot character into a custom cell format Excel will interpret it as if I want a decimal separator in that location of the format. The problem being that decimal separator changes with the locale. I actually just want a dot.

Here's an example format that won't work:

hh:mm:ss.000

(it won't work because if the locale uses anything else than a dot as a decimal separator then you'll see something like 22:31:34,854 in your formatted value)

I've tried something like

hh:mm:ss\.000

to make Excel understand that I really want a dot. However Excel 2010 refuses to accept that as a valid format. (I've read somewhere that the \ is the way to escape a character in an Excel format string)

Best Answer

I'm afraid you have to use the "Text" cell format and use a formula that will output a text value with the required separators

=LEFT(A1;2) & ":" & MID(A1;4;2) & ":" & MID(A1;7;2) & "." & RIGHT(A1;3)

Excel doesn't handle milliseconds in named formats...