Muestra de error 6 en excel vba
Al ejecutar la macro me sale error 6 DESBORDAMIENTO.
Se detiene en la siguiente línea
wx = (h3.Cells(i, "K") / h3.Cells(i, "L"))
macro
Sub cal_prom()
'
Dim i As Integer
Dim wx As Long
Set h3 = Sheets("DOCENTES")
ini1 = "Inicial - Cuna-jardín"
ini2 = "Inicial - Jardín"
ini3 = "Inicial - Cuna"
prim = "Primaria"
Sec = "Secundaria"
For i = 4 To h3.Range("I" & Rows.Count).End(xlUp).Row
If h3.Cells(i, "I") = ini1 Or h3.Cells(i, "I") = ini2 Or h3.Cells(i, "I") = ini3 Or h3.Cells(i, "I") = prim Then
wx = (h3.Cells(i, "K") / h3.Cells(i, "L"))
h3.Cells(i, "M") = wx
End If
If h3.Cells(i, "J") = "JER" Then
h3.Cells(i, "M") = CInt((h3.Cells(i, "L") * 35) / 25)
ElseIf h3.Cells(i, "J") = "JEC" Then
h3.Cells(i, "M") = CInt((h3.Cells(i, "L") * 45) / 25)
End If
Next i
MsgBox "FIN"
End Sub
1 respuesta
Respuesta de Dante Amor
1
