Solved

Embedding the appropriate nested "If" statement

Posted on 2012-03-11
4
230 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
Comment Utility
=if(05="One time",N5, <...>)

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

Author Comment

by:Bright01
Comment Utility
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
Comment Utility
"=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
Comment Utility
Thank you ssaqubh!  Complicated WS and formula; but your formula and assistance provided the correct answer.

B.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now