1

I have a bunch of names in a column - Mike, Bob, Al, John, Fred, Jim, etc.

Does Excel have some sort of include or find that I can combine in an IF statement to tag only the guys I need?

If I find the names I need then enter some code like BD, otherwise blank.

Something like this:

=IF(EXISTS("Mike","John","Bob", A1),"BD","")

so if the A1 cell has Mike, John, or Bob, then the target cell equals BD, otherwise nothing.

thanks, J

4

2 に答える 2

1

I don't know of any such "Exists" function, but you could use something like this:

IF(OR(A1="Mike", A1="John", A1="Bob"),"BD","")

于 2013-02-28T21:49:18.583 に答える
0

これにより、セルに「マイク」が含まれているかどうかがわかります。

=IF((ISNUMBER(SEARCH("Mike",A1))),"BD","")

チェックする必要のある名前の数に関係なく、この関数を内部で繰り返すことができます。これは、セルにマイクまたはジョンが含まれているかどうかを示します

=IF((ISNUMBER(SEARCH("Mike",A1))),"BD",IF((ISNUMBER(SEARCH("John",A1))),"BD",""))
于 2013-02-28T22:02:13.800 に答える