Computing Staff
  • 0

Excel Format Text Such As Aa-Aaa-Aa

  • 0

I have a cell containing aaaaaaa that i want to format to aa-aaa-aa

Share

3 Answers

  1. re: Highlight the cell or group of cells, right click, go to FORMAT CELLS, in NUMBERS tab click TEXT tab.

    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.

    • 0
  2. As far as I know, you can not format TEXT with any type of wild card character, so to format your text string you will need a formula or macro.

    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/

    • 0
  3. 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.

    • 0