Indexing with a Table

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

geoanstats
Posts: 10
Joined: Wed Oct 03, 2018 8:58 am

Indexing with a Table

Postby geoanstats » Fri Jan 24, 2020 10:14 am

I have a table with ISO codes in one column and a value in another. I want to loop through ISO codes and then lookup the value, essentially like a VLOOKUP function in Excel. Essentially;

for %iso USA

!index = **find the row that the USA is in on the table**

string wanted_value = Table(!index,3)

next

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Indexing with a Table

Postby EViews Gareth » Mon Jan 27, 2020 9:48 am

You just have to loop through the rows one at a time to find the entry you want.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests