Forum Discussion

Lowbaer's avatar
Lowbaer
Copper Contributor
May 12, 2024
Solved

Distribution of one number over different categories with specific probabilities per category

Hi all,   I've been trying to create a formula to distribute a given amount of points over multiple different categories with different probabilities for each individual category. So for example 1...
  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    May 13, 2024

    Lowbaer OK, so you want to generate 6 random percentages that add up to 100%.

    In older versions of Excel, use =RAND() in 6 cells and then express each of these as a percentage of their sum. Or if you have a modern Excel version that supports dynamic arrays you could use something like below to spill 6 percentages in one go.

    =LET(
        r, RANDARRAY(1, 6),
        s, SUM(r),
        TRANSPOSE(
            INDEX(r, 1, SEQUENCE(6)) / s
        )
    )

     

    The attached file contains both solutions.

Resources