Adding a space to the beginning of every cell in excel [closed]

I have a column of data, and I would like to simply add a space to the beginning of each cell. How can I do this?

It should be like this:

Original:

1 2 3 4 

After:

 1 2 3 4 
1

3 Answers

Assuming the data is in column A. In an empty column enter this formula in the first row:

=" "&A1 
  • Copy down as far as the data in column A.
  • Copy the result of the formulas
  • Use paste special > Values to paste the data into column A
  • delete the helper formulas.
1
  1. Right click the cells in question and select Format Cells
  2. On the number tab select Custom under the category list
  3. Under type add as many spaces as you like before the selected formatting
  4. Click OK to close the dialog box
  5. Left justify cells to see the added spaces in the cell

This has the added functionality of keeping the cell formatted as number and mathematical formulas will still work.

1

Select the cells you wish to process and run this small macro:

Sub dural() For Each r In Selection With r .Value = "' " & .Text End With Next r End Sub 

You Might Also Like