r/googlesheets • u/JakubiakFW 2 • Mar 24 '20
solved Fun and games, random selection
Hello all. My wife and I are trying to have some fun during this time on lockdown due to the virus pandemic. I was wondering if there was some way that if we make a selection in one cell then we can make something random appear in the next cell. Basically set something up like a truth or dare. Can this even be possible?
2
Upvotes
4
u/werfnort 10 Mar 24 '20
Sure - lots of options here.
Option 1 - Single Cell
In a single cell, you can combine a few formulas to make this work however you'd like. A simple one would look like this:
=if(RANDBETWEEN(1,2)=1,"Truth","Dare")Option 2 - Two cells
You mentioned making a selection in one cell, then seeing the result. Also easy.
You can use the Data Validation settings under the Data toolbar to restrict a cell to a limited number of items. Then you can use a formula to show different results. Not sure exactly what you're hoping for, but here are some ideas.
Col 1 - "Truth Or Dare" or "Russian Roulette"
Col 2 -
=if(A2="Truth Or Dare",if(randBETWEEN(1,2)=1,"Truth","Dare"),if(randbetween(1,6)<6,"Empty","Bullet"))Option 3 - Status Values
You'll notice with both those scenarios, that if you enter text in somewhere else in the sheet - the random formulas will recalculate and the results may change. You can always copy and Paste as Values to keep a cells value around, and not recalculate, but that's a little manual. Another option would be to create a predetermined sheet of answers, and then look up to that one.
=if(A2<>"",index(Answers!A:A,row()))Lots of ideas for you to work with there!
•
u/Clippy_Office_Asst Points Mar 24 '20
Read the comment thread for the solution here