IF-fetishism and named-range-bonanza

Blog

Blog

Blog

Blog

all posts

tags

IF-fetishism and named-range-bonanza

by Rickard Warnelid on March 10 2009

There are different schools of thought when it comes to saying when a formula is too long. I personally like the ‘the shorter the better’ way of thinking. Ideally, in my view, all formulas should be shorter than half the formula bar in Excel.

Every now and then I come across formulae that have been constructed with a complete disrespect for all financial modelling best-practice guidelines and common sense. Sure, one could technically get to the bottom of such an enigma - if you had a couple of weeks of nothing better to do and an obsession with decision tree analysis! These are three examples of what not to do and I don’t think they need any further explanation.

IF-fetishist

=IF(sen5_internal_refinance_option="Y",IF(mon_date1> sen5_refinancing_date,DF9,IF(AND(sen5_pmt_flag<>0, mon_date1<>sen5_issue_date),sen5_ob* IF(AND(mon_date1=EOMONTH(sen5_issue_date, ROUND(sen5_months_for_first_interest_calculation,0)), MOD(sen5_term_periods,1)>0), +1 +sen5_rate_periodic)^sen5_pmt_freq)* mon_date1Sen5_issue_date)/365,sen5_rate_periodic),0)), IF(AND(sen5_pmt_flag<>0, mon_date1<>sen5_issue_date),sen5_ob *IF(AND(mon_date1= EOMONTH(sen5_issue_date, ROUND(sen5_months_for_first_interest_calculation,0)), MOD( sen5_term_periods,1)<>0),(1+1+ IF(base_rate_override_option="Y", sen5_rate_periodic_ir_risk,sen5_rate_periodic))^ sen5_pmt_freq)* mon_date1sen5_issue_date)365,IF(base_rate_override_option="Y", sen5_rate_periodic_ir_risk,sen5_rate_periodic)),0))

Named-range-bonanza

=IF(EOMONTH(I$2,-Tax.VAT.Reimbursement) <>EOMONTH(Project.Close,0),- SUM(OFFSET(I114,0,IF(I2-Tax.VAT.Reimbursement* 30<Model.Start,0,-Tax.VAT.Reimbursement)): OFFSET(I114,0,IF(I2-Tax.VAT.Reimbursement*30< Model.Start,0,IF(AND(I2>=Constr.End, H2<Constr.End),0-Tax.VAT.Reimbursement, -Tax.VAT.Reimbursement)))),0)+IF(AND (EOMONTH(I$2,-Tax.VAT.Reimbursement)>= Project.Close, EOMONTH(I$2,-Tax.VAT.Reimbursement)< EOMONTH(Project.Close,6)),- OFFSET(I114,0,-ROUND((I$2- EOMONTH(Project.Close,0))/(Assumptions!$H$53/CtnP),0))/6,0)

Just plain wrong

=-IF(Debt.Bond1.Flag=1, J$434*IF(AND(J$434=1,K$434=0), I924+SUM(J920:J922), IF(AND(Debt.Bond1.Term*P- (J$11-1)<VLOOKUP($B919,Table.Depreciation,4)*P, Debt.Bond1.Term*P-(J$11-1)>=0),(I924+SUM(J920:J922))/ (Debt.Bond1.Term*P-(J$11-1)+1), (I924+SUM(J920:J922))/( VLOOKUP($B919,Table.Depreciation,4)*P ))),J$368*IF(AND(J$368=1,K$368=0),I924+SUM(J920:J922),IF( AND((Debt.Bank1.Term+Debt.Bank3.Term)*P-(J$11-1) <VLOOKUP($B919,Table.Depreciation,4)*P, (Debt.Bank1.Term+Debt.Bank3.Term)*P -(J$11-1)>=0),(I924+SUM(J920:J922))/ ((Debt.Bank1.Term+Debt.Bank3.Term)*P-(J$11-1)+1),(I924 +SUM(J920:J922))/(VLOOKUP($B919,Table.Depreciation,4)*P))))

If you have come across anything worse - let me know!

COMMENTS

Post new comment

The content of this field is kept private and will not be shown publicly.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Need a financial model audit?

Need a financial model audit?

Do you want to find our more about our financial model audit services??

Read more about Corality

Upcoming Courses

Best Practice Project Finance Modelling
Sydney
30 May - 31 May 2012
Best Practice Project Finance Modelling
London
11 June - 12 June 2012
Advanced Project Finance Modelling
London
13 June - 14 June 2012

Bloggers

Laura Dean

Laura Dean

Laura is our creative and motivated Marketing Coordinator.

Rickard Warnelid

Rickard Warnelid

Rickard Warnelid is the Managing Director of Corality Financial Group.

Peter Weatherston

Peter Weatherston

Peter is a UK qualified accountant with 10+ years experience in financial modelling and financial model auditing.

Bing Chien Quek

Bing Chien Quek

Bing is Corality's in-house VBA expert. He has worked on numerous projects as well as facilitated VBA training courses internationally.

Caroline Wiroth

Caroline Wiroth

Caroline has over 8 years of experience in marketing and Public Relations.

Tim Heng

Tim Heng

Tim has a wide range of experience in analytics and modelling across a number of different industry sectors (corporate banking, vehicle finance, credit risk and marketing analytics).

Blake McNaughton

Blake McNaughton

Blake McNaughton is an Associate based in Corality’s Head Office in Sydney, Australia.

Haydn Palliser

Haydn Palliser

Haydn is an Associate at Corality with a wealth of experience in structured finance, consulting and is a chartered professional engineer.

Cathryn Fish

Cathryn Fish

Cathryn is our energetic and super organised Training Experience Manager.

Nick Crawley

Nick Crawley

Nick Crawley is the Chairman and Head of Consulting of Corality Financial Group.

Grace Utama

Grace Utama

Grace Utama is a financial modelling expert, with particular expertise in advanced Excel techniques and VBA Macros.

Have a question or comment? We would love to hear from you. More contact options

We respect your email privacy.

Sitemap | Terms | Privacy © Copyright 2012 Corality Financial Group