Hi,
The output of vfind should be in vector form, therefore you need to define a dataset to temporarily save it and use the value from that dataset:
loop(ii,1,page.nlayers)
{
page.active=$(ii);
dd = Max(col(2));
[book1]4!cell($(ii),1) = dd;
dataset ds1;
vfind ix:= 2 v:=dd ox:=ds1;
[book1]4!cell($(ii),2) = ds1[1];
}
Give this a try and see how it goes!
Regards!
Sean
OriginLab Tech.