Hernan_g_f
New Member
- Joined
- Jul 26, 2022
- Messages
- 22
- Office Version
- 365
- Platform
- Windows
Hello all,
I'm writing a macro but I have a trouble
The macro is:
Sub a()
Dim Fecha As Variant
Dim Rango As Variant
Set Rango = Sheets("1").Range("E16:DC1400")
lastrow = Sheets("1").Range("E" & Rows.Count).End(xlUp).Row
For cont = 17 To lastrow
Fecha = Sheets("1").Cells(cont, 114)
O = Application.VLookup(Fecha, Rango, 3, False)
If IsError(O) Then
O = 0
End If
Sheets("1").Cells(cont, 115) = O
Next cont
I need to add a product function, to the "O" equation with a constant
O = ¿? product(consant, application.Vlookup(Fecha, Rango, 3, False)
How can I write it?
Thank you very much for your help!
I'm writing a macro but I have a trouble
The macro is:
Sub a()
Dim Fecha As Variant
Dim Rango As Variant
Set Rango = Sheets("1").Range("E16:DC1400")
lastrow = Sheets("1").Range("E" & Rows.Count).End(xlUp).Row
For cont = 17 To lastrow
Fecha = Sheets("1").Cells(cont, 114)
O = Application.VLookup(Fecha, Rango, 3, False)
If IsError(O) Then
O = 0
End If
Sheets("1").Cells(cont, 115) = O
Next cont
I need to add a product function, to the "O" equation with a constant
O = ¿? product(consant, application.Vlookup(Fecha, Rango, 3, False)
How can I write it?
Thank you very much for your help!