Google Sheets formula for randomly choosing an option

jwoww

New Member
Joined
May 29, 2021
Messages
25
Office Version
  1. 365
Platform
  1. Windows
i need to create a formula for the attached google sheet Testing eye colour

this is what i want it to do with the result being put in D49

1 - I want to get the value in l49 and find the corresponding value in column A 9 - the response to step 8 will be what is put in D49 (in this situation its "22")
2 - using the value in column a that was found, then locate the value in column D that corresponds with the row that found the number from column A in (in this situation its row 24 and "Brown")
3 - i want to then repeat step 2 but use column I instead (in this situation its row 24 and "Blue")
4 - i want to match the response from step 2 to column U (in this situation its either U3, U4, U5 or U6)
5 - i want to match the response from step 3 to column V (in this situation its either V4, V7, V12 OR V16)
6 - i want to locate the row that has matches from step 4 and step 5 (in this situation it will be row 4)
7 - i want to randomly choose one of the cells in that row that are from columns W, X, Y or Z as long as the number is more than 0 (in this situation it will either be W4, X4 or Z4)
8 - when a cell has been chosen, chose the corresponding cell in that column on row 2 from w2:z2
9 - the response to step 8 will be what is put in D49 (in this situation it will either be "Brown", "Blue" or "Hazel"

i have tried to figure it out and use chatgpt but it doesnt work
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,882
Messages
6,175,164
Members
452,615
Latest member
bogeys2birdies

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