Declamatory
Active Member
- Joined
- Nov 6, 2014
- Messages
- 319
Hi Folks,
I hope I can explain this OK.
I have a VLOOKUP that brings through data in an array. The cell either above or below the value will always blank. I need a formula that if the cell above the lookup value is blank then bring through the value in the cell below the lookup value and if it is not blank then bring through the value in the cell above the lookup value.
Example
John is partnered with another person (David). I don't know if John will appear above or below his partner in the list but there will always be a blank line in between partners. I need a formula that does a VLOOKUP or similar to look at the people in column D and see who they were partnered with. So if the cell above A4 is blank bring through the value in A5 but if the cell above A4 is not blank then bring through the value in A3.
Hope that makes sense
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Philip[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Peter[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]John[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]David[/TD]
[TD][/TD]
[TD][/TD]
[TD]Peter[/TD]
[TD]Formula to bring through Philip[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]John[/TD]
[TD]Formula to bring through "David"[/TD]
[/TR]
</tbody>[/TABLE]
I hope I can explain this OK.
I have a VLOOKUP that brings through data in an array. The cell either above or below the value will always blank. I need a formula that if the cell above the lookup value is blank then bring through the value in the cell below the lookup value and if it is not blank then bring through the value in the cell above the lookup value.
Example
John is partnered with another person (David). I don't know if John will appear above or below his partner in the list but there will always be a blank line in between partners. I need a formula that does a VLOOKUP or similar to look at the people in column D and see who they were partnered with. So if the cell above A4 is blank bring through the value in A5 but if the cell above A4 is not blank then bring through the value in A3.
Hope that makes sense
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Philip[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Peter[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]John[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]David[/TD]
[TD][/TD]
[TD][/TD]
[TD]Peter[/TD]
[TD]Formula to bring through Philip[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]John[/TD]
[TD]Formula to bring through "David"[/TD]
[/TR]
</tbody>[/TABLE]