Forum Discussion
Automatically moving rows in office 365 excel based on rank or largest to smallest of a said column
Based on the provided data, it seems that the column you want to use for ranking is "Column3" (Column C). To populate the rankings in a separate column and sort the rows based on the ranking, you can follow these steps:
- Insert a new column next to your existing table, where you want to display the ranking. In your case, this would be column D.
- In cell D2, enter the following formula and drag it down to populate the remaining cells:
=RANK(C2,$C$2:$C$25,0)
This formula ranks the values in Column C (Column3) in descending order (largest to smallest) within the range C2:C25. Adjust the range if your data extends beyond this range.
- Now, select the entire table, including the headers, and go to the "Data" tab in the Excel ribbon.
- Click on the "Sort" button in the "Sort & Filter" group.
- In the "Sort" dialog box, choose the column that contains the rankings (Column D) as the "Sort by" column.
- Select the "Values" option in the "Sort On" dropdown.
- Choose "Largest to Smallest" in the "Order" dropdown.
- Click "OK" to apply the sorting. The rows will now be sorted based on the rankings in Column D.
Make sure to adjust the column references and range as per your actual data.
Hi and thank you for your help,
I have done this and it works to a fashion. When I click sort by custom sort it does indeed do it as you said however what is does not do is sort automatically as i input data. So when I put more data in the table it will show in column c that the ranking position is there however it does not move it automatically. Can this be done without manual intervention? Would I need to use a VBA code perhaps?