Dear friends,
I have adata base. In this data base the main comluns are hhcode, village, ward andproperty. The property column can take tree values (1.00, 2.00 and 3.00) and I havethree different necessities depending on the case:<o></o>
<o> </o>
1) Whenhhcode, village and ward are the same between two rows (for example in row 4and 5 these columns take the following values: hhcode=1.00, village= 12, ward=3) and property has the 2.00 value in the row 5, I will need that all the row 5up to row 4 following the data which are contented in this row, so from Mcolumn<o></o>
2) When hhcode, village and ward are the samebetween three rows (for example in row 6, 7 and 8 columns take the followingvalues: hhcode=1.00, village= 7, ward= 6) and property takes the 2.00 value inthe row 7 and the 3.00 value in row 8, I will need that all the data in the row7 up to row 6 following the data which are in this row, so from M column and allthe data in the row 8 up to row 6 following the data which are in this row sofrom Y column<o></o>
3) When hhcode, village and ward are the samebetween two rows (for example in row 9 and 10 columns take the followingvalues: hhcode=1.00, village= 8, ward= 5) and property takes the 3.00 value inthe row 10, I will need that all the row 10 up to row 9 from Y column
Thank you very much for your help.
Olearus
<colgroup><col style="width: 60pt;" width="80"> <col style="width: 35pt; mso-width-source: userset; mso-width-alt: 1718;" width="47"> <col style="width: 31pt; mso-width-source: userset; mso-width-alt: 1499;" width="41"> <col style="width: 28pt; mso-width-source: userset; mso-width-alt: 1353;" width="37"> <col style="width: 42pt; mso-width-source: userset; mso-width-alt: 2048;" width="56"> <col style="width: 30pt; mso-width-source: userset; mso-width-alt: 1462;" width="40"> <col style="width: 29pt; mso-width-source: userset; mso-width-alt: 1426;" width="39"> <col style="width: 37pt; mso-width-source: userset; mso-width-alt: 1792;" width="49"> <col style="width: 28pt; mso-width-source: userset; mso-width-alt: 1353;" width="37"> <col style="width: 32pt; mso-width-source: userset; mso-width-alt: 1536;" width="42"> <col style="width: 31pt; mso-width-source: userset; mso-width-alt: 1499;" width="41"> <col style="width: 29pt; mso-width-source: userset; mso-width-alt: 1426;" width="39"> <col style="width: 27pt; mso-width-source: userset; mso-width-alt: 1316;" width="36"> <col style="width: 35pt; mso-width-source: userset; mso-width-alt: 1682;" width="46"> <col style="width: 31pt; mso-width-source: userset; mso-width-alt: 1499;" width="41"> <col style="width: 23pt; mso-width-source: userset; mso-width-alt: 1133;" width="31"> <col style="width: 39pt; mso-width-source: userset; mso-width-alt: 1901;" width="52"> <col style="width: 24pt; mso-width-source: userset; mso-width-alt: 1170;" span="8" width="32"> <col style="width: 38pt; mso-width-source: userset; mso-width-alt: 1865;" width="51"> <col style="width: 48pt; mso-width-source: userset; mso-width-alt: 2340;" width="64"> <tbody>
</tbody>
I have adata base. In this data base the main comluns are hhcode, village, ward andproperty. The property column can take tree values (1.00, 2.00 and 3.00) and I havethree different necessities depending on the case:<o></o>
<o> </o>
1) Whenhhcode, village and ward are the same between two rows (for example in row 4and 5 these columns take the following values: hhcode=1.00, village= 12, ward=3) and property has the 2.00 value in the row 5, I will need that all the row 5up to row 4 following the data which are contented in this row, so from Mcolumn<o></o>
2) When hhcode, village and ward are the samebetween three rows (for example in row 6, 7 and 8 columns take the followingvalues: hhcode=1.00, village= 7, ward= 6) and property takes the 2.00 value inthe row 7 and the 3.00 value in row 8, I will need that all the data in the row7 up to row 6 following the data which are in this row, so from M column and allthe data in the row 8 up to row 6 following the data which are in this row sofrom Y column<o></o>
3) When hhcode, village and ward are the samebetween two rows (for example in row 9 and 10 columns take the followingvalues: hhcode=1.00, village= 8, ward= 5) and property takes the 3.00 value inthe row 10, I will need that all the row 10 up to row 9 from Y column
Thank you very much for your help.
Olearus
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
1 | hhcode | village | ward | Property | Home | Pond | Garden | CultivOne | CultivTwo | CultivThr | CultivIrri | Uncultiv | hhcode | village | ward | Property | Home | Pond | Garden | CultivOne | CultivTwo | CultivThr | CultivIrri | Uncultiv | hhcode | village |
2 | 0001 | 11 | 3 | 1.00 | 30.00 | 50.00 | 12.00 | 56.00 | 56.00 | 0.00 | 0.00 | 0.00 | 0001 | 11 | 3 | 2.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ### | ### | 0.00 | ||
3 | ||||||||||||||||||||||||||
4 | 0001 | 12 | 2 | 1.00 | 32.00 | 24.00 | 9.00 | 0.00 | 0.00 | 90.00 | 90.00 | 0.00 | ||||||||||||||
5 | 0001 | 12 | 2 | 2.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ##### | #### | 0.00 | ||||||||||||||
6 | 0001 | 7 | 6 | 1.00 | 10.00 | 5.00 | 0.00 | 0.00 | 0.00 | 18.00 | 18.00 | 0.00 | ||||||||||||||
7 | 0001 | 7 | 6 | 2.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 24.00 | 24.00 | 0.00 | ||||||||||||||
8 | 0001 | 7 | 6 | 3.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ##### | #### | 0.00 | ||||||||||||||
9 | 0001 | 8 | 5 | 1.00 | 18.00 | 0.00 | 4.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ||||||||||||||
10 | 0001 | 8 | 5 | 3.00 | 0.00 | 0.00 | 0.00 | 0.00 | 20.00 | 54.00 | 54.00 | 0.00 | ||||||||||||||
11 | 0001 | 9 | 4 | 1.00 | 18.00 | 0.00 | 0.00 | 0.00 | 0.00 | 40.00 | 40.00 | 0.00 | ||||||||||||||
12 | 0002 | 1 | 9 | 1.00 | 8.00 | 75.00 | 0.00 | 0.00 | 0.00 | ##### | #### | 0.00 | ||||||||||||||
13 | 0002 | 11 | 3 | 1.00 | 30.00 | 5.00 | 18.00 | 0.00 | 0.00 | ##### | #### | 0.00 | ||||||||||||||
14 | 0002 | 11 | 3 | 3.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ##### | #### | 0.00 | ||||||||||||||
15 | 0002 | 12 | 2 | 1.00 | 32.00 | 24.00 | 9.00 | 0.00 | 0.00 | 75.00 | 75.00 | 0.00 | ||||||||||||||
16 | 0002 | 12 | 2 | 2.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 60.00 | 60.00 | 0.00 | ||||||||||||||
17 | 0002 | 12 | 2 | 3.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 75.00 | 75.00 | 0.00 | ||||||||||||||
18 | 0002 | 13 | 2 | 1.00 | 21.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ||||||||||||||
19 | 0002 | 13 | 2 | 2.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 48.00 | 48.00 | 0.00 |
<colgroup><col style="width: 60pt;" width="80"> <col style="width: 35pt; mso-width-source: userset; mso-width-alt: 1718;" width="47"> <col style="width: 31pt; mso-width-source: userset; mso-width-alt: 1499;" width="41"> <col style="width: 28pt; mso-width-source: userset; mso-width-alt: 1353;" width="37"> <col style="width: 42pt; mso-width-source: userset; mso-width-alt: 2048;" width="56"> <col style="width: 30pt; mso-width-source: userset; mso-width-alt: 1462;" width="40"> <col style="width: 29pt; mso-width-source: userset; mso-width-alt: 1426;" width="39"> <col style="width: 37pt; mso-width-source: userset; mso-width-alt: 1792;" width="49"> <col style="width: 28pt; mso-width-source: userset; mso-width-alt: 1353;" width="37"> <col style="width: 32pt; mso-width-source: userset; mso-width-alt: 1536;" width="42"> <col style="width: 31pt; mso-width-source: userset; mso-width-alt: 1499;" width="41"> <col style="width: 29pt; mso-width-source: userset; mso-width-alt: 1426;" width="39"> <col style="width: 27pt; mso-width-source: userset; mso-width-alt: 1316;" width="36"> <col style="width: 35pt; mso-width-source: userset; mso-width-alt: 1682;" width="46"> <col style="width: 31pt; mso-width-source: userset; mso-width-alt: 1499;" width="41"> <col style="width: 23pt; mso-width-source: userset; mso-width-alt: 1133;" width="31"> <col style="width: 39pt; mso-width-source: userset; mso-width-alt: 1901;" width="52"> <col style="width: 24pt; mso-width-source: userset; mso-width-alt: 1170;" span="8" width="32"> <col style="width: 38pt; mso-width-source: userset; mso-width-alt: 1865;" width="51"> <col style="width: 48pt; mso-width-source: userset; mso-width-alt: 2340;" width="64"> <tbody>
</tbody>