Can't Sort Imported Data

by Allen Wyatt
(last updated June 9, 2014)

11

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 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 not, 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 you situation.

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

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

Paragraph Formatting Shortcuts

Paragraphs are one of the elemental building blocks in a Word document. Formatting those paragraphs is easy to do if you ...

Discover More

Calculating a Sum for a Range of Dates

If you use Excel to track information based on dates, you may wonder how to get a sum for only certain dates that you ...

Discover More

Counting Times within a Range

Excel allows you to easily store dates and times in your worksheets. If you have a range of cells that contain times and you ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Sorting Dates by Month

Sorting by dates is easy, and you end up with a list that is in chronological order. However, things become a bit more tricky ...

Discover More

Sorting an Entire List

Need to sort all the data in a table? Here's the fastest and easiest way to do it.

Discover More

Controlling Sorting Order

When you sort information in a worksheet, you have control over the order in which that information is sorted. Here's a quick ...

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}] in your comment text. You’ll be prompted to upload your image when you submit the comment. 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 eight minus 8?

2016-05-22 15:47:21

Kristen Clarke

Excellent tip. I thought I would have to export the data and start again.
No other help came near this simple tip.


2016-04-18 16:53:23

Carolyn Marshall

I don't have a Design tab. I'm Excel 2010.

I have a title Row and Print Area.

Clicked in the print area. That should be the data table.

Make a new document, type in junk and it does work.

Copy my table and edit/values and then it doesn't work.

Please help!


2016-04-06 09:29:53

KannyKen

Excellent tip. Sorted my problem in minutes! (Not sure I understood what I was doing but your instructions were clear!)

I had imported a simple document from LibreOffice spread sheet and could not sort the data. I had worried that in paying real money for real software after years of using freebies I had createsd a real problem. Seems like poetic justice that your free advice fixed it.


2015-10-08 15:09:37

Dave B.

Timesaver! Thanks!


2015-09-04 14:49:08

Kurt Finnegan

For me, the solution was to highlight everything and to Page Layout (At the top bar) and BREAKs, then remove Page Breaks.


2015-05-31 01:26:36

Another Rookie

Thanks so much! I must have a different version, but your advice was enough for me to figure it out. And yes, I was crying, it's late and it's past my bedtime.


2015-03-05 22:57:46

Rescued

In seconds, I solved a problem I had been tussling with for HOURS! No other information searches were successful. Then I found this. If there had been anyone else left at work, they'd have had me hauled away. I was cursing a blue streak.

THANK YOU THANK YOU THANK YOU! So easy when you know how!


2015-02-24 18:08:30

Dave

Step 2 above "Select the Design tab of the ribbon." Design tab doesn't show up and yes I clicked into the data area. A picture would help.

Thanks


2015-02-24 11:16:46

Meredith Roberts

Thank you for keeping me from crying at work.


2015-02-12 10:44:41

ExcelRookie

Thanks. Solved my problem in less than a minute!!


2014-11-19 11:53:16

Zoltan Gabanyi

I have a problem with sorting in Excel 10. I mada a small table (3 rows by 3 columns), and I filled it in with numbers. Then I made another column by summing up data in the first three columns. Then I tried to sort data using the calculated fourth column. Unfortunately, sorting is not done properly, numbers are not in descending order. What shall I do?


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.