Trouble inserting formula =IF(OR(ISNUMBER(AC3)=FALSE,AC3=0);0;AX3/AC3) into excel column via VBA

Having trouble inserting a formula into excel from access 2013 VBA.
this formula works if I put it directly in Excel


but when I try to put it there via VBA I've exhausted my tries!

With wks

  .UsedRange 'Refresh UsedRange
  Lastrow = .UsedRange.rows(.UsedRange.rows.Count).Row

this works (but with a ton of divide by zero errors!

  .Range("BG3:BG" & Lastrow).Formula = "=AX3/AC3)"

This is what I want
.Range("BG3:BG" & LastRow).Formula = "=IF(OR(ISNUMBER(AC3)=FALSE;AC3=0);"N/A";AX3/AC3)"

I expect I'd need to get the quotation marks right!  

I also tried things like
.Range("BG3:BG" & Lastrow).Formula = "=IF(OR(ISNUMBER(AC3)=FALSE,AC3=0);0;AX3/AC3)"
trying to eliminate the need for quotation modification just to see if that works!  I could live with it if it did!  But same error
application defined or object defined error 1004


Peter GrovesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

byundtMechanical EngineerCommented:
Try using commas instead of semicolons as the list separator. Range.Formula expects U.S. standard function names, list separators and date formats.

.Range.FormulaLocal ought to accept your formula as written.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Peter GrovesAuthor Commented:
Works , but in excel they show up as semicolons, which is why I didn't try them!    Now , would ya have a suggestion to get the "N/A" in there?


Wayne Taylor (webtubbs)Commented:
You can use the NA() function to return the #N/A error...


If you needed to return a string, use double quotation marks...

Peter GrovesAuthor Commented:
Thanks guys!  I should have asked sooner!  Burned several hours on this!

Rob HensonFinance AnalystCommented:
Formula can be simpler as well:

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.