Hey Pros,
i am not sure if title explains all my problem anyways ..... i will try to explain my problem in Detailed manner. Here is a sample table we are dealing with right now.
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 240"]
<tbody>[TR]
[TD]Source Roadmap[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 284"]
<tbody>[TR]
[TD]Line Item as Reported [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]Code As Reported [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]Units[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]Data Type[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1999
[/TD]
[TD]2000[/TD]
[TD]2002[/TD]
[TD]2003[/TD]
[TD]2004[/TD]
[/TR]
[TR]
[TD][TABLE="width: 171"]
<tbody>[TR]
[TD]GDP by expenditure>Nominal series>USD>Total[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]P per capita (current US$)[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]AGAJ[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]LCU[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]actual
[/TD]
[TD]45345[/TD]
[TD]554[/TD]
[TD]445[/TD]
[TD]455544[/TD]
[TD]7777[/TD]
[/TR]
[TR]
[TD][TABLE="width: 171"]
<tbody>[TR]
[TD]GDP by expenditure>Nominal series>% of total>General government final consumption expenditure[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 284"]
<tbody>[TR]
[TD]Gross capital formation (current LCU)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]AFJK[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]LCU[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]actual[/TD]
[TD]453[/TD]
[TD]453[/TD]
[TD]455[/TD]
[TD]4556[/TD]
[TD]4838[/TD]
[/TR]
[TR]
[TD][TABLE="width: 171"]
<tbody>[TR]
[TD]Female>% of total[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 284"]
<tbody>[TR]
[TD]Imports of goods and services (current LCU)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]AFJT[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]LCU[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]actual[/TD]
[TD]456[/TD]
[TD]45645[/TD]
[TD]45646[/TD]
[TD]45456[/TD]
[TD]54533[/TD]
[/TR]
</tbody>[/TABLE]
Now from this worksheet i have to create another table with figures from 2002 to 2004 or on wards. I want to use codes under Code As Reported to identify the column because they are unique. My resulting sheet should look like this
[TABLE="width: 500"]
<tbody>[TR]
[TD]Code as reported [/TD]
[TD]2003[/TD]
[TD]2004[/TD]
[TD]2005[/TD]
[TD]2006[/TD]
[/TR]
[TR]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]AGAJ[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]455544[/TD]
[TD]7777[/TD]
[TD]7777[/TD]
[TD]56354[/TD]
[/TR]
[TR]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]AFJK[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]654745[/TD]
[TD]46928[/TD]
[TD]69119[/TD]
[TD]3197[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have used quite number of codes however i am unable to get the required result. I am new to this so i am having some of problems in coding. some of the hurdles i am facing are as follows;
1. Extracting string of number from year to year.(2002-2018) from data (1990-2018)
2. Writing flexible code which could shuffle between the number of data i want to extract
3. Shuffling between year on year.
Any pros out there kindly help or get back to me if you need any further clarifications
i am not sure if title explains all my problem anyways ..... i will try to explain my problem in Detailed manner. Here is a sample table we are dealing with right now.
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 240"]
<tbody>[TR]
[TD]Source Roadmap[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 284"]
<tbody>[TR]
[TD]Line Item as Reported [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]Code As Reported [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]Units[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]Data Type[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]1999
[/TD]
[TD]2000[/TD]
[TD]2002[/TD]
[TD]2003[/TD]
[TD]2004[/TD]
[/TR]
[TR]
[TD][TABLE="width: 171"]
<tbody>[TR]
[TD]GDP by expenditure>Nominal series>USD>Total[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]P per capita (current US$)[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]AGAJ[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]LCU[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]actual
[/TD]
[TD]45345[/TD]
[TD]554[/TD]
[TD]445[/TD]
[TD]455544[/TD]
[TD]7777[/TD]
[/TR]
[TR]
[TD][TABLE="width: 171"]
<tbody>[TR]
[TD]GDP by expenditure>Nominal series>% of total>General government final consumption expenditure[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 284"]
<tbody>[TR]
[TD]Gross capital formation (current LCU)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]AFJK[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]LCU[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]actual[/TD]
[TD]453[/TD]
[TD]453[/TD]
[TD]455[/TD]
[TD]4556[/TD]
[TD]4838[/TD]
[/TR]
[TR]
[TD][TABLE="width: 171"]
<tbody>[TR]
[TD]Female>% of total[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 284"]
<tbody>[TR]
[TD]Imports of goods and services (current LCU)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]AFJT[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]LCU[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]actual[/TD]
[TD]456[/TD]
[TD]45645[/TD]
[TD]45646[/TD]
[TD]45456[/TD]
[TD]54533[/TD]
[/TR]
</tbody>[/TABLE]
Now from this worksheet i have to create another table with figures from 2002 to 2004 or on wards. I want to use codes under Code As Reported to identify the column because they are unique. My resulting sheet should look like this
[TABLE="width: 500"]
<tbody>[TR]
[TD]Code as reported [/TD]
[TD]2003[/TD]
[TD]2004[/TD]
[TD]2005[/TD]
[TD]2006[/TD]
[/TR]
[TR]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]AGAJ[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]455544[/TD]
[TD]7777[/TD]
[TD]7777[/TD]
[TD]56354[/TD]
[/TR]
[TR]
[TD][TABLE="width: 53"]
<tbody>[TR]
[TD]AFJK[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]654745[/TD]
[TD]46928[/TD]
[TD]69119[/TD]
[TD]3197[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I have used quite number of codes however i am unable to get the required result. I am new to this so i am having some of problems in coding. some of the hurdles i am facing are as follows;
1. Extracting string of number from year to year.(2002-2018) from data (1990-2018)
2. Writing flexible code which could shuffle between the number of data i want to extract
3. Shuffling between year on year.
Any pros out there kindly help or get back to me if you need any further clarifications