Is there a way to randomly select a cell based on weighted probability in Excel?

PAO3092

Say there's a list of names:

Peter
Andrew
James
John
Philip
Thomas
Matthew

I want to select one name randomly, and the formulas I'm currently using to do this are =RANDBETWEEN(1,7) and =VLOOKUP(A3,$A$6:$B$12,2).

However, is there a way to give each name a weight so that there is a higher chance for one particular name to be selected, because the only way I can think of doing that would be to add duplicate names to the list:

Peter
Peter
Peter
Peter
Peter
Andrew
Andrew
Andrew
James
James
John
Philip
Thomas
Thomas
Thomas
Thomas
Matthew
Mathhew

This way Peter would have the greatest probability of being randomly selected since the name appears the most, but I'd prefer not to do it this way if there's a more efficient way of doing this.

Any response is appreciated.

Excel Hero

This method requires no additional columns or helper cells.

Instead of RANDBETWEEN(1,7) use the following formula instead:

=CHOOSE(VLOOKUP(RANDBETWEEN(0,99),{0,1;28,2;45,3;55,4;60,5;65,6;87,7},2,1),1,2,3,4,5,6,7)

That will give you a weighting approximately equal to your longer list.

Then go ahead and use your =VLOOKUP(A3,$A$6:$B$12,2) to return the name.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Speed up the Probability-Weighted Sampling in R

From Dev

Excel Macro to copy select cells from a row from one sheet to another based upon a cell value

From Dev

Excel VBA to select a range based on cell value

From Dev

Javascript random number with weighted probability

From Dev

iOS - Is there a way to select a cell but not scroll to it?

From Dev

Excel - select a cell based on adjacent cell value

From Dev

Excel VBA - Select cells based on the value of another cell and then Autosum - Is it possible

From Dev

Select cells in Excel based on cell content

From Dev

excel powerquery replacevalues based on cell

From Dev

Randomly generate a weighted number in haskell

From Dev

select random value based on probability chance

From Dev

How to select a cell in excel VBA?

From Dev

Excel changes based on cell contents

From Dev

Select rows randomly based on condition pandas python

From Dev

Efficient way to randomly select set bit

From Dev

Javascript random number with weighted probability

From Dev

Count the probability in a cell array

From Dev

Calculate the value of a cell based on another cell in Excel

From Dev

Randomly shuffle a weighted array

From Dev

Excel select row based on cell value, then select specific cell inside that row

From Dev

In Microsoft Excel, is there a way to dynamically change a column width based upon cell contents without using visual basic?

From Dev

how to randomly change a probability?

From Dev

Is there a way to randomly select a cell based on weighted probability in Excel?

From Dev

Select rows randomly based on condition pandas python

From Dev

vba timeline dates as range , select subrange based on date in 2 cell values Excel2013

From Dev

Efficient way to randomly select set bit

From Dev

VBA Code in Excel to select a cell based on two criteria

From Dev

Select query data based on a cell

From Dev

Using an Excel formula to select a date based on a separate populated cell

Related Related

  1. 1

    Speed up the Probability-Weighted Sampling in R

  2. 2

    Excel Macro to copy select cells from a row from one sheet to another based upon a cell value

  3. 3

    Excel VBA to select a range based on cell value

  4. 4

    Javascript random number with weighted probability

  5. 5

    iOS - Is there a way to select a cell but not scroll to it?

  6. 6

    Excel - select a cell based on adjacent cell value

  7. 7

    Excel VBA - Select cells based on the value of another cell and then Autosum - Is it possible

  8. 8

    Select cells in Excel based on cell content

  9. 9

    excel powerquery replacevalues based on cell

  10. 10

    Randomly generate a weighted number in haskell

  11. 11

    select random value based on probability chance

  12. 12

    How to select a cell in excel VBA?

  13. 13

    Excel changes based on cell contents

  14. 14

    Select rows randomly based on condition pandas python

  15. 15

    Efficient way to randomly select set bit

  16. 16

    Javascript random number with weighted probability

  17. 17

    Count the probability in a cell array

  18. 18

    Calculate the value of a cell based on another cell in Excel

  19. 19

    Randomly shuffle a weighted array

  20. 20

    Excel select row based on cell value, then select specific cell inside that row

  21. 21

    In Microsoft Excel, is there a way to dynamically change a column width based upon cell contents without using visual basic?

  22. 22

    how to randomly change a probability?

  23. 23

    Is there a way to randomly select a cell based on weighted probability in Excel?

  24. 24

    Select rows randomly based on condition pandas python

  25. 25

    vba timeline dates as range , select subrange based on date in 2 cell values Excel2013

  26. 26

    Efficient way to randomly select set bit

  27. 27

    VBA Code in Excel to select a cell based on two criteria

  28. 28

    Select query data based on a cell

  29. 29

    Using an Excel formula to select a date based on a separate populated cell

HotTag

Archive