I'm trying to get excel to put a formula into a cell. This works fine with text and simple formulas.
However I need it to print the following into the cell ad the quotation marks are giving me errors.
Does anyone know any workarounds, I need the formula the way it is. Is there another way to notate that it should return nothing or a blank?
Thanks!
Code:
Sheets("Sheet1").Range("D11").Formula = "=SUM(A1:A20)"
However I need it to print the following into the cell ad the quotation marks are giving me errors.
Code:
Sheets("Sheet1").Range("D11").Formula = "=IFERROR(VLOOKUP(A12,Sheet2!E:F,2,FALSE),[COLOR=#ff0000]""[/COLOR])"
Does anyone know any workarounds, I need the formula the way it is. Is there another way to notate that it should return nothing or a blank?
Thanks!