ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to set random numbers that add to 100%? (https://www.excelbanter.com/excel-programming/322183-how-set-random-numbers-add-100%25.html)

ggya

how to set random numbers that add to 100%?
 
I need help from anyone with regards to the formula of generating a set of
random numbers that makes up for 100%

Dave Peterson[_5_]

how to set random numbers that add to 100%?
 
If you need N numbers that add up to 100%, do N-1 of them. Then make that last
number:

=1-sum(theother N-1 numbers)



ggya wrote:

I need help from anyone with regards to the formula of generating a set of
random numbers that makes up for 100%


--

Dave Peterson

Dave D-C[_3_]

how to set random numbers that add to 100%?
 
ggya wrote:
I need help from anyone with regards to the formula of generating a set of
random numbers that makes up for 100%


Generate your set of N random numbers.
Get the sum of all of them (SumRandNum).
Then process (for each)
NewRandNum = OldRandNum * 100. / SumRandNum

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----


All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com