Not exactly sure how you would like your data to look, but using Dif (or Lag) in formula should work
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(7),
Compress File When Saved(1),
New Column("Column 1",
Numeric,
"Continuous",
Format("Best", 12),
Set Values([1, 1, 2, 3, 4, 4, 4, 5])
)
);
dt << New Column("Col", Numeric, Continuous, Formula(
As Constant(val = :Column 1);
If(Dif(:Column 1) == 0,
val += :Column 1
,
val = :Column 1;
);
val;
));
-Jarmo