string word search and match list of words in column

HRPRGMNGT

New Member
Joined
Feb 2, 2009
Messages
26
Hi

I have 3 columns, Column A has comments and column B and Column C have a list of words that we want our string to compare to. For example:

Column A Column B Column C
I think that service is great Great Bad
Products are good service is bad Good Horrendous

what I need is to see if any words in column B match my string in Column A and the same with Column C do the words in this column C match any word in my string in Column A.

For my first comment I want a 1 for column B because it matches on 'great' and a 0 for column C because it has no matches. For my second comment I want a 1 for column B because it matches on 'good' and a 1 on column C because it matches on 'bad'.

Can someone help me with a formula that does this?
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi

I have 3 columns, Column A has comments and column B and Column C have a list of words that we want our string to compare to. For example:

Column A Column B Column C
I think that service is great Great Bad
Products are good service is bad Good Horrendous

what I need is to see if any words in column B match my string in Column A and the same with Column C do the words in this column C match any word in my string in Column A.

For my first comment I want a 1 for column B because it matches on 'great' and a 0 for column C because it has no matches. For my second comment I want a 1 for column B because it matches on 'good' and a 1 on column C because it matches on 'bad'.

Can someone help me with a formula that does this?
Try these...

For matches on column B:

=COUNT(LOOKUP(1E100,SEARCH(B$2:B$3,A2)))

For matches on column C:

=COUNT(LOOKUP(1E100,SEARCH(C$2:C$3,A2)))
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,275
Members
452,902
Latest member
Knuddeluff

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