Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Embedding the appropriate nested "If" statement

Posted on 2012-03-11
4
Medium Priority
?
251 Views
Last Modified: 2012-03-11
EE Professionals,

I have a quick need for adding an embedded if statement (2nd level).  I have attached a graphic that shows what I'm trying to have the formula do.

Thank you in advance,

B.
Nested-If-Statement.png
0
Comment
Question by:Bright01
[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
  • 2
  • 2
4 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37707004
=if(05="One time",N5, <...>)

Replace <...> with your previous formula.
0
 

Author Comment

by:Bright01
ID: 37707045
ssaquibh,

The formula works.  However, I have one complication.  I have a macro that automatically updates the formula when a change occurs.  I get a Compile error that seems to be caused by the word "ONE" in this formula.

Range("R" & Target.Row).FormulaR1C1 = _
                   "=if(RC[-3]="One Time",RC[-4],if(RC[-4]=0,0,RC[-4]*(1+RC[-1])^(VLOOKUP(RC[-3],CA_Calc_Engine!R7C6:R15C8,3,0))*RC[-2]))"

Any ideas on what I'm doing wrong as I try to incorporate the formula in my macro?

B.
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 2000 total points
ID: 37707098
"=if(RC[-3]=""One Time"",RC[-4],if(RC[-4]=0,0,RC[-4]*(1+RC[-1])^(VLOOKUP(RC[-3],CA_Calc_Engine!R7C6:R15C8,3,0))*RC[-2]))"
0
 

Author Closing Comment

by:Bright01
ID: 37707140
Thank you ssaqubh!  Complicated WS and formula; but your formula and assistance provided the correct answer.

B.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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 two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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…

719 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