+ Reply to Thread
Results 1 to 7 of 7

Interpolation of data

  1. #1
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Interpolation of data

    I'm trying to interpolate data from some tables and I'm having some issues.


    1. This is my first Vlookup that works. I'm looking to interpolate across columns
    IFERROR((VLOOKUP(MDT,'BDD Library.xlsm'!B313A1,MATCH(MDT,'BDD Library.xlsm'!A1Temps,0),0))*1000," ")
    If I have 120 as my 'MDT', I want to find my 'A1Temps' for my 'B313A1', which is my A105 or A106 B

    2. This is my second Vlookup that works. I'm looking to interpolate between rows
    VLOOKUP(T,INDIRECT("'BDD Library.xlsm'!" & Class),MATCH(Rating,'BDD Library.xlsm'!FRating),0)
    If I have a 'T' of 130 and a 'FRating' of 150, i'm looking to interpolate 265 and 260


    I'm fairly new to excel so any help would be appreciated. I'm use to working with Access .
    I have downloaded a free interpolation add-on but i can't figure it out. I'm open to any other free add-ons or just coding it in.
    Attached Files Attached Files
    Last edited by Cobra17; 04-22-2020 at 10:17 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,824

    Re: Interpolation of data

    What do you mean here by interpolate?

    There are instructions at the top of the page explaining how to attach your sample workbook.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Re: Interpolation of data

    added sample

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,824

    Re: Interpolation of data

    Thank you. Now you need to explain what we are looking at. If these are results tables, where is the source data? If not, where are the results mocked up? Where are the formulae you mentioned???

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

    Re: Interpolation of data

    I don't quite understand example 1.

    Example 2 looks like bilinear interpolation, which shows up with some regularity on the board:
    Two possible approaches here: https://www.excelforum.com/excel-for...rpolation.html
    A little more complicated situation: https://www.excelforum.com/excel-pro...le-graphs.html
    Another example: https://www.excelforum.com/excel-gen...ml#post4300787

    There are more, but those should suffice to show the basic steps to a bilinear interpolation.

    Instinct suggests that your first example is basically a 1D interpolation (with a lookup to decide which "row" to use in the interpolation). Recognizing that bilinear interpolation is often just 1D interpolation applied twice, What you learn from the 2D interpolations for example 2 may provide the solutions for example 1.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Forum Contributor
    Join Date
    04-16-2020
    Location
    Alberta, Canada
    MS-Off Ver
    365
    Posts
    216

    Re: Interpolation of data

    I messed around with it and still can't figure it out. I've attached the trimmed out workbooks.

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

    Re: Interpolation of data

    Your sample does not include any of your attempts to implement any of the given suggestions, so I'm not sure where you got stuck. Here's what I did in Workbook.xlsm!Design Data.

    1) I need to know the row number for the material in A1:A4 (be wary of merged cells in the future. they have a way of creating problems). This is a simple MATCH() function. In M14, I enter =MATCH(A14,'[BDD Library.xlsm]TableA1'!$A$2:$A$4,1). Note the mix of relative and absolute references and note the use of the approximate match option in the 3rd argument.
    2) I need the column number for the temperature. This is also a MATCH() function. In N14, I enter =MATCH(MDT,'[BDD Library.xlsm]TableA1'!$C$1:$Z$1,1)
    3) Now I know where to find the data in the source table, I can simply extract the four values that I need for the 1D interpolation with INDEX() functions.
    3a) In O14, =INDEX('[BDD Library.xlsm]TableA1'!$C$1:$Z$1,$M14) to get the lower temperature value.
    3b) In P14, =INDEX('[BDD Library.xlsm]TableA1'!$C$1:$Z$1,$M14+1) to get the upper temperature value.
    3c) In Q14, =INDEX('[BDD Library.xlsm]TableA1'!$C$2:$Z$4,$N14,$M14) to get the value corresponding to the lower temperature value and the material.
    3d) In R14, =INDEX('[BDD Library.xlsm]TableA1'!$C$2:$Z$4,$N14,$M14+1) to get the value corresponding to the upper temperature value and the material.
    4) With all of these values extracted from the source data, the linear interpolation is a simple algebraic expression. (yhi-ylo)*(T-Tlo)/(Thi-Tlo)+ylo Enter that formula into F14 (obviously substituting the appropriate cell references for the values).

    The procedure in Flanges will be basically the same -- except that you have the complication of going from 1D to 2D bilinear interpolation where you will need to extract eight values -- Tlo, Thi, ratinglo, ratiinghi, and the four y values that correspond. But the process is still the same -- A MATCH() function to find the row #, a MATCH() function to find the column #, INDEX() functions to extract the eight values, then combine them all into the proper bilinear interpolation formula (see the Wikipedia links in the previous threads).

    Since you may be unfamiliar with these functions:
    INDEX() help file: https://support.office.com/en-us/art...2-b56b061328bd
    MATCH() help file: https://support.office.com/en-us/art...9-533f4a37673a

+ 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. 3D interpolation for missing data
    By FlorisH in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-12-2019, 05:04 PM
  2. [SOLVED] Linear interpolation of hourly data into 15 minute data
    By anupsubudhi in forum Excel General
    Replies: 7
    Last Post: 10-17-2018, 08:31 AM
  3. Interpolation of data on graph
    By Tossi in forum Excel General
    Replies: 2
    Last Post: 03-12-2015, 01:59 AM
  4. Data Interpolation & Formulas
    By Dan_V in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-20-2013, 04:14 AM
  5. Replies: 1
    Last Post: 03-06-2013, 09:37 AM
  6. Replies: 0
    Last Post: 07-24-2008, 02:27 PM
  7. [SOLVED] how can i perform interpolation on a data set?
    By Sathya in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-30-2006, 03:15 AM

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