JRW261
Mechanical
- Feb 26, 2004
- 41
I apologize if this is confusing but try and bear with me.
I have a Indentured PL in the following format...
x y z
1 0 A1 -
2 1 B1 A1
3 1 B2 A1
4 2 C1 B2
5 3 D1 C1
6 2 C2 B2
7 2 C3 B2
8 1 B3 A1
9 2 CC1 B3
The numbers on the left are line item numbers.
Column x is "indenture level"
Cloumn y is "part number"
Column z is non-existent(this is what I want to create), but will generate "next assembly"
So, B1, B2, B3 Next assemble into A1. C1, C2, C3 next assemble into B2... and so on.
I can easily identify the next assembly if the part is one cell below its parent using the following. ("none" was just a filler)
=IF(x2-1=x1,y1,"none") (error in row 1, not a big deal though)
I can also insert yet another IF statement in place of "none", but changeing the =x1 and y1 to its next higher cell... and do that numerous times until it finds the parent part.
However, my PLs are fairly large and would require 100's if not 1000's of IF statements within IF statements to track far enough up the PL to find the parent. A pretty sloppy solution.
Anyone have a "string" that would incrementally look one cell up until it finds a true condition?
The answer might be pretty trivial but Im pretty inexperienced at this.
Thanks in advance.
I have a Indentured PL in the following format...
x y z
1 0 A1 -
2 1 B1 A1
3 1 B2 A1
4 2 C1 B2
5 3 D1 C1
6 2 C2 B2
7 2 C3 B2
8 1 B3 A1
9 2 CC1 B3
The numbers on the left are line item numbers.
Column x is "indenture level"
Cloumn y is "part number"
Column z is non-existent(this is what I want to create), but will generate "next assembly"
So, B1, B2, B3 Next assemble into A1. C1, C2, C3 next assemble into B2... and so on.
I can easily identify the next assembly if the part is one cell below its parent using the following. ("none" was just a filler)
=IF(x2-1=x1,y1,"none") (error in row 1, not a big deal though)
I can also insert yet another IF statement in place of "none", but changeing the =x1 and y1 to its next higher cell... and do that numerous times until it finds the parent part.
However, my PLs are fairly large and would require 100's if not 1000's of IF statements within IF statements to track far enough up the PL to find the parent. A pretty sloppy solution.
Anyone have a "string" that would incrementally look one cell up until it finds a true condition?
The answer might be pretty trivial but Im pretty inexperienced at this.
Thanks in advance.