Applies To
Excel for Microsoft 365 Excel 2024 Excel 2021 Excel 2019 Excel 2016

When you're sorting data or trying to remove duplicates from a worksheet, you might run into a warning message saying there is data you haven't selected. Excel offers to expand the selection, or let you proceed with the current selection.

When you select data and tell Excel to sort it or to remove duplicate values, if there's data in any column adjacent to your selection, Excel issues this warning. The reason is simple: the data in a worksheet is arranged in rows and columns, and both arrangements usually have meaning. So if you sort by or delete values from one, it may disrupt the other.

Note: Whether or not you decide to expand the selection, if you don't like the results you can use Undo to reverse your last action, whether it was sorting or deleting duplicates.

Decide whether to use an expanded selection

  • Review the data first

    To decide whether you need to expand the selection, you should review your worksheet data to determine if there are meaningful relationships between rows and columns. Do rows have items and columns show weekly sales? If you leave out data, you might lose information.

    If there's a relationship between the rows and columns you need to be sure you have enough data selected to retain all related values. Check to see that the selected data contains all the rows and columns that need to stay related. If it does not, or if you aren't sure, let Excel expand the selection.

  • Just try it and see

    If you don't know how to decide what data is needed, consider letting Excel expand the selection, and then using Undo if you don't like the results.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.