Monday, February 1, 2010

Excel, Sorting Date - Sometimes retyping is the answer

Had a brain dead moment. I was trying to sort an Excel file by date but some of the rows were not sorted with the rest.

I checked to see that the cells were indeed dates:

(select column > format cells > number >date). That worked for some of the lines.

Some of the dates had a leading space or some other non-alphanumeric character, that happens sometimes when you’re copying and pasting data from different files. That’s easy to solve as well:
Select the date cells with a problem.
Go to Find and Replace (CTRL+F)>Replace and remove the space

That left several cells with a problem. Couldn’t figure it out, this was the brain dead moment. Spent 15 minutes on 15 or 16 lines in which I couldn’t figure out the problem.

I tried retyping the date and – lo and behold – it worked. Same thing with HTML code sometimes retyping simply works.

No comments:

Post a Comment