Why are my numbers left justified?

jasonkgreen

Board Regular
Joined
Feb 21, 2013
Messages
50
I grabbed a table from a Wikipedia page. Some of the numbers had asterisks at the end (see Passing Yards 1 image below). I did a Find - Replace All (finding ~* and replacing with nothing). This resulted in the numbers with asterisks being right-justified and the others staying as left-justified. I highlighted the column and changed the formatting from General to Number, but the left-justified format remains.

If I highlight one of the left-justified cells, hit F2 and then hit Enter, it becomes right-justified. What's the issue here and how do I fix it?
 

Attachments

  • Passing Yards 1.png
    Passing Yards 1.png
    212.5 KB · Views: 15
  • Passing Yards 2.png
    Passing Yards 2.png
    215 KB · Views: 15

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I thought it was just a matter of formatting letters and numbers, so some cells were formatted "General" and some cells were formatted "Number" or "Comma Style",
so I think you can change the format of column "C" there to "General", I often get problems like that, and I often do this
 
Upvote 0
The issue is that you have 'numbers stored as text'. Changing the cell formatting does not change the underlying value so the 'numbers' remain as text.
Try this instead, right from the beginning when some of the values have the asterisk.

  1. Select the column of data
  2. Data ribbon tab -> Text to Columns
  3. Delimited -> Next -> Remove any ticks from Tab/Semicolon/Comma/Space -> Add tick to Other and insert an asterisk in box to the right -> Next -> Click in the second column in the bottom section (it will be blank & turn black when you click in it) -> Mark 'Do not import column (skip) in the top section -> Finish
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top