EXCEL VBA run formula via MACRO

拜拜、爱过 提交于 2020-03-22 06:09:22

问题


I had already asked a question like this before but I'm really bad at VBA formula.

Here is my formula:

Worksheets("Sheet1").Range(CellRange).formula = "=IF(Sheet2!E$4=X;CONCATENATE(Sheet3! """ & myString """, Not defined)"

Run-time error 1004: error defined by the application or object

myString is a STRING and contains the address of a cell.

I've used to follow the explanation from my previous question A question with a really good answer

But It didn't worked this time. Any suggestions?

Thank you!


回答1:


Worksheets("Sheet1").Range(cellrange).Formula = _
  "=IF(Sheet2!E$4=""X"",Sheet3!" & myString & ", ""Not defined"")"


来源:https://stackoverflow.com/questions/60189425/excel-vba-run-formula-via-macro

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!