You can sort a range of cells, but did you know that a table is ready for sorting with its built-in arrows? You can quickly sort your data, and it lets you filter too.
Click the sort arrow at the top of the column you want to sort on, and pick the sort order you want.
To undo a sort, use the Undo button on the Home tab.
Note: In Excel Online, you can sort only a single column ascending (A to Z) or descending (Z to A); multi-column and custom sorting aren't supported yet.