Forum Discussion
Andrew Meldrum
Aug 16, 2018Copper Contributor
Formatting in Excel
I am trying to format a cell so the output looks like C23-569-789 when the following is entered into the cell c23569789. I can't seem to get it to work because of the leading Alpha. Help.
SergeiBaklan
Aug 16, 2018Diamond Contributor
Yes, you can't format the text such way
- Andrew MeldrumAug 16, 2018Copper Contributor
I am really surprised it is a NO.
- SergeiBaklanAug 16, 2018Diamond Contributor
You may use VBA to transform the text and return result into the same cell
- Andrew MeldrumAug 16, 2018Copper Contributor
do you have a suggestion on VBA?
- Andrew MeldrumAug 16, 2018Copper Contributor
I got close with =UPPER(LEFT(E1,3)&"-"&MID(E1,4,3)&"-"&RIGHT(E1,3)) but it is a function and requires two columns ... I only want one.