Hi Jon,
I’m not exactly sure what do you really mean by “X is the value in Col(A) that coincides with the minimum value for Col(B)”, do you mean that you first get the minimum value of Col(B) and its row index, then use the value in Col(A) with the same row index as X? If so, you could define the X with Labtalk script in the Before Formula Script dialog, the detailed procedure is as below:
1. In the Set Column Values dialog, type the following scripts in the Before Formula Scripts text box (click the downward arrow button next to OK if the Before Formula Scripts text box is not opened).
//scripts start
//define a dataset to contain X's index
dataset ds;
//find the minimum value in Col(B)
dd=min(col(B));
//row indices of the minimum value(s) in Col(B) will be returned to dataset ds
vfind ix:=col(B) value:=dd ox:=ds;
//Get the X value
X=col(A)[ds[1]];
//scripts end
2. Type "col(A)-X" in the set values text box.
3. Click OK.
Best Regard,
Jessie
Originlab Corp.