Excel - Contabilizar en examen tipo test

 
Vista:
sin imagen de perfil

Contabilizar en examen tipo test

Publicado por Victor (3 intervenciones) el 01/08/2017 19:17:21
Buenas tardes a todos. En el siguiente archivo puedes crear examen tipo test y corregirlo, pero no se como hacer que las preguntas acertadas cuenten un punto, los fallos -0,33 y las en blanco 0. Agradeceria cualquier ayuda. Gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

Contabilizar en examen tipo test

Publicado por Pedro Martin (31 intervenciones) el 04/08/2017 07:49:18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Sub Corregir(): On Error Resume Next
 
Set Preguntas = Sheets(ActiveSheet.Range("B1").Value)
Set Examen = Sheets(ActiveSheet.Range("B2").Value)
 
Application.ScreenUpdating = False
Examen.Unprotect
Examen.Select
For x = 2 To Preguntas.Range("A" & Rows.Count).End(xlUp).Row
   r = Split(Preguntas.Range("C" & x), ";")
   MsgBox r
   For y = 4 To Preguntas.Cells(x, 3).End(xlToRight).Column
      i = i + 1
      Examen.OLEObjects(i).Object.BackColor = vbWhite
      For Z = 0 To UBound(r)
         If Examen.OLEObjects(i).Object.Value = True Then
            If CStr(r(Z)) = CStr(y - 3) Then
               Examen.OLEObjects(i).Object.BackColor = vbGreen
               acertadas = acertadas + 1
               Exit For
            Else
               Examen.OLEObjects(i).Object.BackColor = vbRed
               acertadas = acertadas - 0.33
            End If
         End If
      Next
   Next
Next
Examen.Protect
Examen.Select
MsgBox acertadas
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
3
Comentar
sin imagen de perfil

Contabilizar en examen tipo test

Publicado por Victor (3 intervenciones) el 04/08/2017 12:24:40
Justo lo que buscaba Pedro. Un millón de gracias!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

Contabilizar en examen tipo test

Publicado por Pedro Martin (31 intervenciones) el 04/08/2017 20:15:35
Hola Victor!

una disculpa, anoche no verifique que funcionara al 100%, creo hay errores en el codigo. mejor utiliza esto:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Sub Corregir(): On Error Resume Next
 
Set Preguntas = Sheets(ActiveSheet.Range("B1").Value)
Set Examen = Sheets(ActiveSheet.Range("B2").Value)
 
Application.ScreenUpdating = False
Examen.Unprotect
Examen.Select
For x = 2 To Preguntas.Range("A" & Rows.Count).End(xlUp).Row
   r = Split(Preguntas.Range("C" & x), ";")
   For y = 4 To Preguntas.Cells(x, 3).End(xlToRight).Column
      i = i + 1
      Examen.OLEObjects(i).Object.BackColor = vbWhite
      For Z = 0 To UBound(r)
         If Examen.OLEObjects(i).Object.Value = True Then
            errores = 0
            If CStr(r(Z)) = CStr(y - 3) Then
               Examen.OLEObjects(i).Object.BackColor = vbGreen
               Aciertos = Aciertos + 1
               Exit For
            Else
               Examen.OLEObjects(i).Object.BackColor = vbRed
               errores = errores + 0.33
            End If
         End If
      Next
   TotalErrores = TotalErrores + errores
   errores = 0
   Next
 
Next
MsgBox "Preguntas acertadas = " & Aciertos & ",   Calificacion = " & Format(Aciertos, "00.00") & Chr(10) & "Preguntas falladas    = " & TotalErrores / 0.33 & ",   Calificacion =" & Format(-TotalErrores, "00.00") & Chr(10) & Chr(10) & " Calificacion Total= " & Aciertos - TotalErrores
Examen.Protect
Examen.Select
End Sub
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar
sin imagen de perfil

Contabilizar en examen tipo test

Publicado por Victor (3 intervenciones) el 06/08/2017 11:50:34
Disculpas para nada. Demasiado que me has dedicado parte de tu tiempo. Gracias Pedro.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar