Forum

Notifications
Clear all

sorting and =RAND

3 Posts
2 Users
0 Reactions
119 Views
(@justine)
Posts: 3
Active Member
Topic starter
 

Hi everyone,

I have added a coloumn and used the formula =RAND() to generate a list of random numbers, with one random number to each row. I want to now sort by that colomn, so I have my table rows in a random order. I have noticed that using the sort tool in Tables is not putting the rows into acsending or descending order - it does sort them, something happens, but not in order. In fact, it might be a random assortment. Does anyone know what is going on with this?

Its no big deal as I can use a workaround, but I would like to know for sure what is actually happening. Anybody? 🙂

Thanks, Justine.

 
Posted : 23/11/2021 6:41 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Justine,

Welcome to our forum!

I suspect what you're seeing is that the sorting is applied based on the RAND results, but in performing the sort it triggers the RAND formulas to recalculate, so now the sort order appears different to the RAND results. 

If you don't want the RAND formulas to recalculate upon sorting, you need to paste them as values before sorting.

Mynda

 
Posted : 23/11/2021 9:18 pm
(@justine)
Posts: 3
Active Member
Topic starter
 

Thanks Mynda!

Yes, that's what it was. My "workaround" was to actually paste values - nice to know I'm not way off!

 
Posted : 25/11/2021 11:40 am
Share: