What function should I use in Excel for searching a (multiple) text string?

Posted by Alenanno on Super User See other posts from Super User or by Alenanno
Published on 2012-10-03T08:35:56Z Indexed on 2012/10/03 9:40 UTC
Read the original article Hit count: 123

The title is a bit unclear, but I'll be explaining it now for better clarity.

I have this:

enter image description here

When I type in the Input field, I'd like Excel to show me the result in the Output field. For example, if I write Four, I'd like it to output 20, or if I write one of the other three words, then 12. The problem is that... I can't make it to work.

The formula I tried is "=CERCA(C2;G:G;H:H)" (cerca means search), so I'm saying "Take what I write in the cell C2, search through the column G and give me what you find from the column H", but the result is always N.D. (Not available). I've tried other combinations and:

  • Text strings, does not work;
  • Single numbers, works (if I search 1, it says 2, which is what I expect);
  • multiple numbers, does not work (if I search 4, nothing happens).

What function should I use?

© Super User or respective owner

Related posts about microsoft-excel

Related posts about worksheet-function