Excel的多公式IF等于从另一个单元格值复制

时间:2021-10-27 20:25:13

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))

我已经尝试了多个公式来得到D列的结果,如下所示…(d列通常为空。我尝试了匹配、if和查找公式,并成功地完成了任务)。列A包含随机ID号。列B包含“父id号”。如果B列大于0,我需要一个公式看看a列中的数字。然后从列c中复制单元格值。我已经使用了这个,但是在列表下面的时候不会复制c值=IF(C3>,查找(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   |
+----------+----------+-----------+----------+

1 个解决方案

#1


1  

In D1 enter:

在D1输入:

=IFERROR(IF(B1>0,VLOOKUP(B1,$A$1:$C$6,3,FALSE),""),"")

and copy down.

复制下来。

Excel的多公式IF等于从另一个单元格值复制

#1


1  

In D1 enter:

在D1输入:

=IFERROR(IF(B1>0,VLOOKUP(B1,$A$1:$C$6,3,FALSE),""),"")

and copy down.

复制下来。

Excel的多公式IF等于从另一个单元格值复制