Search a table and return rows based on criteria of 2 cells

slugwisper

New Member
Joined
Aug 20, 2018
Messages
3
Hello!

I'm looking to search a table like the the one below. In a separate sheet in the workbook, I'd like to have the "Subject" as multiple columns and list underneath it all of the titles that match the subject and have the language in english. I tried working a combination of index and match but i was getting entire rows of data instead of just the title. I would greatly appreciate any help!

<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style><style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<colgroup><col style="width: 100px"><col width="100"><col width="182"></colgroup><tbody>[TR]
[TD]Title[/TD]
[TD]Language[/TD]
[TD]Subject[/TD]
[/TR]
[TR]
[TD]Idioms[/TD]
[TD]english[/TD]
[TD]language-arts[/TD]
[/TR]
[TR]
[TD]Refranes[/TD]
[TD]spanish[/TD]
[TD]language-arts[/TD]
[/TR]
[TR]
[TD]Name That Character Trait[/TD]
[TD]english[/TD]
[TD]language-arts[/TD]
[/TR]
[TR]
[TD]Nombra el rasgo del personaje[/TD]
[TD]spanish[/TD]
[TD]language-arts[/TD]
[/TR]
[TR]
[TD]Telling Stories[/TD]
[TD]english[/TD]
[TD]language-arts[/TD]
[/TR]
[TR]
[TD]Contar una historia[/TD]
[TD]spanish[/TD]
[TD]language-arts[/TD]
[/TR]
[TR]
[TD]Todo sobre la Energía[/TD]
[TD]spanish[/TD]
[TD]physical-science-and-engineering[/TD]
[/TR]
[TR]
[TD]All About Energy[/TD]
[TD]english[/TD]
[TD]physical-science-and-engineering[/TD]
[/TR]
[TR]
[TD]Build an Epic Sandcastle![/TD]
[TD]english[/TD]
[TD]physical-science-and-engineering[/TD]
[/TR]
[TR]
[TD]Construye un castillo de arena épico[/TD]
[TD]spanish[/TD]
[TD]physical-science-and-engineering[/TD]
[/TR]
[TR]
[TD]Just Press Print![/TD]
[TD]english[/TD]
[TD]physical-science-and-engineering[/TD]
[/TR]
[TR]
[TD]Solo presiona imprimir[/TD]
[TD]spanish[/TD]
[TD]physical-science-and-engineering[/TD]
[/TR]
[TR]
[TD]Making Better Bubbles[/TD]
[TD]english[/TD]
[TD]physical-science-and-engineering[/TD]
[/TR]
[TR]
[TD]Címo hacer mejores burbujas[/TD]
[TD]spanish[/TD]
[TD]physical-science-and-engineering[/TD]
[/TR]
[TR]
[TD]Making Crayons[/TD]
[TD]english[/TD]
[TD]physical-science-and-engineering[/TD]
[/TR]
</tbody>[/TABLE]


Want to return:

<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>[TABLE="width: 0"]
<colgroup><col style="width: 186px"><col width="145"></colgroup><tbody>[TR]
[TD]physical-science-and-engineering[/TD]
[TD]language-arts[/TD]
[/TR]
[TR]
[TD]All About Energy[/TD]
[TD]Idioms[/TD]
[/TR]
[TR]
[TD]Build an Epic Sandcastle![/TD]
[TD]Name That Character Trait[/TD]
[/TR]
[TR]
[TD]Just Press Print![/TD]
[TD]Telling Stories[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How about
In B1 copied right
=IFERROR(INDEX(Sheet1!$C$2:$C$16,MATCH(0,INDEX(COUNTIF($A$1:A$1,Sheet1!$C$2:$C$16),0),0)),"")
and in B2 copied down & across
=IFERROR(INDEX(Sheet1!$A$2:$A$16,AGGREGATE(15,6,(ROW(Sheet1!$A$2:$A$16)-ROW(Sheet1!$A$2)+1)/((Sheet1!$B$2:$B$16="english")*(Sheet1!$C$2:$C$16=B$1)),ROWS($A$1:$A1))),"")
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,629
Members
452,661
Latest member
Nonhle

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