I have a table as follows:
|**Corresponding Values**|
|:.......|:.....:|......:|
| O1 | F1 | S1 |
| O2 | F2 | S2 |
| O3 | F3 | S3 |
| O4 | F4 | S4 |
| O5 | F5 | S5 |
| O6 | F6 | S6 |
| O7 | F7 | S7 |
I want to get the corresponding third value if given any two values (irrespective of the order/sequence) in the same row; example
- (O5 and F5) or (F5 and O5) gives S5
- (F7 and S7) or (S7 and F7) gives O7
- (O3 and S3) or (S3 and O3) gives F3
- and other possible permutations (any order) to give their corresponding third value, except (O and O) or (F and F) and (S and S) ie. Cell B8 and B11 must not be the same,
as shown on the second column from the left in the attached image.
I tried the following code for (O6 and F6) and got S6; but it doesn't work in the reverse order ie. (F6 and O6) despite using the OR Function.
=(INDEX(Data!O2:O8,MATCH(B8,IF(Data!N2:N8=B11,Data!M2:M8),0)))
=OR((INDEX(Data!O2:O8,MATCH(B8,IF(Data!N2:N8=B11,Data!M2:M8),0))), (INDEX(Data!N2:N8,MATCH(B8,IF(Data!O2:O8=B11,Data!M2:M8),0))), (INDEX(Data!M2:M8,MATCH(B8,IF(Data!O2:O8=B11,Data!N2:N8),0))),(INDEX(Data!O2:O8,MATCH(B8,IF(Data!M2:M8=B11,Data!N2:N8),0))), (INDEX(Data!N2:N8,MATCH(B8,IF(Data!M2:M8=B11,Data!O2:O8),0))), (INDEX(Data!M2:M8,MATCH(B8,IF(Data!N2:N8=B11,Data!O2:O8),0))))
Pls note on the image, the second column from the left shows these values.
Kindly guide me on the best approach.