How to combine a sumproduct formula with vlookup or index match

ripina

New Member
Joined
Nov 2, 2015
Messages
14
Using SUMPRODUCT I can test to see if a value (things) is found withing the Text cell (text column B).
I want to expand on that result and if TRUE, then fetch the value in the Other Things (column G) and place it in column D.

In the example I included the correct result or value that the formula should produce.


Excel 2010
ABCDEFGH
1
2
3
4TextResultResult 2ThingsOther Things
5Yellow dog on the grassTRUEspoonyellowspoon
6Warm gray sweaterFALSEFALSEorangecouch
7A red sun on the horizonFALSEFALSEgreencar
8Blue neon signs everywhereTRUEhousebluehouse
9Waves of color of TurquoisFALSEFALSEpinkbird
10Wearing hot pink socksTRUEbird
11Deep black eyesFALSEFALSE
12
13
14
Sheet3
Cell Formulas
RangeFormula
D8=G8
D10=G9
D5=G5
C5=SUMPRODUCT(--ISNUMBER(SEARCH($F$5:$F$9,B5)))>0
C6=SUMPRODUCT(--ISNUMBER(SEARCH($F$5:$F$9,B6)))>0
C7=SUMPRODUCT(--ISNUMBER(SEARCH($F$5:$F$9,B7)))>0
C8=SUMPRODUCT(--ISNUMBER(SEARCH($F$5:$F$9,B8)))>0
C9=SUMPRODUCT(--ISNUMBER(SEARCH($F$5:$F$9,B9)))>0
C10=SUMPRODUCT(--ISNUMBER(SEARCH($F$5:$F$9,B10)))>0
C11=SUMPRODUCT(--ISNUMBER(SEARCH($F$5:$F$9,B11)))>0
 
Last edited:

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Let's see if this will float the boat.

BCDEFG
TextResultResult 2ThingsOther Things
Yellow dog on the grassyellowspoon
Warm gray sweaterorangecouch
A red sun on the horizongreencar
Blue neon signs everywherebluehouse
Waves of color of Turquoispinkbird
Wearing hot pink socks
Deep black eyes

<colgroup><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]4[/TD]

[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="bgcolor: #E2EFDA, align: right"]TRUE[/TD]
[TD="bgcolor: #A9D08E"]spoon[/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="bgcolor: #E2EFDA, align: right"]FALSE[/TD]
[TD="bgcolor: #A9D08E"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]

[TD="bgcolor: #E2EFDA, align: right"]FALSE[/TD]
[TD="bgcolor: #A9D08E"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]

[TD="bgcolor: #E2EFDA, align: right"]TRUE[/TD]
[TD="bgcolor: #A9D08E"]house[/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]

[TD="bgcolor: #E2EFDA, align: right"]FALSE[/TD]
[TD="bgcolor: #A9D08E"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]10[/TD]

[TD="bgcolor: #E2EFDA, align: right"]TRUE[/TD]
[TD="bgcolor: #A9D08E"]bird[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]11[/TD]

[TD="bgcolor: #E2EFDA, align: right"]FALSE[/TD]
[TD="bgcolor: #A9D08E"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet21

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: #DAE7F5"]C5[/TH]
[TD="align: left"]=SUMPRODUCT(--ISNUMBER(SEARCH($F$5:$F$9,B5)))>0[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: #DAE7F5"]D5[/TH]
[TD="align: left"]=IF(SUMPRODUCT(--ISNUMBER(SEARCH($F$5:$F$9,B5)))>0,INDEX($G$5:$G$9,SUMPRODUCT(ISNUMBER(SEARCH($F$5:$F$9,B5))*(ROW($G$5:$G$9)-ROW($G$4)))),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,011
Members
452,374
Latest member
keccles

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