If cell contains text from list... My formula returns "0"

sakis_s

New Member
Joined
Sep 22, 2019
Messages
39
Office Version
  1. 2016
Platform
  1. Windows
Hi all,
I have this example:
ABCDE
TRAILING SADDLE BAG
BAG555
SHOE333

My goal is to enter a formula in B1 cell to look for text inside A1 cell from list in D column, and when/if it finds the text then paste the text from E column.

So the formula i'm using for this in B1 cell is the following:
Excel Formula:
=IFERROR(LOOKUP(1;0/COUNTIF(A1;"*"&D:D&"*");E:E);"No Match")

The problem is that it returns "0" as a result.
Anyone knows what i'm doing wrong?

Thank you in advance for your help, i really appreciate your time.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi,

try This:
Book1
ABCDE
1TRAILING SADDLE BAG555BAG555
2SHOE333
Sheet1
Cell Formulas
RangeFormula
B1B1=SUMPRODUCT(--ISNUMBER(SEARCH($D$1:$D$2,A1))*E1:E2)
 
Upvote 0
Hi,

try This:
Book1
ABCDE
1TRAILING SADDLE BAG555BAG555
2SHOE333
Sheet1
Cell Formulas
RangeFormula
B1B1=SUMPRODUCT(--ISNUMBER(SEARCH($D$1:$D$2,A1))*E1:E2)
Hi and thank you very much for your reply.

Unfortunately it doesn't work either. I get #VALUE! error.
 
Upvote 0
Hi and thank you very much for your reply.

Unfortunately it doesn't work either. I get #VALUE! error.
Hi,

Did you test it with the given data from your example or did you test it on a more extensive set of data?
Are you able to show #VALUE error using XL2BB.

XL2BB is an add in designed for MrExcel to be able to copy Excel data and formula's onto the forum.
More info on how to get and install it, to be found here
 
Upvote 0
Some other clarification too please.

With your sample data in columns D:E, what would you want returned if A1 was "TRAILING SADDLE BAGGAGE"?
That is, are looking for simple text or are you looking for whole words?

Is it possible that more than one item from column D might appear in the column A text?
If so, explain what result(s) you would want?
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,629
Members
449,241
Latest member
NoniJ

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top