@ > Home > Contents > Fill gaps in data Excel 97+

Assume there are values in A:A

- starting at A2 and ending somewhere in A:A
- with gaps between both (=empty cells)
- with a maximum gap of 98 cells,

use for interpolation along A:A the following to-be-filled-down array formula:

B2: {=B1+(INDEX(A:A,MIN(IF(A2:A101<>"",ROW(2:101))))-B1)*1/(MIN(IF(A2:A101<>"",ROW(2:101)))-ROW(A2)+1)}

          A     B    
    1                 
    2   1      1      
    3          2.5    
    4          4      
    5          5.5    
    6   7      7      
    7          4.333  
    8          1.666  
    9  -1     -1      

=IF(A2<>"",A2,aboveFormula) makes it the faster, the less gaps you have.

For a maximum gap of f.e. 998 adjust it to A2:A1001 and 2:1001, respectively.