Sample Data
This table shows names of students and their scores.
| Cell | Value |
|---|---|
| A1 | Name |
| B1 | Score |
| A2 | Alice |
| B2 | 85 |
| A3 | Bob |
| B3 | 92 |
| A4 | Charlie |
| B4 | 78 |
| A5 | Diana |
| B5 | 90 |
This table shows names of students and their scores.
| Cell | Value |
|---|---|
| A1 | Name |
| B1 | Score |
| A2 | Alice |
| B2 | 85 |
| A3 | Bob |
| B3 | 92 |
| A4 | Charlie |
| B4 | 78 |
| A5 | Diana |
| B5 | 90 |
=QUERY(A1:B5, "SELECT A, B ORDER BY B DESC", 1)A B 1 |Name |Score | 2 |Alice | 85 | 3 |Bob | 92 | 4 |Charlie| 78 | 5 |Diana | 90 | Formula references range A1:B5 for data and headers.
D E 1 |Name |Score | 2 |Bob | 92 | 3 |Diana | 90 | 4 |Alice | 85 | 5 |Charlie| 78 |