Retrieving rows from array

mjpereira

New Member
Joined
Feb 1, 2018
Messages
2
Hello all !

I am having difficulty with the following:
I have a sheet with lots of data; there is a specific array of data from which i need to retrieve the entire row (or selected columns), matching a simple criteria, i.e., the contents of one of the arrays´ cell.

Illustrating:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]APP1[/TD]
[TD]BLAH[/TD]
[TD]SERVER1[/TD]
[TD]OS1[/TD]
[TD]PRD[/TD]
[/TR]
[TR]
[TD]APP1[/TD]
[TD]BLAH[/TD]
[TD]SERVER2[/TD]
[TD]OS2[/TD]
[TD]PRD[/TD]
[/TR]
[TR]
[TD]APP1[/TD]
[TD]BLAH[/TD]
[TD]SERVER3[/TD]
[TD]OS1[/TD]
[TD]DEV[/TD]
[/TR]
[TR]
[TD]APP1[/TD]
[TD]BLAH[/TD]
[TD]SERVER4[/TD]
[TD]OS2[/TD]
[TD]QUA[/TD]
[/TR]
[TR]
[TD]APP1[/TD]
[TD]BLAH[/TD]
[TD]SERVER5[/TD]
[TD]OS1[/TD]
[TD]DEV[/TD]
[/TR]
[TR]
[TD]APP1[/TD]
[TD]BLAH[/TD]
[TD]SERVER6[/TD]
[TD]OS2[/TD]
[TD]PRD[/TD]
[/TR]
[TR]
[TD]APP1[/TD]
[TD]BLAH[/TD]
[TD]SERVER7[/TD]
[TD]OS2[/TD]
[TD]QUA[/TD]
[/TR]
</tbody>[/TABLE]

So, i would like to extract the rows where the contents of the 5th column match "PRD" for example. That would return rows 1, 2 and 6.
I have been messing with the formula « =INDEX($M$27:$V$127;MATCH($D$4;$R$27:$R$127;0);0) » but it returns only the first column, unless i spread it over some cells, enter the formula and CTRL+SHIFT+ENTER it. Even so, i have to know beforehand the number of results.

Bottom line, is there a function that searches for a value, gathers the rows where that value is present and pastes the result (as a table or whatever) in another place ?

Thanks in advance !
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Have you tried using filters?

Hello, and thanks for your input.

I have not tried filters, i don´t believe it would give the result i want. i´d like no manual input at all.
For context, the range from which i want to extract this information comes from an external data source, updated automatically. Essentially, i want to "clip" a subset of that range, filter some information, and paste the resulting rows somewhere else.
 
Upvote 0

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