I am trying to do a search that is returning the incorrect result. Here is the data.
Sheet1
<colgroup> <col style="WIDTH: 30px; FONT-WEIGHT: bold"> <col style="WIDTH: 164px"> <col style="WIDTH: 76px"></colgroup> <tbody>
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="bgcolor: #cacaca, align: center"]9[/TD]
</tbody>
Here is my formula:
The result I'm receiving A. The correct result is B and D since "Car" and House" are in rows 3 and 5.
The search part
is assigning 1 to "Car" and 2 to "House", which equals 3.
How do I correct my formula or is there a solution?
Sheet1
B | C | |
Dog Cat | A | |
Zebra House Car | B | |
Mouse Computer Keyboad | C | |
Car House | D | |
Correct Result | ||
B | ||
D |
<colgroup> <col style="WIDTH: 30px; FONT-WEIGHT: bold"> <col style="WIDTH: 164px"> <col style="WIDTH: 76px"></colgroup> <tbody>
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="bgcolor: #cacaca, align: center"]9[/TD]
</tbody>
Here is my formula:
Code:
=INDEX($C$2:$C$5,SMALL(IF(SUMPRODUCT(NOT(ISERR(SEARCH({"Car","House"},$B$2:$B$5)))*{1,2})=3=TRUE,ROW($B$2:$B$5)-ROW($B$2)+1),ROWS($B$12:$B12)))
The result I'm receiving A. The correct result is B and D since "Car" and House" are in rows 3 and 5.
The search part
Code:
SEARCH({"Car","House"},$B$2:$B$5)))*{1,2})=3
How do I correct my formula or is there a solution?