?
Solved

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

Posted on 2011-02-22
8
Medium Priority
?
508 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:Eric Zwiekhorst
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 2000 total points
ID: 34950297
Hello,

you're not closing the brackets in the right place

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

cheers, teylyn
0
 
LVL 24

Expert Comment

by:jimyX
ID: 34950319
You forgot "("
ActiveCell.Formula = "=IF(ISERROR(1-F3/E3),0,(1-F3/E3))"
0
 
LVL 6

Author Comment

by:Eric Zwiekhorst
ID: 34950324
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 50
ID: 34950332
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
 
LVL 50
ID: 34950378
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
 
LVL 24

Expert Comment

by:jimyX
ID: 34950411
Zwiekhorst,
The answer was provided by Teylyn first.
0
 
LVL 1

Expert Comment

by:Vee_Mod
ID: 34990693
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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question