Share via

(Solved) Automatically sort data when new values are entered.

Anonymous
2022-02-12T11:25:59+00:00

Hello everyone,

I am looking for a way to automatically sort the data in J2:J14 (by largest to smallest) whenever I enter new values into the table below it (Table 2).

Here is a picture of what it looks like:

Microsoft 365 and Office | Excel | For home | Windows

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

Answer accepted by question author

Anonymous
2022-02-13T17:58:41+00:00

It's not "automatic", but it is faster than mousing.

What I do is use use the shortcut keys:

With the cursor in the column to sort on (single column)

<ALT><A><SD>

If you are sorting on more than one column first define the sort criteria after clicking on the Data tab > Sort & Filter group > Sort button. Subsequently use <ALT><A><SS><Enter>

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

11 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-02-12T16:39:11+00:00

    re: more on sorting

    Also, a Table in Excel includes its own sort capability.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2022-02-12T15:55:55+00:00

    re: questions

    Code in Excel almost always refers to VBA code which stands for "Visual Basic for Applications". It is the primary coding language used within Excel.

    VBA Event code will function if a cell change occurs from manually entering a value or pasting a value in a cell.

    But, but, but Sorting is designed to sort data not formulas.
    Formulas can change their cell references when moved to another row.

    You can sort cells containing formulas, but you have to make sure the cell references are correct when the formulas are moved.

    "QAT" stands for Quick Access Toolbar.

    Note: you have an arrow pointing from Table2 to a formula.

    I assumed that Table2 contained formulas.

    '---

    Nothing Left to Lose

    https://1drv.ms/u/s!Au8Lyt79SOuhZw2MCH7_7MuLj04?e=sAwbHU

    (free excel programs)

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2022-02-12T14:39:56+00:00

    Thanks for responding.

    I'm not sure what you mean by "changed value originates from a formula".

    In this case, would the original value be the COUNTIF formula (counting if a specific value is entered in Table 2) or the values themselves being added into the table?

    Also, what kind of code are you referring to, and what does QAT mean?

    Thank you.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2022-02-12T14:14:17+00:00

    Re: automatically sort

    Excel has 'Event' code that can run when changes are made to a worksheet.

    That doesn't work when the changed value originates from a formula.
    (the formula has not changed)

    Just add the sort icons to the Quick Access Tool bar.

    -or-

    Create some sort code and add a button to QAT to run the code.

    (no selection would then be required)

    '---
    Nothing Left to Lose

    Was this answer helpful?

    0 comments No comments