spill-the-beans
Board Regular
- Joined
- Feb 7, 2013
- Messages
- 52
Hello all,
Any help on solving my excel nightmares would be much appreciated. The relevant columns of my dataset look like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]1[/TD]
[TD]V[/TD]
[TD]W[/TD]
[TD]X[/TD]
[TD]BA[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]50[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]51[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]51[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]52[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]68[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]72[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]69[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]70[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]71[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]72[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]73[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need a formula that I can copy down column BA.
Looking in column, V, see that V2 does not equal V1 +1.
Start the search from row 2.
Find the first time W=0 at the same time that x=0.
For that double 0 row number, copy the value in column V and put it in column BA on the row that you started looking in, so BA2.
Looking in column V, V3 = V2+1, so BA3 can be blank. Same with V4 and BA4.
But V5 does not equal V4+1, so the search starts again from row 5.
The first time W=0 and X=0 is row 9.
The number in column V on row 9 is 72, so BA5 should say 72.
Any help on solving my excel nightmares would be much appreciated. The relevant columns of my dataset look like this:
[TABLE="width: 500"]
<tbody>[TR]
[TD]1[/TD]
[TD]V[/TD]
[TD]W[/TD]
[TD]X[/TD]
[TD]BA[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]50[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]51[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]51[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]52[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]68[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]72[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]69[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]70[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]71[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]72[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]73[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I need a formula that I can copy down column BA.
Looking in column, V, see that V2 does not equal V1 +1.
Start the search from row 2.
Find the first time W=0 at the same time that x=0.
For that double 0 row number, copy the value in column V and put it in column BA on the row that you started looking in, so BA2.
Looking in column V, V3 = V2+1, so BA3 can be blank. Same with V4 and BA4.
But V5 does not equal V4+1, so the search starts again from row 5.
The first time W=0 and X=0 is row 9.
The number in column V on row 9 is 72, so BA5 should say 72.