I have two columns, one has names of baseball players, and another has a numerical rank. I would like to sort the ranks in ascending, descending order, etc. However, when I sort the ranks, it only orders the ranks, but the names of the baseball players stays the same. Is there a way for me to sort column b, and based on the sort of the values, the corresponding cell in column a will be sorted as well.

IE I have:

Column A Column B (only the numbers)
Yadier Molina 2
Mark Mulder 6
Albert Pujols 1
Chris Carpenter 3
Billy Jones 5
Tyler Johnson 4

I sort Column B and I get:

Column A Column B (only the numbers)


Albert Pujols 1
Yadier Molina 2
Chris Carpenter 3
Tyler Johnson 4
Billy Jones 5
Mark Mulder 6


Thanks!