cooper645
Well-known Member
- Joined
- Nov 16, 2013
- Messages
- 639
- Office Version
- 365
- Platform
- Windows
- MacOS
- Mobile
- Web
Hi guys and gals.
So I am having trouble coming up with a solution to my problem.
The scenario I have is an auto populating form based on one key cell.
I select the serial number and the rest of the form fills out based on that selection, all of this work fine, until I get to the point that I need to lookup the previous instance of a Serial Number in a list.
So I Select Key B11 and I need to lookup the previous instance of the associated unique serial xyz. (the serials are repeated as a history and struck out)
The result that should be returned would be B8
The Key is in column A:A
The serial is in column B:B
I have tried: =INDEX(A1:A30,MATCH(SerNum,B1:B30,0),0) - which returns the first instance
I have tried: =IF(COUNTIF(B:B,SerNum),LOOKUP(2,1/(B:B=SerNum),A:A),""). - which returns the last instance.
any help is appreciated.
Kind Regards,
Coops
[TABLE="class: grid, width: 4, align: left"]
<tbody>[TR]
[TD]Key[/TD]
[TD]Serial[/TD]
[/TR]
[TR]
[TD]B1[/TD]
[TD]abc[/TD]
[/TR]
[TR]
[TD]B2[/TD]
[TD]xyz[/TD]
[/TR]
[TR]
[TD]B3[/TD]
[TD]456[/TD]
[/TR]
[TR]
[TD]B4[/TD]
[TD]abc[/TD]
[/TR]
[TR]
[TD]B5[/TD]
[TD]xyz[/TD]
[/TR]
[TR]
[TD]B6[/TD]
[TD]456[/TD]
[/TR]
[TR]
[TD]B7[/TD]
[TD]abc[/TD]
[/TR]
[TR]
[TD]B8[/TD]
[TD]xyz[/TD]
[/TR]
[TR]
[TD]B9[/TD]
[TD]abc[/TD]
[/TR]
[TR]
[TD]B10[/TD]
[TD]456[/TD]
[/TR]
[TR]
[TD]B11[/TD]
[TD]xyz[/TD]
[/TR]
</tbody>[/TABLE]
So I am having trouble coming up with a solution to my problem.
The scenario I have is an auto populating form based on one key cell.
I select the serial number and the rest of the form fills out based on that selection, all of this work fine, until I get to the point that I need to lookup the previous instance of a Serial Number in a list.
So I Select Key B11 and I need to lookup the previous instance of the associated unique serial xyz. (the serials are repeated as a history and struck out)
The result that should be returned would be B8
The Key is in column A:A
The serial is in column B:B
I have tried: =INDEX(A1:A30,MATCH(SerNum,B1:B30,0),0) - which returns the first instance
I have tried: =IF(COUNTIF(B:B,SerNum),LOOKUP(2,1/(B:B=SerNum),A:A),""). - which returns the last instance.
any help is appreciated.
Kind Regards,
Coops
[TABLE="class: grid, width: 4, align: left"]
<tbody>[TR]
[TD]Key[/TD]
[TD]Serial[/TD]
[/TR]
[TR]
[TD]B1[/TD]
[TD]abc[/TD]
[/TR]
[TR]
[TD]B2[/TD]
[TD]xyz[/TD]
[/TR]
[TR]
[TD]B3[/TD]
[TD]456[/TD]
[/TR]
[TR]
[TD]B4[/TD]
[TD]abc[/TD]
[/TR]
[TR]
[TD]B5[/TD]
[TD]xyz[/TD]
[/TR]
[TR]
[TD]B6[/TD]
[TD]456[/TD]
[/TR]
[TR]
[TD]B7[/TD]
[TD]abc[/TD]
[/TR]
[TR]
[TD]B8[/TD]
[TD]xyz[/TD]
[/TR]
[TR]
[TD]B9[/TD]
[TD]abc[/TD]
[/TR]
[TR]
[TD]B10[/TD]
[TD]456[/TD]
[/TR]
[TR]
[TD]B11[/TD]
[TD]xyz[/TD]
[/TR]
</tbody>[/TABLE]