Excel formatting not working for some cells when trying to do center alignment

microsoft excelmicrosoft-excel-2010

I have an excel file that has been exported from a SQL Server Reporting Services report. The cells in the first column are a list of store numbers and should all be center aligned but for some reason a few of them are left aligned. When I go to correct the alignment by setting it to center nothing happens. When I go and change the column type from General to Number to Text still nothing happens. However, when the column is set to Text and then I go edit (F2 then 'enter') the cell it magically aligns back to the middle. This would be great except for the fact that I don't want to have to do this for each individual cell.

Has anyone ran into this issue before. Is there any way to correct the alignment of all the cells in the column without going to each one individually?

Best Answer

I bounced around blogs, forums, etc. and found out that this had something to do with the values being saved as Text vs Number. Eventually I strolled upon a Microsoft article with an alternative solution.

  1. Select the entire column
  2. Select the "Data" tab
  3. Press the "Text to Columns" button under "Data Tools"
  4. For "Step 1" press "Next"
  5. For "Step 2" press "Next"
  6. For "Step 3" select "Text" as the "Column data format" and then press "Finish"
  7. When you go to check your columns they should all be aligned correctly
Related Question