• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Generate random text

i48998

New Member
Is it possible to first feed cells with long string texts (say a sentence in a question form), and then click a button or something to randomly bring up one of the question from the pool, up front?


I need to create a board game where I would populate the sheet with questions and answers. The questions would be short sentences with simple few words answers. I then wish to have some link or a button which I would click to bring out one question from the pool in random order.


Is this possible in Excel?
 
i48998


Firstly, Welcome to the Chandoo.org Forums


Yes.


To setup a list you would need to use dsome VBA to prompt for a question and find the location

to store the question into


Retrieval is easier, You could setup a range of cells questions

then use a lookup with a random number to retrieve the questions


EG: Questions from A1:A100


In B1: =INDEX(A1:A100,RANDBETWEEN(1,100))


Press F9 to get a new question
 
Hi ,


You would also need a mechanism to ensure that questions which have been asked earlier are not repeated , in the same session ( ? ).


Narayan
 
I was asked to do something similar once.

However, it couldn't have VBA.

We used the RANDBETWEEN(1,20) and countif(range,">"&range)to mixup 20 questions (learnt here on chandoo.org)

then we used dynamic data validation to hide all but the relevant question (in this case multiple answers to the question).


so if VBA isn't your thing, this is something that you might be able try instead... either way, it's not that easy!
 
Hi folks, thanks for the great welcome.


I am not proficient in coding on my own but I can get by if given good set of directions.


Does anyone have this type of spreadsheet created? (yes, I'd expect that once a question popped out from random, it shouldn't be repeated).


Could you please identify step-by-step what I need to do to get this going? Thanks.
 
Back
Top