Hair and eye colour chooser formula help

jwoww

New Member
Joined
May 29, 2021
Messages
25
Office Version
  1. 365
Platform
  1. Windows
I have created a document that tracks peoples hair and eye colour for a story that is being written. I have determined the percentage of each colour option for children based on their parents pairings for both hair and eye colour. when it comes to the children, i want to have a formula that will take into account the statistical options of each colour when choosing what hair colour and eye colour each child should have. i'm thinking the easiest way to do it would be to randomly choose a number from 0-100 and based on the number for each statistic any number that goes from 0 to the lowest chooses the least common colour, and number that is 1 above the least common up to the percentage value of the 2nd least common colour gets that colour and so (hope that makes sense).

Using my spreadsheet and andrew as an example, his parents are caspian and sophie so the hair colour options (percentage wise) are:
Black - 79.6%
Brown - 12.8%
Blonde - 5.1%
Red - 2.5%

in my mind, if you were to choose randomly a number from 0-100, if you got a number 0-2.5, you would have the option Red, if you got a number 2.6-5.1, you would get the option Blonde, if you got a number 5.2-12.9, you would get the option brown, and any number 13 and above you would get Black as your option. because each different colour combination for their parents presents a different percentage option for each colour, i think maybe something combining index/match and randbetween/choose might work but not sure how to do this.

I would end up doing the same thing for the eye colour as well.

Any suggestions would be appreciated

Hair & Eye colour chooser.xlsx
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi jwoww. Seems like a Google search for Punnett Squares may be helpful. HTH. Dave
Thanks for answering.

Not sure if your suggestion will help but it may be because i didn't articulate well enough what i was hoping for.

I'm wanting to randomly choose a number from 0-100 and then based of who the parents are, choose the colour based on what number range bracket the randomly chosen number corresponds with.

Cheers
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top