Searching for a value return corresponding row

melbwarrior

New Member
Joined
Apr 19, 2018
Messages
16
Hi

I am looking to search for certain value and then return the associated row.

For example Sample Data:

[TABLE="width: 242"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Dept[/TD]
[TD]Age[/TD]
[/TR]
[TR]
[TD]Henry[/TD]
[TD="align: right"]501[/TD]
[TD="align: right"]28[/TD]
[/TR]
[TR]
[TD]Stan[/TD]
[TD="align: right"]201[/TD]
[TD="align: right"]19[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD="align: right"]101[/TD]
[TD="align: right"]22[/TD]
[/TR]
[TR]
[TD]Larry[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]29[/TD]
[/TR]
[TR]
[TD]Lynn[/TD]
[TD="align: right"]201[/TD]
[TD="align: right"]22[/TD]
[/TR]
[TR]
[TD]Harry[/TD]
[TD="align: right"]401[/TD]
[TD="align: right"]21[/TD]
[/TR]
[TR]
[TD]Joe[/TD]
[TD="align: right"]101[/TD]
[TD="align: right"]23[/TD]
[/TR]
[TR]
[TD]Lynn[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]30
[/TD]
[/TR]
</tbody>[/TABLE]

The search Criteria would be "Lynn"

The idea result would be:

[TABLE="width: 242"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Dept[/TD]
[TD]Age[/TD]
[/TR]
[TR]
[TD]Lynn[/TD]
[TD="align: right"]201[/TD]
[TD="align: right"]22[/TD]
[/TR]
[TR]
[TD]Lynn[/TD]
[TD="align: right"]301[/TD]
[TD="align: right"]30
[/TD]
[/TR]
</tbody>[/TABLE]

So effectively returning all rows in the date set on where the Cell reads "Lynn".

Any help would be much appreciated.

Thanks
 

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.

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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