1

I'm having some trouble with a rather convoluted Excel issue, but I think I have my problem figured out.

Lets use successful pets as an example. We have three pets, a cat, a dog, and a bird. The cat and bird were both successful at jumping through a hoop, but the dog wasn't. I have those results listed in one table:

Sheet1: http://imgur.com/LtrMWQY

I also have another table which lists my pets:

Sheet2: http://imgur.com/Prq12Md

In Sheet2 B2, I would like to have a formula that will return the word "Success." I can't seem to get a function to work for this.

The logical progression that I see is to first identify which cell holds the word "Cat" in Sheet1. Then I would need to set up an if statement searching for the word Success in that cell.

I have the second part down: =IF(ISNUMBER(FIND("successful",Sheet1!A1)), "Success", "Fail")

What I need to do now is write something that will search out and populate the "Sheet1!A1" portion of the above function by searching Sheet1 column A for the value in Sheet2 cell A2. Can anyone help with this or get me pointed in the right direction?

Thank you in advance.

4

1 回答 1

2

我写得有点快,所以可能会更短^^;

=IF(ISNUMBER(SEARCH("Successful",VLOOKUP("*"&A1&"*",Sheet1!A:A,1,0))),"Success","Fail")

最里面的函数是VLOOKUP并且将在 Sheet1 中查找包含“dog”的相应单元格(不区分大小写)。它将返回值The dog failed

现在,下一个公式是SEARCH(不区分大小写的版本FIND),并将查找Successful. 其余的应该相对容易理解:)

于 2013-09-03T20:02:36.190 回答