Okay, I have 25 rows I need 15 rows with the value "1" and 10 other row with the value "-1". But the order have to be random so I can change the order everytime I want. The function RAND() lets me put the value 1 or -1 but my problem is that I need to have a specific number of each value at a random order.
1) Put the formula =RAND() in 25 cells. I used A1:A25
2) Copy down the following formula for your random mix of 1 and -1:
=IF(A1>=LARGE(A$1:A$25,15),1,-1) returns 15 with 1, 10 with -1
andrewssd3
Try this without macros - using the RANK function:
1) Put the formula =RAND() in 25 cells. I used A1:A25
2) Copy down the following formula for your random mix of 1 and -1:
=IF(A1>=LARGE(A$1:A$25,15)