+ Reply to Thread
Results 1 to 8 of 8

Goal Seek, Solver, and an IRR Workaround

  1. #1
    Registered User
    Join Date
    10-02-2009
    Location
    Arlington, VA, USA
    MS-Off Ver
    Excel 2003
    Posts
    34

    Goal Seek, Solver, and an IRR Workaround

    A quick warning: there is complicated finance here, but fortunately you don't need to know much about it to help with my issue.

    I'm trying to calculate IRR on Excel for a very large series of cash flows. For whatever reason, Excel seems to return an error message if you have more than 63 cash flows. It's normally either #NUM or #DIV/O. This is frustrating, but there is an alternative way to calculate IRR. By definition, the discount rate at which NPV equals 0 is IRR. Excel does thankfully have an NPV function.

    I have set up a 7 column X 40 row table with all the NPV results. I want to create another 7 X 40 table with the IRRs.

    I can find the IRRs via GoalSeek or Solver (I simply set the NPV to equal 0 and it will change the "rate"), but so far as I can tell, both Goal Seek and Solver will change my original values in the NPV table. Is there another function on Excel that I could use that would allow me to calculate the IRRs without messing up the NPV table? Or that is to say, is there a way to do this where I could create two different tables?

    Thanks.

  2. #2
    Forum Contributor
    Join Date
    07-30-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    121

    Re: Goal Seek, Solver, and an IRR Workaround

    Can you provide a sample (without disclosing anything vital) for us to view and work on please.

  3. #3
    Registered User
    Join Date
    10-02-2009
    Location
    Arlington, VA, USA
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Goal Seek, Solver, and an IRR Workaround

    AYData,

    I've attached a sample, but I probably have to explain. This is an analysis of Social Security.

    1st Table: Cash Flows

    There are 47 negative cash flows, followed by 37 positive cash flows. There are three columns and the positive cash flows vary for all.

    2nd Table: NPV

    This table shows the NPV for the Social Security inflows / outflows given the age the individual dies. For instance, in Column H, Cell 51, it assumes that the individual only collected Social Security for one year before passing away. The next cell down shows two years, etc.

    3rd Table: IRR

    Finally, the orange area is the table I'm trying to create. I can find the IRRs using Solver. For instance, in cell H87, you can see the NPV for a person living to the end of the time horizon. You can set H87 as the target cell, equal the value to 0, and change cell H89 to obtain the IRR ("rate"). In this instance, the IRR is 3.96%, which I have manually input into the IRR table.


    What I'm trying to do is find a way to create an entire IRR table this way, without manually inputting the entire thing. Solver will obviously give me the answers, but it only does so one at a time, and alters my NPV table.
    Attached Files Attached Files
    Last edited by Jakila2; 08-19-2013 at 09:16 PM.

  4. #4
    Registered User
    Join Date
    10-02-2009
    Location
    Arlington, VA, USA
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Goal Seek, Solver, and an IRR Workaround

    Should I post to the VBA forum?

    Still haven't found a good solution. Essentially, I need something that has the functionality of Solver, but that I can use to create an entirely new table of data (based on an existing table).

    Found a program called "Solver Table", but it doesn't seem to do what I need it to do. Not sure if there are any other add-ons out there that would expand upon Solver.

    In good news, I did find a way to get the Excel IRR function to work properly, but it's a bit labor intensive. The IRR function includes a "guess" feature. I can insert guesses for all my cells and IRR works so long as the guess is close. But obviously, this can be quite laborious when I'm doing this for 10 different scenarios, all of which will have about 960 cells of data to calculate IRR for. The guesses can carry over for a few cells normally, but still ... it would likely mean I'd have to manually edit the formula about 1,000 times.
    Last edited by Jakila2; 08-21-2013 at 02:44 PM.

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Goal Seek, Solver, and an IRR Workaround

    Dosen't this formula work

    =IFERROR(IRR(C$4:C4),"")

    It does for me

    What's your Excel version?
    Attached Files Attached Files
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  6. #6
    Registered User
    Join Date
    10-02-2009
    Location
    Arlington, VA, USA
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Goal Seek, Solver, and an IRR Workaround

    Strangely, I always get blank cells using that exact formula. Which version of Excel do you use?

    Though, the "IFERROR" is a great idea that I hadn't thought of using before. Maybe I can rig that formula to continually test different "guesses" for IRR. That way, I don't have to manually edit the "guess" values for each cell till Excel gives me a proper result.

    Thanks for the tip!
    Last edited by Jakila2; 08-21-2013 at 03:35 PM.

  7. #7
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Goal Seek, Solver, and an IRR Workaround

    Strangely, I always get blank cells using that exact formula. Which version of Excel do you use?
    You'd get blank cells only if all your values are negative. Copy the formula down and you'll see the results pop up.

    I am on Excel 2010 as my profile suggests

  8. #8
    Registered User
    Join Date
    10-02-2009
    Location
    Arlington, VA, USA
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Goal Seek, Solver, and an IRR Workaround

    There might be some difference between Excel 2007 and Excel 2010 on IRR. Perhaps Microsoft improved it due to complaints in prior versions, because my Excel 2007 always gives errors for IRR if there are more than around 60-some cash flows and you don't enter a "guess".

    However, looks like I can use the "IFERROR" function to fix this problem. It creates a pretty absurd looking formula, but it seems to work.

    Here's what it looks like:

    =IF(AC99>0,IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IFERROR(IRR(AC$6:AC99,0),IRR(AC$6:AC99,-0.05)),IRR(AC$6:AC99,-0.1)),IRR(AC$6:AC99,-0.15)),IRR(AC$6:AC99,-0.2)),IRR(AC$6:AC99,-0.25)),"U-25%")," ")
    Thanks again for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Using Solver vs Goal Seek
    By JimDandy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-26-2013, 08:18 AM
  2. [SOLVED] Solve formula with another way than solver/goal seek
    By keis386 in forum Excel General
    Replies: 6
    Last Post: 08-02-2012, 10:21 AM
  3. Goal Seek and SOLVER
    By dalebirrell in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 04-22-2010, 05:59 AM
  4. Excel Goal Seek vs. Solver
    By Adrian T in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2005, 10:40 AM
  5. goal seek vs solver
    By neoschenker in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-03-2005, 12:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1