Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
I have an Excel file (as you can see below), with 2 columns, that are: Company and Ticker.
Company | Ticker |
AZUL | AZUL4 |
AZUL | AZUL3 |
GOLL | GOLL4 |
GOLL | GOLL3 |
GOLL | GOLL11 |
GERDAU | GGBR3 |
GERDAU | GGBR4 |
GERDAU | GGBR11 |
I would like to run a loop in my script, but 1 LOAD looping through Company and another LOAD looping through Ticker?
Is it possible?
Thanks
The below solution lets you loop with Company first, then nested loop of Ticket in it.
A:
Load Company, Ticket
From Table A;
Let vCompanyNo=1;
For vCompanyNo= 1 to NoofRows('A')
LET vCompanyLoop= Peek('Company', vCompanyNo-1, 'A');
TRACE with $(vCompanyLoop);
Let vTickerNo=1;
For vTickerNo= 1 to NoofRows('A')
LET vTickerLoop= Peek('Ticker', vTickerNo-1, 'A');
TRACE $(vTickerLoop);
******
Script
*****
Trace $(vTickerLoop) End;
Next
Trace $(vCompanyLoop) End;
Next
Trace Both Loops Completed;