I\'m having problems when inserting a formula from a macro in Excel. I managed to insert exactly the same value that I have on another cell where the formula is working perf
Please refer to the answer by Monster for the correct solution to the problem.
I have to leave this answer here until it is "unaccepted", and then I will be able to delete it.
To enter locale-dependent formulas, you need to use FormulaLocal
:
Cells(LastRow + 1, 3).FormulaLocal = "=SI.ERROR(BUSCARV(B" & laststr & " , Datos!A2:E52, 3), """")"
Thanks for your replies!!!
Using FormulaLocal works great!!! What I did was to "translate" the functions names and done!
Cells(LastRow + 1, 3).Formula = "=IFERROR(VLOOKUP(" & "B" & laststr & " , Datos!A2:E52, 3), """")"