sumproduct adjustment - search for cells containing a word

heathball

Board Regular
Joined
Apr 6, 2017
Messages
112
Office Version
  1. 365
Platform
  1. Windows
=SUMPRODUCT(--ISNUMBER(SEARCH({"red","blue","green","black"},EN2)))>0

Hello, Im using SUMPRODUCT for the first time, to search for cells containing words.

Is there a way to adjust this formula, so that the actual word that is found eg. 'blue' is the result, instead of TRUE
and also for the result cell to be blank if there is is a FALSE result?

Thanks in advance
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Maybe...

=IFERROR(LOOKUP(9.99E+307,SEARCH({"red","blue","green","black"},EN2),{"red","blue","green","black"}),"")

M.
 
Last edited:
Upvote 0
redbluegreenblackhelper1helper2helper3
this is a blue door212blue
this is a red door121red
this is a pink door30
this is a yellow door40
this is a black door454black
blue in helper 3 obtained by
=IF(ISERROR(OFFSET(E2,-K2,MATCH(L2,F2:I2,0))),"",OFFSET(E2,-K2,MATCH(L2,F2:I2,0)))

<colgroup><col span="4"><col><col span="10"></colgroup><tbody>
</tbody>
 
Upvote 0
thanks for both your posts

Marcelo, that works perfectly. I see 9.99E+307 is the largest number that excel can store....very mysterious ( i will think about how this works) and skillful work:LOL:
 
Upvote 0
thanks oldbrewer, that is a good way to do it. I will check out this OFFSET idea!
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,575
Members
449,039
Latest member
Arbind kumar

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