[英]If on excel I have two columns, A e B, how can I have the column C with all the elements of A, that are contents in B?
This is a partial answer, since there are empty spaces between.这是部分答案,因为之间有空格。 You can use
=IF(ISERROR(MATCH(B2,$A$2:$A$5,0)),"",B2)
and drag that formula from C2
to C5
您可以使用
=IF(ISERROR(MATCH(B2,$A$2:$A$5,0)),"",B2)
并将该公式从C2
拖到C5
That gives C2 = "", C3 = 1, C4 = "", C5 = 1这给出了 C2 = "", C3 = 1, C4 = "", C5 = 1
Formulas:公式:
You can sort this column afterwards之后您可以对该列进行排序
In cell C2, place the following formula:在单元格 C2 中,放置以下公式:
=FILTER(B2:B5,IFERROR(IF(MATCH(B2:B5,A$2:A$5,0)>0,1),0))
This creates an array of matches then filters the relevent column for the data这将创建一个匹配数组,然后过滤数据的相关列
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.