title: Strange Sort Logic in Excel: Cells That Reference Other Cell Values
body: <p>I am attempting to sort some data in order from Largest to Smallest value. </p>
  
  <p>The data come in two columns: names and corresponding values.</p>
  
  <p>The sorting method I use requires the following steps:</p>
  
  <p>select the "data" tab in excel</p>
  
  <p>select the columns (names and values) of the data to sort</p>
  
  <p>click the sort button</p>
  
  <p>select "sort by" as the column containing the values</p>
  
  <p>select "sort on" as values</p>
  
  <p>select "order" as Largest to Smallest</p>
  
  <p>click "OK"<a href="https://i.stack.imgur.com/XnDfu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XnDfu.png" alt="enter image description here"></a></p>
  
  <p>The values in the cells next to the names are defined by the reference cells above, listed as a row of numbers from 1 to 14.</p>
  
  <p>I expect that when I sort the data from Largest to Smallest, it should look like Case B, where the numbers are sorted from Largest to smallest and the names follow the sorting and remain assigned to their value. Instead it looks like Case A, where the values assigned to each name now reference an entirely new and random reference cell (i.e. the row of cells above either case), as opposed to the correct reference cell. </p>
  
  <p>Please note that Case B works because the values in the cells are truly numbers, not references to other cells WITH numbers in them. </p>
  
  <p>Any help on this issue would be greatly appreciated.</p>