Excel 2010 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | ALCET1010036303-15 | ALCET1010036303-015 | ALCET1010036303-015 | |||
2 | ALCET1010036580-3 | ALCET1010036580-003 | ALCET1010036580-003 | |||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B1 | =LEFT(A1,SEARCH("-",A1))&TEXT(RIGHT(A1,LEN(A1)-SEARCH("-",A1)),"000") | |
D1 | =LEFT(A1,16)&TEXT(RIGHT(A1,LEN(A1)-16),"000") |
You can only format cells containing numbers in Excel (well, theoretically you can format text, but only by adding more text via the custom format)... the OP's cells contain a mix of text and numbers meaning Excel sees the cell as containing text. If the OP wants to physically change the cells themselves (rather than having the fixed text in another cell), then we would need to use VB code to do that.Rick, I was trying (without much luck) to see if there was a custom format to do this?
You can only format cells containing numbers in Excel (well, theoretically you can format text, but only by adding more text via the custom format)... the OP's cells contain a mix of text and numbers meaning Excel sees the cell as containing text. If the OP wants to physically change the cells themselves (rather than having the fixed text in another cell), then we would need to use VB code to do that.