I would most likely use matrix calculations

```
Names Default To Here(1);
dt = New Table("Untitled 14",
Add Rows(10),
Compress File When Saved(1),
New Column("e",
Numeric,
"Continuous",
Format("Best", 12),
Set Values([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
),
New Column("t",
Numeric,
"Continuous",
Format("Best", 12),
Set Values([2.2, 3.3, 4.2, 1.2, 5, 7.5, 2.4, 5.6, 8.1, 1.1])
)
);
dt << New Column("s", Numeric, Continuous, << Set Each Value(
As Constant(
es = :e << get values;
ts = :t << get values;
f_row = Min(Loc(ts, 4.2));
t_idx = Index(f_row, f_row + 2);
s = Sum(ts[t_idx]);
);
If(row() == f_row,
s,
,
.
);
));
```

-Jarmo