Question about a function in Excel RAND()

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.

Thank you
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This will do exactly what you need.  First, it randomly selects the 1's, then it goes back and fills in the zeroes.

Let me know if you have questions

Good luck,


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Without using macros:

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
Try this without macros - using the RANK function:

Sorry byundt - crossed over in posting - mine is very similar to yours
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.