在多行中查找值並輸出“Go / NoGo你好,
我希望能夠針對特定數據集搜索多行數據,然後在新列中輸出如果在行內找到數字則返回,如果沒有則返回NoGo。
我想要一個這樣做的公式,
IF((C1thruC50)包含(2或5或8),然後是“GO”,Else“NOGO”)
提前致謝!
Re:在多行中查找值並輸出“Go / NoGo @ NDENNIS418 ,
使用矩陣這樣做要容易得多。這是一種做你想做的事情的方法:
// I am using a sample data set for illustrative purposes only
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// Extract Numeric Data as a matrix
Mat = dt << Get As Matrix;
// Define your condition
Condition = (Mat == 12 | Mat == 60 | Mat == 85); // edited the values to show some sample results
// Now you can subset the values easily like so
Mat1 = Mat[Loc(Condition)];
Re:在多行中查找值並輸出“Go / NoGo創建一個新的字符列,其中包含您要提供的任何名稱,然後將下面的代碼複製為該列的公式
result = "NoGo";
For( c = 1, c <= 50, c++,
Show( Column( c )[Row()] );
If(
Column( c )[Row()] == 2 | Column( c )[Row()] == 5 |
Column( c )[Row()] == 8,
result = "Go";
Break();
);
);
result;