Uso de for next
Publicado por Jorge Luis (43 intervenciones) el 15/03/2013 17:46:01
he creado esta macro pero tengo otras formas de hacerlo, pero me indican que asi debe ser , lo que paso es que al escribir los datos en los cuadros no lo escribe, he probado con varias líneas de código pero ya estoy varias horas y no me sale
No explico porque
Sub Notas()
Dim i As Integer
Dim Acumula As Integer
Dim Total As Integer
Dim Prom As Integer
Range("A1").Value = "Nota1"
Range("A2").Value = "Nota2"
Range("A3").Value = "Nota3"
Range("A4").Value = "Promedio"
For i = 1 To 3
Acumula = InputBox("Ingrese la nota: " & i, "Ingreso de Notas")
Total = Total + Acumula
Next i
Prom = Total / (i - 1)
ActiveSheet.Range("B4").Value = Prom
End Sub
Gracias por su apoyo
No explico porque
Sub Notas()
Dim i As Integer
Dim Acumula As Integer
Dim Total As Integer
Dim Prom As Integer
Range("A1").Value = "Nota1"
Range("A2").Value = "Nota2"
Range("A3").Value = "Nota3"
Range("A4").Value = "Promedio"
For i = 1 To 3
Acumula = InputBox("Ingrese la nota: " & i, "Ingreso de Notas")
Total = Total + Acumula
Next i
Prom = Total / (i - 1)
ActiveSheet.Range("B4").Value = Prom
End Sub
Gracias por su apoyo
Valora esta pregunta


0