+ Reply to Thread
Results 1 to 7 of 7

Interpolation/aproximation of unknow values by trend line

  1. #1
    Registered User
    Join Date
    06-16-2022
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    18

    Interpolation/aproximation of unknow values by trend line

    Hello guys,

    I've got a problem which i am not sure how to handle.

    I have few values from very low quality chart, and i want excel to fill all other gaps - it might not be as accurate as the real one. The easiest way is to do that by trend line, but as far as I know excel only displays the formula for the trend line and i cannot "acquire" it in any cell. I know i can do that by hand but i want to have this process automated to do something like shown in attachment.

    I have in attachment one sheet working as catalog of pumps (inlcuding inside one picutre of pump, one picture of chart, model, company and values which are read from chart (y) scalled to the range of x 0 to 100 (step by 2)) In the second sheet (row 2, column B) we have list to choose which pump we want from our catalog - along with changing these two pictures I want excel to get these written down by hand values copied to row 24 columns C:BA.

    And after all that preparations, how can i make excel to fill the gaps in my values? Or give me trend line formula? Would be awesome if that could be done without VBA because i certainly do not know how to use. I've tried a lot with REGLIW, and other like that but i do not quiet understand how it works.

    The main goal of it is to after some diffrent calculations I could go and check exact value of that pump in desired spot.

    Or maybe u have diffrent idea how can i make it work.

    I hope guys you will help me with that
    ASDG
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Interpolation/aproximation of unknow values by trend line

    You can use LINEST to get the equation of the line, the format needed to get a 3rd order polynomial is:

    =LINEST(y_values,x_values^{1;2;3})

    This will return an array of 4 cells. If the formula of the line is:

    y = ax^3 + bx^2 + cx + d

    Then the 4 cells are in the order a,b,c,d.

    For your inputs you need to filter out the blank cells. In 365 you can just use FILTER:

    =LINEST(FILTER(C24:BA24,C24:BA24<>""),FILTER(C22:BA22,C24:BA24<>"")^{1;2;3})

    I see you have 2019, so another method would be needed. Something like this might work (it's difficult for me to check, see attached file):

    =INDEX(LINEST(INDEX($C$24:$BA$24,AGGREGATE(15,7,IF($C$24:$BA$24<>"",COLUMN($C$24:$BA$24)-COLUMN($C$24)+1,""),COLUMN(A1:INDEX(1:1,COUNTA($C$24:$BA$24))))),INDEX($C$22:$BA$22,AGGREGATE(15,7,IF($C$24:$BA$24<>"",COLUMN($C$24:$BA$24)-COLUMN($C$24)+1,""),COLUMN(A1:INDEX(1:1,COUNTA($C$24:$BA$24)))))^{1;2;3}),1)

    Change the 1 and the end (in red) to 2, 3, 4 to get the other parameters.

  3. #3
    Registered User
    Join Date
    06-16-2022
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    18

    Re: Interpolation/aproximation of unknow values by trend line

    I can see that my excel is struggling with that part of your formula

    A1:INDEX(1:1,COUNTA($C$24:$BA$24))

    Also did u attach any file because i do not see anything.

  4. #4
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Interpolation/aproximation of unknow values by trend line

    Oops, I thought I had attached a file but trying to do it again it seems it was too large. I've deleted the pictures and the other sheet as they are redundant.

    Does it work now?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-16-2022
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    18

    Re: Interpolation/aproximation of unknow values by trend line

    Works brilliant!

    Now i have in this 4 cells, coefficients a,b,c,d and they will adapt every time i change my known values? That's great! Also one more question not related to the first question but to the file u've seen. How can i manage to get diffrent sets of this know values typed by hand in catalog sheet dependent on choosen model in row 2 column B?

  6. #6
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Interpolation/aproximation of unknow values by trend line

    You could use something like this in C24:

    =INDEX('Katalog - pompy'!$E$1:$BC$2,MATCH('Dane - pompa'!$B$2,'Katalog - pompy'!$C$1:$C$2,0),COLUMN()-COLUMN($C$24)+1)

    The problem is with blank cells; it's difficult to get these to remain blank. If the data will always be in the same columns then the simplest solution would be to just use the formula for the columns with data.

  7. #7
    Registered User
    Join Date
    06-16-2022
    Location
    Poland
    MS-Off Ver
    2019
    Posts
    18

    Re: Interpolation/aproximation of unknow values by trend line

    That's the main problem, data will be different to each pump. But i will try to work something out with that what u gave me!

    Thank you very much

+ 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. Replies: 2
    Last Post: 10-20-2015, 09:06 AM
  2. getting values off a trend line
    By jezh in forum Excel General
    Replies: 20
    Last Post: 09-05-2014, 01:20 PM
  3. Replies: 6
    Last Post: 03-14-2013, 06:32 PM
  4. Reference 'Equation of Trend Line' Values
    By R_S_6 in forum Excel General
    Replies: 4
    Last Post: 03-09-2010, 08:05 AM
  5. find trend line values
    By jezh in forum Excel General
    Replies: 1
    Last Post: 01-13-2010, 08:23 AM
  6. unknow line in msgbox
    By ilkamalo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-27-2009, 06:44 PM
  7. Getting values from a trend line
    By Andrew in forum Excel General
    Replies: 3
    Last Post: 02-22-2006, 02:30 PM

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