I want to interpolate two values in Excel

  • Thread starter Thread starter steven757
  • Start date Start date
  • Tags Tags
    Excel
Click For 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

Similar threads

Replies
1
Views
2K
Replies
7
Views
3K
Replies
27
Views
4K
  • · Replies 31 ·
2
Replies
31
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 7 ·
Replies
7
Views
1K
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 61 ·
3
Replies
61
Views
4K