Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted

## So how do this quickly in excel using JSL?

As shown in figure：

Open Probe file：Copy the "Start Time" column and J column of the "DELL_RPNBR" file to excel

Enter formula I in excel[C5]：=IF(B5=MAX(B2:B8),A5,0)

How is this implemented in JMP with JSL?Can I only use the FOR loop?Thank you very much! 1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

## Re: So how do this quickly in excel using JSL?

I believe a formula below, or something close to this will work:

``````If(
:DELL_RPNBR == Max(
Max( :DELL_RPNBR[Index( Row() - 4, Row() - 1 )] ),
Max( :DELL_RPNBR[Index( Row() + 1, Row() + 4 )] )
),
:Start Time,
0
)``````
Jim
7 REPLIES 7
Highlighted

## Re: So how do this quickly in excel using JSL?

Input formula in column "Site" and calculate according to the following requirements:
If the value of a row in "DELL_RPNBR" column is the maximum of 3 rows above it and 3 rows below it, the value of the same row in "Start Time" column is returned; otherwise, "Site" row[] it is 0.
Highlighted

## Re: So how do this quickly in excel using JSL?

dt = Open( "\$SAMPLE_DATA/Probe.jmp" );
Highlighted

## Re: So how do this quickly in excel using JSL?

I believe a formula below, or something close to this will work:

``````If(
:DELL_RPNBR == Max(
Max( :DELL_RPNBR[Index( Row() - 4, Row() - 1 )] ),
Max( :DELL_RPNBR[Index( Row() + 1, Row() + 4 )] )
),
:Start Time,
0
)``````
Jim
Highlighted

## Re: So how do this quickly in excel using JSL?

Thank Jim!

If(
:DELL_RPNBR == Max(
Max( :DELL_RPNBR[Index( Row() - 4, Row())] ),
Max( :DELL_RPNBR[Index( Row() , Row() + 4 )] )
),
:Start Time,
0
)
Highlighted

## Re: So how do this quickly in excel using JSL?

This method is very practical !
Highlighted

Highlighted

## Re: So how do this quickly in excel using JSL?

it should be

If(:DELL_RPNBR==(Max(:DELL_RPNBR[Index(Row()-4,Row()+4)])),:Start Time,0)
Article Labels

There are no labels assigned to this post.