Issues with macros and formulas in Excel

前端 未结 2 611
攒了一身酷
攒了一身酷 2020-12-22 06:03

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

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-22 06:27

    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), """")"
    

提交回复
热议问题