-2

I have several lists of groups and their members. A member can belong to more than one group. I want to find out which groups each member belongs to. Since each group name has its own cell I'm basically trying to search for a name in a range of cells and type its group name.

The formula I was thinking of was

=IF(ISNUMBER(SEARCH([cell containing name];[cell:Range of group list]));
[cell containing group name];" ")

and I want to add another one to that formula but for another group range and name.

But I can't seem to get the formula working when adding them together.

=IF(ISNUMBER(SEARCH(A7;A7:A27));A$3;" ")&IF(ISNUMBER(SEARCH(A7;A32:A57));$A$33;"Oops")

This formula gives: "Group Name 1 Oops" even though the name clearly appears in the second list. Swapping out A7 (the first cell of which the name occurs) for A37(the second cell of which the name occurs) doesn't change the result. I think it's the "&" which is at fault, but I can't change it to "," or ";" without getting an error.

Any ideas on how to solve this or other solutions?

  • Welcome. Is your question about Excel or Google Sheets? They're not the same and Google can do some things that Excel can only dream about. Perhaps you might also show us the layout of the scheet so we can understand where the various elements appear. – Tedinoz Nov 16 '18 at 02:02

1 Answers1

0

Try this: I understand that you just need to run one statement at a time.

=IF(IF(ISNUMBER(SEARCH(A7;A7:A27));A$3;" ")=" ";IF(ISNUMBER(SEARCH(A7;A7:A27));A$3;" ");IF(ISNUMBER(SEARCH(A37;A32:A57));$A$33;"Oops"))

Hope it useful to you.

AnNg
  • 26
  • 2