Here are two different ways to do what you want

```
Names Default To Here( 1 );
dt = New Table( "Example",
Add Rows( 12 ),
New Column( "data",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [., ., ., ., ., ., ., 7, 8, 9, 10, 11] )
)
);
// Method one
dt << New Column( "Row", formula( Row() ) );
dt:Row << delete formula;
dt << sort( by( :Row ), order( descending ), replace table( 1 ) );
dt << New Column( "formula1",
formula( If( Is Missing( :data ), Lag( :data ), :Data ) )
);
dt:formula1 << delete formula;
dt << sort( by( :Row ), order( ascending ), replace table( 1 ) );
dt << delete columns( {Row} );
// Method two
dt << New Column( "formula2",
formula(
If( Row() == 1,
dMat = :data << get as matrix;
fMat = Matrix( Index( 1, N Rows( dMat ) ) );
fMat[0] = .;
fMat = fMat`;
For( i = N Rows( fMat ), i >= 1, i--,
If( Is Missing( dMat[i] ),
fMat[i] = dMat[i + 1],
fMat[i] = dMat[i]
)
);
);
fMat[Row()];
)
);
```

Jim