View Single Post
 
Old 10-31-2016, 11:55 AM
Mxthomp Mxthomp is offline Windows 7 32bit Office 2013
Novice
 
Join Date: Oct 2016
Posts: 1
Mxthomp is on a distinguished road
Default Syntax error on formula that works in spreadsheet

Hello,
My formula works in my spreadsheet, calculates everything accurately, but when I add it to the macro, I get a Compile error: Syntax error.

The formula reads:
ActiveSheet.Range("al10").Formula = "=IF(AJ10="NOT ON POG","NOT ON POG",AK10)"

All of my other formulas are working, but not this one. Is it because it cannot have words in the macro?

The other formulas read:
ActiveSheet.Range("aJ10").Formula = "=VLOOKUP(AI10,'[Authorized Items V2.xlsx]Data'!$A:$H,8,FALSE)"
ActiveSheet.Range("ak10").Formula = "=IF(r10+u10+x10+Aa10+ad10+ag10<=0,0,r10+u10+x10+A a10+ad10+ag10)"

Thank you for the help!
Michelle

Last edited by Mxthomp; 10-31-2016 at 12:30 PM. Reason: I left off the = before the IF statement. Still have teh syntax error though.
Reply With Quote