producto en VBA
Publicado por Albert (88 intervenciones) el 05/12/2007 15:58:22
Buenas tardes, tengo un problema con realizar un calculo en VBA lo que quiero es que me coja la cantidad de la columna C y lo multiplique per el precio Colm. D y el resultado lo ponga en E
He hecho el siguiente codigo pero algo esta mal (o todo lo mas provable) alguien me puede ayudar?
Mil Gracias por anticipado
Dim x As Integer
Dim cantitat As Integer
Dim preu As Double
Dim total As Double
'_______________________________________
For x = 1 To 10000
If Hoja3.Cells(x, 6) = "" Then
final2 = x - 1
Exit For
End If
Next
'_______________________________________
Hoja11.Cells(FINALTOTAL, 4) = "Totales"
For x = 1 To final
cantitat = Hoja11.Cells(x, 3)
preu = Hoja11.Cells(x, 4)
total = cantitat + preu
Hoja11.Cells(x, 5) = total
Exit For
Next
He hecho el siguiente codigo pero algo esta mal (o todo lo mas provable) alguien me puede ayudar?
Mil Gracias por anticipado
Dim x As Integer
Dim cantitat As Integer
Dim preu As Double
Dim total As Double
'_______________________________________
For x = 1 To 10000
If Hoja3.Cells(x, 6) = "" Then
final2 = x - 1
Exit For
End If
Next
'_______________________________________
Hoja11.Cells(FINALTOTAL, 4) = "Totales"
For x = 1 To final
cantitat = Hoja11.Cells(x, 3)
preu = Hoja11.Cells(x, 4)
total = cantitat + preu
Hoja11.Cells(x, 5) = total
Exit For
Next
Valora esta pregunta


0