I have two sheets sheet3 and sheet4. Sheet3 is blank sheet as below:
我有两张sheet3和sheet4。 Sheet3是空白表,如下所示:
sheet 4 as below
表4如下
Now I need to copy all the data from sheet 4 to sheet 3 where sheet 3 has matching Names e.g ABC, DEF etc and for rest put 0 in sheet 3.
现在我需要将表4中的所有数据复制到表3,其中表3具有匹配的名称,例如ABC,DEF等,并且在表3中将0放在其中。
2 个解决方案
#1
#2
0
First try to do it on the same sheet to get the idea. Like this:
首先尝试在同一张纸上进行,以获得想法。喜欢这个:
Then transfer it to the new sheet. The formula you set in B6 is =INDEX($B$2:$D$4,MATCH($A6,$A$2:$A$4,0),MATCH(B$5,$B$1:$D$1,0))
然后将其传输到新工作表。你在B6中设定的公式是= INDEX($ B $ 2:$ D $ 4,MATCH($ A6,$ A $ 2:$ A $ 4,0),MATCH(B $ 5,$ B $ 1:$ D $ 1,0))
Then you can stretch it to the right and down.
然后你可以向右和向下拉伸它。
The idea is that you give the location of the value in B2:D4
, by selecting the correct column and the correct row with the Index()
formula.
我们的想法是通过选择正确的列和带有Index()公式的正确行,在B2:D4中给出值的位置。
The correct column is the column, which matches B5
, C5
or D5
in range B1:D1
.
正确的列是列,它匹配范围B1:D1中的B5,C5或D5。
The correct row is the row that matches the value in A6
, A7
or A8
in A2:A4
.
正确的行是与A2:A4中的A6,A7或A8中的值匹配的行。
Thus, the formula in B6
will return row 3 and column 2. In range B2:D4
row 3 and column 2 has a value 8.
因此,B6中的公式将返回第3行和第2列。在范围B2中:D4第3行和第2列的值为8。
#1
0
In your sheet 3, enter the below formula and drag it right and then down,
在工作表3中,输入以下公式并向右然后向下拖动,
=IFERROR(INDEX(Sheet4!$A:$E,MATCH($A2,Sheet4!$A:$A,0),COLUMN()),0)
Note:- Sheet 4 data should be in columns A to E like below.
注意: - 表4数据应该在A到E列中,如下所示。
#2
0
First try to do it on the same sheet to get the idea. Like this:
首先尝试在同一张纸上进行,以获得想法。喜欢这个:
Then transfer it to the new sheet. The formula you set in B6 is =INDEX($B$2:$D$4,MATCH($A6,$A$2:$A$4,0),MATCH(B$5,$B$1:$D$1,0))
然后将其传输到新工作表。你在B6中设定的公式是= INDEX($ B $ 2:$ D $ 4,MATCH($ A6,$ A $ 2:$ A $ 4,0),MATCH(B $ 5,$ B $ 1:$ D $ 1,0))
Then you can stretch it to the right and down.
然后你可以向右和向下拉伸它。
The idea is that you give the location of the value in B2:D4
, by selecting the correct column and the correct row with the Index()
formula.
我们的想法是通过选择正确的列和带有Index()公式的正确行,在B2:D4中给出值的位置。
The correct column is the column, which matches B5
, C5
or D5
in range B1:D1
.
正确的列是列,它匹配范围B1:D1中的B5,C5或D5。
The correct row is the row that matches the value in A6
, A7
or A8
in A2:A4
.
正确的行是与A2:A4中的A6,A7或A8中的值匹配的行。
Thus, the formula in B6
will return row 3 and column 2. In range B2:D4
row 3 and column 2 has a value 8.
因此,B6中的公式将返回第3行和第2列。在范围B2中:D4第3行和第2列的值为8。