Results 1 to 17 of 17

Shuffle four answers of one question with a condition and loop it

Threaded View

  1. #1
    Registered User
    Join Date
    11-04-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    85

    Shuffle four answers of one question with a condition and loop it

    In the attached excel file (version 2007), the first sheet is "quiz" and second sheet is "sheet1". It has a question/answer sheet (sheet1) that is designed in such a way that the first letter of the question is prefixed with the answer. For example here is a sample data in the range A1:A20 which is also attached. Answer to first question is "b" hence the question is prefixed with "b".

    bWho is a cricketer?
    Tiger Woods
    Sachin Tendulkar
    Will Smith
    Bill Gates
    aWho is a Golfer
    Tiger Woods
    Sachin Tendulkar
    Will Smith
    Bill Gates
    dWho is an Entrepreneur
    Tiger Woods
    Sachin Tendulkar
    Will Smith
    Bill Gates
    cWho is an actor
    Tiger Woods
    Sachin Tendulkar
    Will Smith
    Bill Gates

    I need to shuffle/jumble the four options for every question (in sheet1) whenever the workbook is opened without changing the logic of prefixing answer to the question's first letter and keeping all other things intact. Please help me how can I achieve this. What kind of code can be written and which section of vba (sheet/module)? Here is an example of question # 1 how it should be after randomization (on file open).


    cWho is a cricketer?
    Will Smith
    Bill Gates
    Sachin Tendulkar
    Tiger Woods


    Here, the options are shuffled/jumbled and also the correct answer is updated in the question (prefixed by 'c' which was earlier 'b'). I was looking at the chip article at http://www.cpearson.com/excel/ShuffleArray.aspx but I dont know how to implement this in my question. I also tried finding source on how we can make use of these functions by Chip that suits my question to no avail. I am still trying... even if i randomize the four options, how can i get the correct answer sequence (a, b, c, d) to prefix in the question is another tough task. Appreciate some help here. Thank you!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How do I get multiple answers for 1 question
    By Redwhite in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-17-2014, 05:32 AM
  2. Replies: 4
    Last Post: 08-21-2013, 04:58 PM
  3. If question returning 2 answers
    By P357 in forum Excel General
    Replies: 11
    Last Post: 08-29-2008, 10:44 PM
  4. Replies: 3
    Last Post: 04-01-2008, 08:31 PM
  5. Shuffle through sheets in a loop?
    By erikhs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-20-2006, 09:35 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1