Page 1 of 1

Table: Putting texts in cell using loop

Posted: Tue Mar 11, 2014 4:50 am
by banhbengconuong
I am creating the table with the rows are different criteria and columns are different variables. May I use a loop for putting the text in headers of each row and column?
For example, I tried the following but it fails for the headers of rows.

table(5,2) mytab
tab3(1,1) = "Variables/Crit"
tab3(1,2) = "Age"
tab3(1,3) = "Gender"

!row = 1
for %x Mean Median Max Min Std
!row = !row + 1
tab3(!row,1) = "{%x}"
next

Does anyone know how to do it? Because the criteria are about 20 ones. Thanks a bunch for your help!

Re: Table: Putting texts in cell using loop

Posted: Tue Mar 11, 2014 3:53 pm
by EViews Gareth

Code: Select all

!row = 1 for %x Mean Median Max Min Std !row = !row + 1 tab3(!row,1) = %x next

Re: Table: Putting texts in cell using loop

Posted: Tue Mar 11, 2014 6:25 pm
by banhbengconuong
thank you a lots, it works perfectly.

Code: Select all

!row = 1 for %x Mean Median Max Min Std !row = !row + 1 tab3(!row,1) = %x next