Can't Sort Imported Data

Written by Allen Wyatt (last updated November 7, 2020)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


Martin is importing data into a worksheet from an SQL view; it comes in perfectly. Excel automatically creates a defined table using the imported data. Martin then inserts new columns in the middle of the table so he can start to work with the data, but once these new columns are inserted, he cannot sort the worksheet—the option is grayed out. Martin is wondering why this is happening and how to fix it.

The problem is probably due to the fact that the data is being imported as a defined table. Defined tables can have some "peculiarities" (shall we say) that affect what you can and cannot do with them. You can figure out if this is what is causing the problem by following these steps:

  1. Make sure you select a cell within the data table.
  2. Select the Design tab (or Table Design tab) of the ribbon. (This tab is available only if you select a cell in your data table, as noted in step 1.)
  3. Click the Convert to Range tool in the Tools group. Excel asks you if you want to convert the table to a normal range.
  4. Click Yes.

That's it; if you can now add information and sort your data, then the problem is solved. If you cannot see a Design or Table Design tab in step 2 (and you selected a cell in the data table), then your data is not a defined table and these steps won't work. If the problem persists, then it could be because the SQL connection between the data source and Excel is somehow limiting what you can and cannot do with the data. You may need to poke around in the Trust Center settings for external content in order to figure out what will work with your situation.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9044) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Selecting a Column

Two easy ways to select an entire column in Excel.

Discover More

Full Path Names in Excel

Need to know what the full path name is for the current workbook? With a simple macro you can display the full path name ...

Discover More

Pictures Move on their Own

Insert some pictures into a document and you may be in for a surprise--they don't necessarily stay where you put them. ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

Ignoring Selected Words when Sorting

If you use Excel to maintain a list of text strings (such as movie, book, or product titles), you may want the program to ...

Discover More

Undoing the Effects of a Sort

Have you ever put a lot of data into a worksheet, sorted that data, and then realized you shouldn't have done so? It is ...

Discover More

Importing Custom Lists

Custom lists are handy ways to enter recurring data in a worksheet. Here's how you can import your own custom lists from ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 8?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.