Forum Discussion

dennistb95's avatar
dennistb95
Copper Contributor
Oct 26, 2023
Solved

Random distribution of a fixed amount of numbers

I am looking for a formula or function to distribute a fixed amount of numbers x over a designated area. This distribution has to be random. So for example, I want to distribute randomly the followin...
  • Lorenzo's avatar
    Oct 26, 2023

    dennistb95 

    Assuming I understood... With inputs formated as Table (not mandatory) named DistribInput:

     

     

    in D3:

    =LET(
      amts, DROP(
        REDUCE(0,DistribInput[Time],
          LAMBDA(seed,t, VSTACK(seed, SEQUENCE(t,,INDEX(FILTER(DistribInput[Amount], DistribInput[Time]=t),1),0)))
        ), 1,
      ),
      SORTBY(amts, RANDARRAY(ROWS(amts)))
    )

     

Resources