Find values across multiple rows and output "Go/NoGoHello,
I want to be able to search accross multiple rows of data for a specific set of data and then output in a new column Go if the numbers are found within the row and NoGo if not.
I want a formula that does this,
IF((C1thruC50)contain(2 or 5 or 8), then "GO", Else "NOGO" )
Thanks in advance!
Re: Find values across multiple rows and output "Go/NoGo@NDENNIS418 ,
It is much more easier to do this using matrices. Here is a way to do what you want:
// 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: Find values across multiple rows and output "Go/NoGoCreate a new character column of whatever name you want to give it, and then copy the code below as the formula for the column
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;