jbesclapez
Active Member
- Joined
- Feb 6, 2010
- Messages
- 275
Hello,
Here is my code :
After a short time, it comes with an error 104 Object (or application) defined error.
I am clueless... please can you guide me to the correct solution
Basically i would like the macro to copy a vlookup in every cell untill the last cell if and adjacent cell has less than 255 characters (otherwise VLOOKUP bring errors). If it is above 255 then writes "test".
Thats all. Thanks
Here is my code :
Code:
Sub VlookupAmeliorer()
'
' Macro2 Macro
'
Dim i As Integer
Dim LastRowL As Integer
LastRowL = Sheets("PlanEX-Origine").Cells(Rows.Count, 12).End(xlUp).Row
For i = 2 To LastRowL
If Len(Cells(23, i)) < 255 Then
Range("W" & i).FormulaR1C1 = "=+IF(RC[-4]=1,""ok"",VLOOKUP(RC[-1],C[16]:C[24],2,0))"
Else
Range("W" & i).FormulaR1C1 = "test"
End If
Next i
End Sub
After a short time, it comes with an error 104 Object (or application) defined error.
I am clueless... please can you guide me to the correct solution
Basically i would like the macro to copy a vlookup in every cell untill the last cell if and adjacent cell has less than 255 characters (otherwise VLOOKUP bring errors). If it is above 255 then writes "test".
Thats all. Thanks