[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Precedence in Iif statement



PureBytes Links

Trading Reference Links


<SPAN 
class=162135112-23042002>Tomasz
<SPAN 
class=162135112-23042002> 
I havea set of 
stocks which belong to different indexes (Index0, Index1,Index2,...). For each 
index, I have a watchlist containing all the stocks of the index (watchlist0 
forIndex0,...). Each stock can belong to several indexes, so to several 
watchlists.
My purpose is to 
select automatically an index corresponding to a 
stock.
To do 
this, I write:

Index= 
WriteIf(<FONT 
color=#3cb371>InWatchList(<FONT 
color=#282828>0),"<SPAN 
class=162135112-23042002>Index0",<SPAN 
class=162135112-23042002> WriteIf<FONT 
color=#0000ff>(InWatchList<FONT 
color=#0000ff>(1<FONT 
color=#0000ff>),"<SPAN 
class=162135112-23042002>Index1",<SPAN 
class=162135112-23042002> WriteIf<FONT 
color=#0000ff>(InWatchList<FONT 
color=#0000ff>(2<FONT 
color=#0000ff>),"<SPAN 
class=162135112-23042002>Index2",<SPAN 
class=162135112-23042002>....<FONT 
color=#0000ff>);
<FONT color=#000080 
size=2>What will happen for a stock belonging to Index0 AND Index1 ?I 
guess that it will be assigned to Index0 as all the other "writeif" statement 
will be ignored if the first one is true.
<FONT color=#000080 
size=2>Do you confirm?
<FONT color=#000080 
size=2>Waz