ActiveCell.Formula = "=IF(ISERROR(1-F3/E3);0;(1-F3/E3))" WHAT IS WRONG

Dear experts,

Excel VBA will not exept   ActiveCell.Formula = "=IF(ISERROR(1-F3/E3,0,(1-F3/E3))" for a selected cell. I get runtime error 1004

Does anyobe have an idea why and how to solve it?

Kind regards

Eric ZwiekhorstSAP Business ConsultantAsked:
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.

Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:

you're not closing the brackets in the right place


cheers, teylyn

Experts Exchange Solution brought to you by ConnectWise

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
You forgot "("
ActiveCell.Formula = "=IF(ISERROR(1-F3/E3),0,(1-F3/E3))"
Eric ZwiekhorstSAP Business ConsultantAuthor Commented:
He teylin, I do not understand what you mean with brackets?

is )     or is it "
this was my formula

this is yours?

Where is the difference?
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
These are brackets ()

these are double quotes ""

the formula in your post is

=IF(ISERROR(1-F3/E3,0,(1-F3/E3))  -- you are not closing the IsError correctly

It's the missing closing bracket after the first E3.

cheers, teylyn
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Can you please explain why you ignored my suggestion, which put the missing bracket in exactly the same place, giving an explanation about it, and all that 4 minutes before the answer you accepted?
The answer was provided by Teylyn first.
Following a request by teylyn (at to the closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Experts.
At this point I am going to re-start the auto-close procedure.
Thank you,
Community Support Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.