+ Reply to Thread
Results 1 to 4 of 4

Interpolate between data - NOT WORKING?

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Interpolate between data - NOT WORKING?

    Hi, I have lists with data for 3 different vehicles' speed vs grade %. I'm trying to interpolate for a given grade, the speed the vehicle will travel! I get values for the first 2 vehicles (although not very accurate), but for the 3rd one I keep getting errors. I have no idea why. Attached is an extract from my worksheet. Any help or alternative method will be much appreciated. Thanks!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Interpolate between data - NOT WORKING?

    I haven't got time to go through it in detail. One observation: In 1 and 2, you have "grade" sorted low to high. In 3, you appear to have grade sorted high to low, but you have not adjusted the 3rd argument of the MATCH() function to account for this.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    01-08-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Interpolate between data - NOT WORKING?

    Thank you MrShorty, that was indeed the issue (can't believe I missed that)! However, it doesn't seem as if my interpolation is working accurately. Can you maybe suggest another method/formula? Thanks!

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,811

    Re: Interpolate between data - NOT WORKING?

    It's kind of hard for me to debug other's work, because I don't have the newer versions of Excel. A few suggestions that may help you learn how to debug these things yourself:

    0) I'm sure the regulars around here get tired of me suggesting this, but, if you are not married to Excel, QuattroPro (and maybe other spreadsheets) has a built in linear interpolation (@LINTERP) function. It might make this problem a lot easier to solve.
    1) Probably the first thing I would do would be to call the "formula evaluation" tool off of whatever passes for the formula auditing menu in the newer version. When you have several functions nested like this (match within offset within forecast), this tool will allow you to take one incidence of the function, step through the formula to see a) if the match part of the function is returning the expected result and b) if the offset part of the formula is returning the expected result). Gut feel on this problem is that either match or offset is returning something unexpected, which is causing incorrect results.
    2) It seems that our goal on forums like this is to cram as many nested functions into a single cell as we can. I tend to buck that trend, especially when debugging multiple nested functions like this. Put the match part of the function in its own cell, then put the offset part of the function in its own array, then finally put the forecast function in its own cell. This allows me to see each part of the function separately, which makes it a lot easier to see where the overall formula is going wrong.
    As noted, I suspect that, for some reason, your offset/match combination is not returning the right range for a given input value, which is why you are getting erroneous results.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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