Excel Guides

Moving Cell Borders when Sorting in Excel

When you sort data in Excel, any cell borders that you have applied are maintained. This can be helpful if your data contains column headers with cell borders that you want to keep in place. However, there may be times when you want the cell borders to move along with the data. For example, you may have a worksheet with cells that contain both text and numbers, and you want the cell borders to move so that the numeric values are always next to each other.

To have Excel move the cell borders when you sort, follow these steps:

  1. Select the range of cells that you want to sort. This can be a single column or multiple columns.
  2. On the Data tab, in the Sort & Filter group, click Sort.
  3. In the Sort by list, click the column that you want to sort by.
  4. In the Order list, click either (Ascending), which sorts from smallest to largest value, or (Descending), which sorts from largest to smallest value.
  5. Optional:

    • To sort by more than one column, click (Add Level), and then repeat step 3.

    • To specify how blank cells should be sorted, click (Options), and then select an option under (Blank cells). By default, blank cells are sorted below all nonblank cells.

  6.    
     "Sorted By Column A"  "Then By Column B"  "Then By Column C"

    Move beyond 

    Excel

    Get started with Causal today.
    Build models effortlessly, connect them directly to your data, and share them with interactive dashboards and beautiful visuals.