I have a cell containing aaaaaaa that i want to format to aa-aaa-aa
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Highlight the cell or group of cells, right click, go to FORMAT CELLS, in NUMBERS tab click TEXT tab. Anyththing entered in cell/s, even nmbers, will be treated as text.
Here is a formula that should give you what you want, provided your character string is always 7 characters long:
With your string aaaaaaa in cell A1, in cell B1 enter the formula:
=LEFT(A1,2)&”-“∣(A1,3,3)&”-“&RIGHT;(A1,2)
MIKE
http://www.skeptic.com/
There is no TEXT tab in the Format Cells dialog box.
Even if there was, please explain how formatting the cells as text will accomplish the OP’s goal of adding dashes between the letters in the string.
Posting Tip: Before posting Data or VBA Code, read this How-To.