I am using the formula =LOOKUP(B2-1,$B$2:B2,$C$2:C2) to lookup the value on it's parent level (I.E. level 2 lookup results value of next level 1 above). The formula doesn't work when there's duplicate values as shown below on ID 8. I am trying to get the lookup value on ID 8 to show the value on ID 7, but it's showing the value on ID 3 (which are both level 2). Is there a way to set the lookup to pull the "closest" in reference to cell location? Or any other way to get the correct value.
| ID | level | value | result from my lookup formula | expected lookup return value |
|---|---|---|---|---|
| 1 | 1 | 1 | #n/a (formula =LOOKUP(B2-1,$B$2:B2,$C$2:C2) ) | #n/a |
| 2 | 2 | 2 | 1 | 1 (value on ID 1) |
| 3 | 2 | 2 | 1 | 1 (value |