I want to interpolate two values in Excel

  • Thread starter Thread starter steven757
  • Start date Start date
  • Tags Tags
    Excel
AI Thread Summary
To interpolate values in Excel between two points, users can create a formula that accounts for varying numbers of cells between the values. The suggested method involves using a counting column to determine the number of cells between the starting value in cell A1 and the ending value in cell A20. Additionally, the ROW or ROWS functions can be utilized to find the number of cells for interpolation. This approach allows for a linear distribution of values between 0 and 1, regardless of the number of intervening cells. The discussed methods have proven effective for users seeking to automate the interpolation process in Excel.
steven757
Messages
7
Reaction score
1
Summary:: Interpolation

Hi,

I want to interpolate two values in Excel.

The first value is in cell "A1" and has the value "0". The second value is in cell "A20" and has the value "1".

I now want to interpolate the values in cells "A2" to "A19" in such a way that a linear straight line is created between the values "0" and "1".

The particular problem is that the cell numbers between "0" and "1" are not always the same size. Sometimes there are e.g. 10 cells between "0" and "1" and other times there are e.g. 25 cells between "0" and "1". Each interpolation has a different number of cells between the value "0" and the value "1".

Is it possible to create a formula that automatically takes into account the different numbers of cells between "0" and "1" and calculates the interpolation between "0" and "1"?

Many thanks for your help.

Steven

[Moderator's note: moved from a technical forum. Member has been advised to show some effort.]
 
Last edited by a moderator:
Physics news on Phys.org
It is no problem if you know the number of cells in between. If you don't, then create a column that only counts the cell: A1=1, A2=A1+1, A3=A2+1 etc. Then you can take the difference to know the number of cells, say N.
 
  • Like
Likes FactChecker
Hi fresh_42,

Thanks for your simple advice. I have tried some other solutions but your simple approach is the best.

Thanks.
 
you could also use the ROW function (on the two end points) to find your number of cells between.
 
Hi gmax137,

thanks for your great suggestion, I have tried it immediately and it works fine. But I use the ROWS function instead of the ROW function.
 
I tried to combine those 2 formulas but it didn't work. I tried using another case where there are 2 red balls and 2 blue balls only so when combining the formula I got ##\frac{(4-1)!}{2!2!}=\frac{3}{2}## which does not make sense. Is there any formula to calculate cyclic permutation of identical objects or I have to do it by listing all the possibilities? Thanks
Essentially I just have this problem that I'm stuck on, on a sheet about complex numbers: Show that, for ##|r|<1,## $$1+r\cos(x)+r^2\cos(2x)+r^3\cos(3x)...=\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}$$ My first thought was to express it as a geometric series, where the real part of the sum of the series would be the series you see above: $$1+re^{ix}+r^2e^{2ix}+r^3e^{3ix}...$$ The sum of this series is just: $$\frac{(re^{ix})^n-1}{re^{ix} - 1}$$ I'm having some trouble trying to figure out what to...
Back
Top