How do I lock rows for sorting names and addresses? Need to sort but keep row cells together. This is NOT FREEZING cells, however.

Anonymous
2023-10-03T11:58:23+00:00

NOT FREEZING cells, just locking rows, so all the cells in that row, name, address, city, state, zip will stay intact. Also, I'M ON A MAC. Thanks!

Microsoft 365 and Office | Excel | Other | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2023-10-03T14:01:01+00:00

    If you select a single cell within a contiguous region and sort, Excel will keep the cells within a row in that region together.

    In the screenshot below, the active cell is in the contiguous range on the right, outlined in green. The rows of that range will stay together when you sort. The range on the left, outlined in red, will not be sorted with the range on the right, so any connection between the two ranges will be lost.

    Image

    .

    But if you select the entire range, as in the screenshot below, the cells within a row in the selection will stay together: the rows will be sorted as a whole.

    Image

    .

    By default, Excel will try to guess whether the top rows of the range to be sorted are header rows based on the contents and formatting. In the example below, the top 2 rows will be treated as headers because of their formatting, so they won't be sorted with the rest, and remain at the top.

    If you want to override this behavior, select Sort & Filter > Custom Sort... on the Home tab of the ribbon.

    Image

    2 people found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Bob Jones AKA CyberTaz MVP 430.5K Reputation points
    2023-10-03T15:32:19+00:00

    Further nto what Hans provided, if you select a column only the content of that column will be sorted.

    See the Excel Help article Sort data in a range or table

    0 comments No comments
  2. Anonymous
    2023-10-05T15:32:46+00:00

    Thank you Hans, I will try this. Do you "make" a contiguous region?

    0 comments No comments
  3. HansV 462.4K Reputation points MVP Volunteer Moderator
    2023-10-05T20:31:38+00:00

    A contiguous region is simply a range of cells in which there is no completely empty row or completely empty column.

    0 comments No comments