Range
Publicado por jorge luis (43 intervenciones) el 16/03/2013 17:45:29
Este código me funciono muy bien me lo envió Juanjo para ingresar los datos en forma vertical
For i = 1 To 3
Acumula = InputBox("Ingrese la nota: " & i, "Ingreso de Notas")
Range("B" & i).Value = Acumula
Total = Total + Acumula
Next i
Para que ingresen en forma horizontal me parece que el truco esta en
Range("B" & i).Value = Acumula
Aquí lo coloco completo pero variando la posicion de los Rangos
Sub Notas()
Dim i As Integer
Dim Acumula As Integer
Dim Total As Integer
Dim Prom As Integer
Range("A1").Value = "Nota1"
Range("B1").Value = "Nota2"
Range("C1").Value = "Nota3"
Range("D1").Value = "Promedio"
For i = 1 To 3
Acumula = InputBox("Ingrese la nota: " & i, "Ingreso de Notas")
Range("B" & i).Value = Acumula /"Aquí esta donde estoy viendo cambiar la posición
Total = Total + Acumula
Next i
Prom = (Total / (i - 1))
Range("B4").Value = Prom
MsgBox "El Promedio de las Notas es: & Prom " / Esto no funciona ya revise y no se donde esta el error
End Sub
For i = 1 To 3
Acumula = InputBox("Ingrese la nota: " & i, "Ingreso de Notas")
Range("B" & i).Value = Acumula
Total = Total + Acumula
Next i
Para que ingresen en forma horizontal me parece que el truco esta en
Range("B" & i).Value = Acumula
Aquí lo coloco completo pero variando la posicion de los Rangos
Sub Notas()
Dim i As Integer
Dim Acumula As Integer
Dim Total As Integer
Dim Prom As Integer
Range("A1").Value = "Nota1"
Range("B1").Value = "Nota2"
Range("C1").Value = "Nota3"
Range("D1").Value = "Promedio"
For i = 1 To 3
Acumula = InputBox("Ingrese la nota: " & i, "Ingreso de Notas")
Range("B" & i).Value = Acumula /"Aquí esta donde estoy viendo cambiar la posición
Total = Total + Acumula
Next i
Prom = (Total / (i - 1))
Range("B4").Value = Prom
MsgBox "El Promedio de las Notas es: & Prom " / Esto no funciona ya revise y no se donde esta el error
End Sub
Valora esta pregunta


0