如果函数为true或false,则将Cell的值返回为值

时间:2021-04-13 20:34:52

I would like to get a value of a particular cell as value if true or value if false option using functions in excel. the exact problem i have is as follow

我想获取特定单元格的值作为值,如果为true或value,如果为false,则使用excel中的函数。我遇到的确切问题如下

in column A I have the name list of the students and in column B I have their birthplace. Now I would like to find out the students from a particular city.

在A栏中我有学生的名单,在B栏我有他们的出生地。现在我想找出一个特定城市的学生。

The best solution i could find was to use:

我能找到的最佳解决方案是使用:

=IF(COUNTIF(A1,"*California*"),"Yes","No")

But instead of "Yes", I want the students name from California of corresponding row.

但是,不是“是”,我希望学生从加利福尼亚州的相应行名称。

1 个解决方案

#1


2  

Why can't you do just

你为什么不能这样做

=IF(B1="California",A1,"No")

#1


2  

Why can't you do just

你为什么不能这样做

=IF(B1="California",A1,"No")