问题
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