Select some of cell content

For questions regarding programming in the EViews programming language.

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

DanielArmani
Posts: 12
Joined: Wed Apr 13, 2011 4:08 am

Select some of cell content

Postby DanielArmani » Wed Dec 07, 2011 9:36 am

Hi there,

I wonder if there is a way to get some of the information from cell content when we collecting data from tables?

To explain, I need to get result from cointegration test result table which says " Trace test indicates no cointegration at the 0.05 level" or " Trace test indicates 1 cointegrating eqn(s) at the 0.05 level". this message is in one cell, I need to collect only the number "1" or "no" from the cell not all the message.

Please advise me.

Regards

Daniel

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

Re: Select some of cell content

Postby EViews Gareth » Wed Dec 07, 2011 9:44 am

Extract that cell into a string, then use the string manipulation tools, such as @instr, @left, @mid, @right, to extract the bit you want.

For this particular case, something like this would do:

Code: Select all

%mystring2 = @mid(%mystring1,23,2)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests