ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Possible Combinations of scores (https://www.excelbanter.com/excel-programming/363050-possible-combinations-scores.html)

Mike

Possible Combinations of scores
 
Hello all,

I'm having a really hard time with developing some VBA code to accomplish
the following:

I have a questionnaire that has 12 questions with varying possibility of
answers for each question. Based on the answers, the person will be scored
and grouped accordingly.

Here's an example of the 12 question scores:

Q1 0 2 6 6
Q2 0 1 3 4
Q3 1 2 3 4 5 6 7
Q4 1 2 3 4
Q5 1 2 3 4 5 6
Q6 2 1
Q7 1 2 3 4 5
Q8 1 2 3 4 5
Q9 1 2 3 4
Q10 1 2 3
Q11 1 2 3
Q12 5 4 3 2 1

Based on the above, I need some code that will give me a random answering of
the questions and a total of the points but I'm stumped.

Any help that anyone may be able to provide would be greatly appreciated.
Thanks in advance and have a great day,

Mike

mrice[_15_]

Possible Combinations of scores
 

Using the rnd() function and select case statements might help

X = Rnd()
Select Case X
Case Is < 1 / NumberOfOptions
Score = 1
Case Is < 2 / NumberOfOptions
Score = 2
......
.......


End Select


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=547583



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com