Monday, August 4, 2008

Randomizing Questions in an Existing MS Word File

NOTE: These instructions are for MS Word 2003; while the same process can be used for Word 2007, the menu choices are a little different. I can make a 2007 version, should you need such a creature.

  1. Begin by highlighting the text needing randomized.NOTE: Text must be contiguous in order to be randomized later. Any additional text, such as manual page headers, will need to be removed temporarily.
  2. Next click Table > Convert > Text to Table
  3. A new window, “Convert Text to Table,” will appear.
  4. Ensure that the following settings are set at their default:

    1. Table size - “Number of columns” set to 1NOTE: While we will add another column later, it is important to maintain the information as-is; thus, we choose only one column for now.
    2. AutoFit behavior - “Fixed column width” is checked
    3. Table style: (none) - Choose Paragraph from the “Separate text at” section NOTE: This will allow MS Word to create an individual table cell for each question and individual answer. However, we will correct this in the next few steps.
  5. A new table will be created containing the text.
    NOTE: Some cleanup may be necessary at this point; delete any empty rows created by this process.
  6. Highlight the cells containing the questions and their respective answers only.
  7. Right-click the highlighted area and select Merge Cells.
  8. The questions and their subsequent answers will now be contained in one cell.
  9. Repeat these steps until all sections are contained in their respective cells.
  10. Highlight the entire column containing the questions and answers.
  11. From the menu, choose Table > Insert > Columns to the Left.
  12. Save the Word document as your original order (i.e., “original_file.doc”, etc.)
  13. In this new column, we will insert a randomly generated list, starting from the number 1 to however many questions we have to randomize. Such a list can be produced at websites such as
  14. Highlight the randomized list and COPY it to your Clipboard.
  15. Once you have a randomly-generated numerical list, highlight the new column and Paste the number list to this column.
    NOTE: If the new column has two sets of numbers, as shown here, be sure to highlight the column and turn OFF the Numbering format.
  16. Now, we use the numbered list to randomize all the questions.
  17. Highlight the entire table and choose Table > Sort from the menu.
  18. In the new menu, choose the following:
    1. Sort by: Column 1

    2. Type: Number

    3. Ascending (order)

  19. Click OK.

The table will now be randomized, as its numerical order has been sorted, based on a randomized list. This left-handed column can now be used as the questions’ order. NOTE: Using this method will allow text to retain its ‘hidden text’ feature, which contains the correct answer key. Otherwise, this hidden text is lost.

The table/cell borders may now be hidden, pending overall design choice.

The questions can now be randomized over and over, simply by:

  1. Opening the original file (with the blank column)
  2. Pasting a randomly-generated numerical list in the left
  3. Sorting the entire table by this new list


Anonymous said...

Genial post and this mail helped me alot in my college assignement. Gratefulness you on your information.

Anonymous said...

Fantastic!! Works like a charm - very helpful!

Jana said...

Thanks a lot for the post. This is wonderful!! and helped me a lot.

Anonymous said...

great help thanks much

Anonymous said...

Wonderful! Thank you for this post.

Anonymous said...

Too tedious for a 50 question exam. Gave up on step 13.

Bill Adams said...

I know this is a very old post but, it was a tremendous help. Made my life easier. Even though it is written specifically for MSWord 2003 & 2007, with a little tweaking I was able to use it on MSWord 2010 without any issues.

GREAT JOB!!!!!!!!!!!