Me again,
I have a table along the lines of:[TABLE="width: 500"]
<tbody>[TR]
[TD]a
[/TD]
[TD]1[/TD]
[TD]123[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]1[/TD]
[TD]34[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD]1[/TD]
[TD]235423[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]d[/TD]
[TD]1[/TD]
[TD]2435[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD]2[/TD]
[TD]214[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]3[/TD]
[TD]2354[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]2[/TD]
[TD]2352[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Where first column is an account number, the second is the sequence of the sale and the 3rd is the value of the sale. What I want to do is to have a formula in the 4th column along the lines of "if this is not the first sale, what was the value of the first sale"
So for example the returned value against the 5th line would be 123 (line 5 is the second sale to a and the first sale was for 123)
Any ideas?
I got as far as =if(a5>1,vlookup(a5,a1:c7,3,0),"nil") however this wouldn't necessarily pick up the first sale to "a" so there needs to be some sort of search to find the row where column a is a and column b is 1 and return value from column c of this row
I have a table along the lines of:[TABLE="width: 500"]
<tbody>[TR]
[TD]a
[/TD]
[TD]1[/TD]
[TD]123[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]1[/TD]
[TD]34[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]c[/TD]
[TD]1[/TD]
[TD]235423[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]d[/TD]
[TD]1[/TD]
[TD]2435[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]a[/TD]
[TD]2[/TD]
[TD]214[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]3[/TD]
[TD]2354[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]b[/TD]
[TD]2[/TD]
[TD]2352[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Where first column is an account number, the second is the sequence of the sale and the 3rd is the value of the sale. What I want to do is to have a formula in the 4th column along the lines of "if this is not the first sale, what was the value of the first sale"
So for example the returned value against the 5th line would be 123 (line 5 is the second sale to a and the first sale was for 123)
Any ideas?
I got as far as =if(a5>1,vlookup(a5,a1:c7,3,0),"nil") however this wouldn't necessarily pick up the first sale to "a" so there needs to be some sort of search to find the row where column a is a and column b is 1 and return value from column c of this row