Hi i am having some trouble with VBA. Im trying to write a formula in a cell like this
ActiveWorkbook.Sheets(1).range("I3").Formula = "=IF(H3<TODAY();" & Chr(34) & "closed" & Chr(34) & ";IF(G3>TODAY();" & Chr(34) & "open" & Chr(34) & ";" & Chr(34) & "in stock" & Chr(34) & "))"
I think the problem lies with the quotationmarks. It is giving me the Error message Run-time error '1004': Application-defined or object-defined error. Thank you in advance
;
with,
vba is american english format. - Scott Craner;
with,
. - Vityata,
instead of;
as a list delimiter or use.FormulaLocal
. VBA is very EN-US-centric. - user4039065debug.print "=IF(H3<TODAY();""closed"";IF(G3>TODAY();""open"";""in stock""))"
.... print this ...=IF(H3<TODAY();"closed";IF(G3>TODAY();"open";"in stock"))
- jsotola