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
LVL 6
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:
Hello,

you're not closing the brackets in the right place

=IF(ISERROR(1-F3/E3),0,(1-F3/E3))

cheers, teylyn
0

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

is )     or is it "
this was my formula

"=IF(ISERROR(1-F3/E3,0,(1-F3/E3))"
this is yours?
 =IF(ISERROR(1-F3/E3),0,(1-F3/E3))

Where is the difference?
0
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
=IF(ISERROR(1-F3/E3),0,(1-F3/E3))

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

cheers, teylyn
0
 
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?
0
 
jimyXCommented:
Zwiekhorst,
The answer was provided by Teylyn first.
0
 
Vee_ModCommented:
All,
 
Following a request by teylyn (at http://www.experts-exchange.com/Q_26838365.html) 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,
 
Vee_Mod
Community Support Moderator
0
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.