Thank you for the more complete test file and for your testing of my initial code.
Here is a new version of the format
If( Row() > 1,
If( :TOOL != Lag( :TOOL ) | :SITE != Lag( :SITE ) | Row() == N Rows( Current Data Table() ),
TargetValue = :SUB_TOOL[Row() - 1];
:Active2[Row() - 1] = "Active";
For( i = Row() - 1, i >= 1, i--,
If( :SUB_TOOL[i] == TargetValue,
:Active2[i] = "Active",
Break()
)
);
)
);
If( Row() == N Rows( Current Data Table() ),
"Active",
"Replaced"
);
You will need to change the column references in the code of "Active2" to the column name you are giving the column.
Now my question to you is:
Do you understand how the formula work?
If not, you need to study the code and ask question about the code, so you understand it, and can make changes in the future that may be necessary.
Jim