Solved

Embedding the appropriate nested "If" statement

Posted on 2012-03-11
4
236 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
  • 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 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
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 …

679 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