I'm trying to create a script that will delete a row from my table if the ID and two values are the same as the row before it. I cant delete all duplicate rows because there is a "run number" column that is unique to each row. Does anyone know why my code isn't working?
// Delete Duplicate Rows (re-entries)
NRows = N Rows (dt) ;
For ( i = 1, i<= NRows, i++,
If ( dt:ID[i] == dt:ID[i+1] & Data Table ("Sheet1"):value1[i] ==
dt:value1[i+1] & dt:value2[i] == dt:value2[i+1],
{ dt << Delete Rows (i), i --}
)
);