This is happening because a Table has been defined on your workbook but some of your data is outside the Table. The simplest solution is probably to convert the Table back into an ordinary range.
You can see how to do this in the video lesson: Expert Skills Lesson 1-12 Format a table using table styles and convert a table into a range.
After converting the table into a range the sorting should work correctly, although you also might like to convert all of the data back into a Table.
You can see how to do this in the video tutorial: Expert Skills Lesson 1-11 Convert a range into a table and add a total row.
Finally, it's also possible to adjust the Table without first converting it to a range. To do this, click: Table Tools > Design > Properties > Resize Table.
I hope this enables you to get the results you need, but please feel free to reply if you need any more help with this.
Jonathan is part of the professional team who answer Excel-related questions posted on the ExcelCentral.com forums.
Jonathan also tests our courses prior to publication and has worked on all of our ten world bestselling Excel books for Excel 2007, Excel 2010, Excel 2013, Excel 2016 for Windows and Excel 2016 for Apple Mac. Jonathan has also worked on over 850 video lessons for or video courses covering Excel 2007, Excel 2010 and Excel 2013.
As well as extensive Excel knowledge, Jonathan has worked in the IT world for over thirteen years as a programmer, database designer and analyst for some of the world's largest companies.