Why does excel sort my headings




















For a version of this tip written specifically for later versions of Excel, click here: Recognizing a Header Row when Sorting. There are two ways you can sort information in Excel: using the Sort Ascending and Sort Descending tools on the toolbar or by using the Sort dialog box. Using the toolbar tools allows you to do the sort more quickly, but Excel makes a few assumptions in the process.

First, Excel assumes that you want to sort only by the column of whatever cell you have selected. If you want to perform secondary and tertiary sorts on more than one column or row , you need to use the Sort dialog box. The second assumption affects exactly what Excel sorts. It then examines the first row in the selected range to determine if it contains header information or not.

This is where sorting with the toolbar tools can become tricky—your header assuming you have one must meet some rather strict guidelines in order for Excel to recognize it as a header. For instance, if there are any blank cells in the header row, Excel may think it isn't a header. Likewise, if the header row is formatted the same as the other rows in the data range, then it may not recognize it. As well, if your data table consists entirely of text and your header row contains nothing but text, Excel will—virtually all the time—fail to recognize the header row.

The row looks just like another data row to Excel. Only after selecting the range and determining if there is a header row will Excel do the actual sorting. How pleased you are with the results depends on whether Excel got both the range selection and the header row determination right.

For instance, if Excel doesn't think you have a header row, and you do, then your header is sorted into the body of the data; this is generally a bad thing. If it doesn't match your expectations, then you need to either modify the character of the data in your table, or you need to select the data range before using the Sort dialog box. If your header has blank cells among those selected in the first row, or the first row is formatted just like the second row, or you have more than one header row selected, then Excel assumes you have no header row at all.

To correct this, make changes in your header row to make sure it is recognized properly by Excel. Finally, all bets could be off if your data table uses multi-row headers. Excel has a hard time recognizing them. You compound the problem when you expect it to include blank rows in that header; it just can't do it automatically.

You can, however, simply select all the rows you want to sort before doing the sort. In other words, be specific in what you want Excel to sort; don't let Excel make the assumptions for you. ExcelTips is your source for cost-effective Microsoft Excel training. This tip applies to Microsoft Excel 97, , , and You can find a version of this tip for the ribbon interface of Excel Excel and later here: Recognizing a Header Row when Sorting.

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. Learn more about Allen The undo list can be a lifesaver when working in a macro.

Unfortunately, the undo list is not preserved when you run a Move from one worksheet to another, and Excel selects whatever cell was last used in the worksheet you are selecting. Insert a picture into a table cell, and you may quickly find that the table is no longer the size you expected.

Discover how to extend the capabilities of Office Word, Excel, PowerPoint, Outlook, and Access with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Got a huge amount of data you need to sort in a worksheet, but Excel doesn't seem to be sorting it correctly? Here's some When you sort data that contains both numbers and text, you may not get exactly the result that you expected.

To know Need to do the same sorting operation over and over again? Excel doesn't provide a way to save your sorting criteria, but Enter your address and click "Subscribe.

Your e-mail address is not shared with anyone, ever. Maximum image size is 6Mpixels. Kristine Arp Microsoft Agent. In reply to LaurelS. Check the difference on how the tables look like on the images below: A. Table created by placing cell borders in Excel. Header Row is disabled. Let us know if you need additional assistance. How satisfied are you with this reply? Thanks for your feedback, it helps us improve the site.

A subscription to make the most of your time. Try one month free. This site in other languages x. After years of having no sorting problems using the A-Z and Z-A sort buttons when the cursor is on a single cell within a large range, all of a sudden the header row is unpredictably sorted along with the data rows.

The row above the header row is completely blank. The row below the last data row is also completely blank. Every cell in the header row contains a label. Every label is different in some respect, usually data type, from the data below it.

Is there any way to make Excel default to a checked box next to "My data has headers"? Or is there any alternate way to eliminate the problem? Thanks, Marv. Excel Facts. Click here to reveal answer. Try formatting the header row differently than the data. My header rows are centered with borders and shading, and Excel invariably guesses correctly.

I put a thick border at the top of each header cell. For a while, it looked as if that worked, then it started failing again. Might a different font in all the header cells be a sufficient difference for Excel to "guess" correctly? By the way, has Microsoft documented the logic it employed to "guess"?

Not that I've ever seen; someone else may have. For what it's worth, I've never had a problem with Excel not finding headers. I'm not sure what to make of your experience - can you provide sample data that you are using when this happens? Joined Apr 22, Messages 7.

This is very annoying to me as well I would greatly appreciate a FIX on this problem!! I actually do this as a matter of course whenever I sort data, in order to select the data I wish to sort. ChrisNC New Member.



0コメント

  • 1000 / 1000