Ayuda con macro absoluta

Buenas, estoy aprendiendo algo de programación y he tenido algunos problemas con esta macro absoluta:

Sub Notas()
Dim i As Integer
Dim Acumula As Integer
Dim Total As Integer
Dim Prom As Integer
ActiveSheet.Range("A1").Value = "Nota 1"
ActiveSheet.Range("A2").Value = "Nota 2"
ActiveSheet.Range("A3").Value = "Nota 3"
ActiveSheet.Range("A4").Value = "Promedio"
For i = 1 To 3
Acumula = InputBox("Ingrese la nota " & i, "Ingreso de notas")
Total = Total + Acumula
Next
Prom = Total / 3
ActiveSheet.Range("B4").Value = Prom
MsgBox ("El promedio de la nota es: " & Prom)
End Sub

En las celdas B1, B2 y B3 deberían salir las 3 notas respectivamente tal como muestra la siguiente imagen

Agradezco la ayuda de antemano!

1 Respuesta

Respuesta
1

Así sería la macro

Sub Notas()
Dim i As Integer
Dim Acumula As Integer
Dim Total As Integer
Dim Prom As Integer
ActiveSheet.Range("A1").Value = "Nota 1"
ActiveSheet.Range("A2").Value = "Nota 2"
ActiveSheet.Range("A3").Value = "Nota 3"
ActiveSheet.Range("A4").Value = "Promedio"
For i = 1 To 3
Acumula = InputBox("Ingrese la nota " & i, "Ingreso de notas")
ActiveSheet.Range("B" & i) = Acumula
Total = Total + Acumula
Next
Prom = Total / 3
ActiveSheet.Range("B4").Value = Prom
MsgBox ("El promedio de la nota es: " & Prom)
End Sub

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas