[英]Excel = operator isn't working as expected with multiple tabs
I have an Excel-file with 2 tabs: 我有一个带有2个标签的Excel文件:
Tab1
ActorID | ActorName
--------------------
4321 | ActorName1
4322 | ActorName2
4323 | ActorName3
4324 | ActorName4
In the second tab I want to put in the name of the actor and see if it's in the array 在第二个选项卡中,我想输入actor的名称,然后查看它是否在数组中
So I used this formula: =(Tab1!A1:A10="ActorName1")
, but I get FALSE
. 所以我使用了这个公式:
=(Tab1!A1:A10="ActorName1")
,但是我得到了FALSE
。 When I use the same formula in the first tab ( =(A1:A10="ActorName1")
) I get TRUE
. 当我在第一个选项卡中使用相同的公式(
=(A1:A10="ActorName1")
)时,我得到TRUE
。
I don't understand why I get FALSE
if the formula is used in another tab :/ 我不明白如果在另一个标签中使用该公式,为什么会得到
FALSE
:/
The formula works on the tab only if the name you are searching is the first. 仅当您搜索的名称是第一个名称时,该公式才会在选项卡上起作用。 You are trying to compare an array to a single item, Excel will only look at the first.
您试图将数组与单个项目进行比较,Excel只会查看第一个。
To search a range of names use MATCH(). 要搜索一系列名称,请使用MATCH()。 To return TRUE/FALSE wrap it in ISNUMBER(), as MATCH will return a number if found or an error if not found.
要返回TRUE / FALSE,请将其包装在ISNUMBER()中,因为如果找到MATCH,它将返回一个数字;如果未找到,则将返回一个错误。
=ISNUMBER(MATCH("ActorName1",Tab1!A1:A10,0))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.