How to format cells to include dashes within the number input?

New Contributor

I've been asked to update the formatting of cells containing a 10-character value from XXXXXXXXXX to XX-XX-XXXX-XX. I'm hoping to format the cell so that it does it automatically. I bet I can custom format the cells to do this, but I'm not sure how to format it so that it inserts dashes within the value.

2 Replies
For clarity as well: The values are alphanumeric


Excel does not support custom formats for text values.

You can either use a formula in another cell, or use a macro to convert the value in the cell itself.