2

In my excel spreadsheet, I am trying to randomly sort a large list. I am doing this by adding in a new column to my table. This table is assigned a random integer between 1 and 10. This is done by =FLOOR(10 * RAND(), 1). Then I want to sort this list of numbers from smallest to largest.

All of this is working except the sorting. When I try to sort it, excel changes the order of the numbers slightly, but it is not from smallest to largest.

Any ideas on how to fix this?

Thanks!

2
  • The rand() function recalculates itself. You need to copy and paste values, then sort. Jun 9, 2015 at 18:15
  • If you're getting your data sorted based on the first set of random numbers, isn't that good enough?  Do you need to maintain a record of the random values that were the basis for the sort? Jun 10, 2015 at 4:14

1 Answer 1

5

Your rows are sorted by the previous values of =RAND().

After sorting, the =RAND() function is called again.

Turn off Automatic Calculation from Formulas (ribbon), Calculation Options, Manual.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.