Search code examples
excelformattingcell

Excel. Special number separator format for 1 specific column, no for the entire document


In an Excel's document, I need when you enter a positive 6 digits number (XXXXXX) into a specific cell like for example, the number 223715, then Excel automatically format the number as 223'71'5 once you write the number into the cell and you press Enter or move to another cell, etc.

In addition to the previous explained, I need when you enter a 5 digits number, then Excel automatically adds an ending '0' to complete the number format to 6 digits, so if you insert the number 22589, then Excel automatically converts it to 225'89'0

The most important part is I need to give this "special" format ONLY in one single column or defined set of specific cells, because for example, I tried modifying an Excel's setting that allows to use the number separator you want but it takes effect in the entire document that is exactly what I don't need, because I need to mainly have the Excel documents in a standard way but with some columns/cells with this special format.

I tried with multiple custom Number Cell Format like "###'##'#0.00", "###'##'#000'00'0" and similar combinations trying to get positive results but no luck for now.


Solution

  • EDIT: Try this custom format: [<=99999]###'##'\0;###'##'#

    5 digits

    enter image description here

    6 digits

    enter image description here