interpolate
Assuming that your data are in A1:B11, then C2 can be calculated as
=FORECAST(ROW(A2),B1:B3,ROW(A1:A3))
etc.
If you want a more automatic process, then C2 can contain the array formula
(entered with Ctrl-Shift-Enter)
=IF(ISNUMBER(B2),B2,FORECAST(ROW(A2),$B$1:$B$11,IF ((ROW($A$1:$A$11)=MAX(IF(ISNUMBER(B$1:B1),ROW(A$1: A1))))+(ROW($A$1:$A$11)=MIN(IF(ISNUMBER(B3:B$11),R OW(A3:A$11)))),ROW($A$1:$A$11))))
which you can then copy down through C10
Jerry
"tom ossieur" wrote:
Hi,
column A months
column B values, but for some months the data are missing
how to create in column C a table of values assigning values to the missing
months, based on a linear equation, connecting the last previous value and
the first next value
so how to create column C?
e.g.
A B C
Feb-97 27 27
Mar-97 25
Apr-97 23 23
May-97 26 26
Jun-97 27
Jul-97 28 28
Aug-97 27.8
Sep-97 27.6
Oct-97 27.4
Nov-97 27.2
Dec-97 27 27
Thanks!
tom
|