Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a problem in sorting the excel spreadsheet in a row that contain value in number+string format. I have a data in the following sequence

work10, work11, work12, work1 and work2

I want to sort the data into the following sequence:

 work1, work2, work10, work11 and work12
share|improve this question

migrated from stackoverflow.com Oct 17 '12 at 11:33

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Because your data is strings, it is sorted according to text sort order. To sort as you want, either pad the numbers with leading zero's, or split into seperate components, sort on the number part then reassemble the strings

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.