user2900455
user2900455

Reputation: 21

Return value of a Cell as value if true or false of a function

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

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.

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.

Upvotes: 2

Views: 31917

Answers (1)

Siva Charan
Siva Charan

Reputation: 18064

Why can't you do just

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

Upvotes: 2

Related Questions