Create a formula that moves a row to the bottom of a spreadsheet depending on status

Heather Heckard 0 Reputation points
2026-08-20T21:00:57.02+00:00

How do I create a formula that moves a row of data to the bottom of the spreadsheet according to status created as a data validation drop down?

Microsoft 365 and Office | Excel | Other | Other

3 answers

Sort by: Newest
  1. Heather Heckard 0 Reputation points
    2026-08-20T22:11:36.26+00:00

    This did not work for me, and I don't know what I did wrong.

    Was this answer helpful?

    0 comments No comments

  2. Heather Heckard 0 Reputation points
    2026-08-20T22:10:48.1533333+00:00

    I've tried this a couple of different ways, and it did not work. Not sure what I did wrong.

    Was this answer helpful?

    0 comments No comments

  3. Marcin Policht 106.8K Reputation points MVP Volunteer Moderator
    2026-08-20T21:07:57.9933333+00:00

    If you're using Excel, a formula by itself cannot physically move a row to the bottom of the same table when the Status drop-down changes. Formulas return values - they do not move or reorder the original cells. However, you can create a second, automatically sorted view of the data where rows with a particular Status, such as "Completed", appear at the bottom.

    For example, suppose your data is in A2:F100 and the Status column is column F. You could use the following formula in another area of the worksheet:

    =SORTBY(A2:F100,F2:F100,"Completed")

    However, SORTBY needs a sorting value, not a text value like that. A better approach is to assign a numeric sort order based on the Status:

    =SORTBY(A2:F100,--(F2:F100="Completed"),1)

    This keeps all rows where Status is not "Completed" at the top and moves rows with Status = "Completed" to the bottom. The original data remains unchanged; the formula creates a dynamically sorted copy.

    If you have several statuses and want a specific order, such as New, In Progress, Waiting, then Completed, you can use:

    =SORTBY(A2:F100,XMATCH(F2:F100,{"New","In Progress","Waiting","Completed"}),1)

    This is generally the cleanest formula-based solution because changing the Status drop-down automatically changes the displayed order.

    If your actual goal is for the original row itself to physically move to the bottom of the same Excel table immediately when someone selects "Completed", you would need VBA/Office Scripts (depending on whether you're using desktop Excel or Excel for the web)


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.