A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
The easiest way is to set up another column to sort by. Use a formula in that column to add the 4 digit zip extensions to the cells that don't have it. the formula would be something like:
=if(len(a1)=5,a1&"-0000",A12)
fill this down for all rows. then sort on this column.