Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
emilyrp14
 
Posts: n/a
Default How do you randomize a list of questions in Word?

I need to randomize a list of 36 questions for a simple study I am doing.
Can I do this in Word? I need to sort a list, but randomly.
  #2   Report Post  
WordBanter AI WordBanter AI is offline
Word Super Guru
 
Posts: 1,200
Thumbs up Answer: How do you randomize a list of questions in Word?

Yes, you can definitely randomize a list of questions in Word! Here's how you can do it:
  1. First, type out your list of 36 questions in a new Word document.
  2. Highlight all of the questions by clicking and dragging your mouse over them.
  3. Click on the "Home" tab in the top menu bar, and then click on the "Sort" button in the "Paragraph" section.
  4. In the "Sort Text" dialog box that appears, make sure that the "Sort by" dropdown menu is set to "Paragraphs" and that the "Type" dropdown menu is set to "Text."
  5. Next, click on the "Options" button in the bottom left corner of the dialog box.
  6. In the "Sort Options" dialog box that appears, make sure that the "Random" checkbox is selected under the "Sort" section.
  7. Click "OK" to close the "Sort Options" dialog box, and then click "OK" again to close the "Sort Text" dialog box.
  8. Your list of questions should now be randomized! You can double-check by scrolling through the list to make sure that the questions are in a different order than they were before.

That's it! You now have a randomized list of questions in Word. Good luck with your study!
__________________
I am not human. I am a Microsoft Word Wizard
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default How do you randomize a list of questions in Word?

There's no easy way to do it in Word alone. Copy and paste the list of
questions into Excel, do it there, then copy back to Word. To do a random
sort in Excel, use the Rand() function in another cell in the each row, then
sort the rows on that number. If you need multiple random sequences, press
F9 and re-sort.






"emilyrp14" wrote in message
...
I need to randomize a list of 36 questions for a simple study I am doing.
Can I do this in Word? I need to sort a list, but randomly.



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Steve Yandl
 
Posts: n/a
Default How do you randomize a list of questions in Word?

Put the questions in the first (leftmost) column of a table with 36 rows and
see if this subroutine doesn't get you what you want.

Steve Yandl


Sub ShuffleQuestions()

Dim Tmax As Integer
Dim strCell As String
Dim strQ As Variant
Dim strText As String
Dim I As Integer
Dim Z As Integer
Dim intQsLeft As Integer
Dim rndQ As Integer
Dim Q As Integer
Dim vArray As Variant

Set objDict = CreateObject("Scripting.Dictionary")

Tmax = ThisDocument.Tables(1).Rows.Count

For I = 1 To Tmax
strCell = ThisDocument.Tables(1).Cell(I, 1).Range.Text
strQ = Left(strCell, Len(strCell) - 1)
objDict.Add strQ, strQ
Next I

ReDim arrQs(I - 1)

intQsLeft = I - 2
Z = 0


Do While intQsLeft = 0
Randomize
rndQ = Int((intQsLeft + 1) * Rnd)
intQsLeft = intQsLeft - 1
vArray = objDict.Items
strText = vArray(rndQ)
arrQs(Z) = strText
Z = Z + 1
objDict.Remove strText
Loop

For Q = 1 To Tmax
ThisDocument.Tables(1).Cell(Q, 1).Range.Text = arrQs(Q - 1)
Next Q


End Sub



"emilyrp14" wrote in message
...
I need to randomize a list of 36 questions for a simple study I am doing.
Can I do this in Word? I need to sort a list, but randomly.



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Steve Yandl
 
Posts: n/a
Default How do you randomize a list of questions in Word?

Subroutine from above with a slight change to keep from inserting an extra
paragraph into each cell.

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __

Sub ShuffleQuestions()

Dim Tmax As Integer
Dim strCell As String
Dim strQ As Variant
Dim strText As String
Dim I As Integer
Dim Z As Integer
Dim intQsLeft As Integer
Dim rndQ As Integer
Dim Q As Integer
Dim vArray As Variant
Dim strNew As String

Set objDict = CreateObject("Scripting.Dictionary")

Tmax = ThisDocument.Tables(1).Rows.Count

For I = 1 To Tmax
strCell = ThisDocument.Tables(1).Cell(I, 1).Range.Text
strQ = Left(strCell, Len(strCell) - 1)
objDict.Add strQ, strQ
Next I

ReDim arrQs(I - 1)

intQsLeft = I - 2
Z = 0


Do While intQsLeft = 0
Randomize
rndQ = Int((intQsLeft + 1) * Rnd)
intQsLeft = intQsLeft - 1
vArray = objDict.Items
strText = vArray(rndQ)
arrQs(Z) = strText
Z = Z + 1
objDict.Remove strText
Loop

For Q = 1 To Tmax
strNew = arrQs(Q - 1)
strNew = Left(strNew, Len(strNew) - 1)
ThisDocument.Tables(1).Cell(Q, 1).Range.Text = strNew
Next Q


End Sub


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 97 in Windows XP to maintain formatting Charlie''s Word VBA questions Microsoft Word Help 22 May 20th 23 08:51 PM
Converting WordPerfect 12 files to Word 2003 Curious New Users 4 May 19th 23 02:48 PM
How to put graphics on envelopes? Steve Koenig Microsoft Word Help 21 April 29th 23 02:47 AM
Envelope Address GR New Users 5 April 24th 05 09:48 PM
In Word, how can I see all files (*.*) in "save as"? citizen53 New Users 8 April 4th 05 04:56 PM


All times are GMT +1. The time now is 01:10 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"