Excel Why is my IF-formula not working?

佐手、 提交于 2019-12-12 07:03:55

问题


I have this formula:

=IF(testing!I:I=A6;testing!A:A;"wrong")

I want to control with the formula whether the mapping of values is right.
I want to know whether the value in A6 has more corresponding values in the column A in the 'testing'-sheet. So when A6 appears in the column I, I either want to know which corresponding value it has in column A, OR if he has MORE THAN ONE, I want to get 'wrong' as an answer.


回答1:


I think that is because if you simplify the test to just =I:I=A6 that will always return FALSE.




回答2:


Code:

=IF(COUNTIF(testing!I:I,A6)=1,INDEX(testing!A:A,MATCH(A6,testing!I:I,0)),"Wrong")


来源:https://stackoverflow.com/questions/26121705/excel-why-is-my-if-formula-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!