| T O P I C R E V I E W |
| zknauss |
Posted - 01/24/2023 : 11:29:42 AM Good afternoon, I have the below script which I'm using to sort data based on pattern of change. Currently its operating how I intended but instead of outputting letters I'd like it to output Arrows representing the direction of change specifically what I'd like to have it output is below:
A = up arrow, color (red), shortcut key code: 2191 B = horrizontal bar, color (black), code: 2015 C = down arrow, color (blue), code: 2193
Thanks in advance for any help with this
for (int i = 1; i <= wks.ncols; i++ ){ range aa = [NCONFreReg]"Frequency_T1"!$(i+1); range bb = [NCONFreReg]"Frequency_T2"!$(i+1); %j=wcol(i)[1]$; wcol(i)[2]$ =
if(bb[1]>0.01&&bb[1]>=aa[1]&&bb[2]<=aa ,"A",
if(bb[1]>0.01&&bb[1]>=aa[1]&&aa ==0&&bb[2]!=0,"A",
if(bb[1]>0.01&&bb[2]>aa && bb[2]<aa[9] && %j!="B","B",
if(bb[1]>0.01&&bb[1]<aa[1] && bb[2]>aa[9] && %j!="B","C","I")$)$)$)$; }
ZTK |
| 6 L A T E S T R E P L I E S (Newest First) |
| YimingChen |
Posted - 01/24/2023 : 5:30:45 PM 1. You are missing the dollar sign. Try: col(1)[1]$=↑ 2. set font color: wcellcolor type:=1 irng:=col(B) color:=2 |
| zknauss |
Posted - 01/24/2023 : 4:00:55 PM Also is there a way to set the color of the arrow/symbol created? Thanks!
ZTK |
| zknauss |
Posted - 01/24/2023 : 3:52:59 PM I'll give it a try in my script would the " " be nessasary for this to work? I tried using, col(1)[1]="↑"; and col(1)[1]=↑; but got a error message or an output of -- in the designated cell.
ZTK |
| YimingChen |
Posted - 01/24/2023 : 3:33:44 PM It works to include unicode symbols in the script. See below:
 |
| zknauss |
Posted - 01/24/2023 : 2:34:45 PM I'm not sure how I'd impliment that in the for/if statment or pull other symbols such as a horizontal bar.
ZTK |
| YimingChen |
Posted - 01/24/2023 : 2:02:51 PM Maybe you can use the Xfunction insertArrow: https://www.originlab.com/doc/X-Function/ref/insertArrow
|