Reputation: 75
I have been trying multiple formula to get results for Column D as shown below...(column d
is normally empty. I tried matching, if, and lookup formulas and have yet been able to successfully complete the task). Column A
contains random ID numbers. Column B
contains the "parent id numbers. I need a formula for IF column B
is greater than zero look in column A for that number... THEN copy from column c that cell value. I have used this but wont copy c
value when going down the list =IF(C3>0,LOOKUP(C3,A2:A20001,D2))
+----------+----------+-----------+----------+
| Column A | Column B | Column C | Column D |
+----------+----------+-----------+----------+
| 279 | 0 | P12345 | |
| 281 | 279 | 69856 | P12345 |
| 282 | 279 | 656898 | P12345 |
| 283 | 0 | 6464845 | |
| 301 | 285 | 12156498 | |
| 322 | 279 | 6588446 | P12345 |
+----------+----------+-----------+----------+
Upvotes: 1
Views: 630
Reputation: 96753
In D1 enter:
=IFERROR(IF(B1>0,VLOOKUP(B1,$A$1:$C$6,3,FALSE),""),"")
and copy down.
Upvotes: 1