How do I extract data given a criteria from a data set into another tab?

Robotrix

New Member
Joined
Jul 6, 2014
Messages
23
I hope I can clearly explain my question here. I am seeking to extract only specific entries from a data collection of approximately 1500 rows given a specific criteria (Cell H3). I've provided a screen shot of what I"m looking at with some Mock data to help the process. To summarize: I want to be able to automatically pull Project#, section, tech, MOB, & KM within all rows from "Data Dump Sheet" that begin with "CM-GF-20", and have them appear in "Past Runs Sheet". The code "CM-GF-20" is dependent on cell H3 from "Past Runs Sheet". I'm pretty sure it involves a sub-array formula of some sorts, but I don't seem to be able to get it to work, any and all help is appreciated!



Past Runs Sheet

*ABCDEFGHIJK
1*Line Specifications**Trap Sections**Corresponding Line Code***
2***********
3*Line Number:**Launch:Cromer*CM-GF-20
***
4*Diameter:20*Receive:Gretna*****
5***********
6***********
7Past Line Runs**********
8***********
9Line CodeProject #SectionTechMOBKM*****
10***********
11***********
12***********
13***********
14***********

<tbody>
</tbody>


Data Dump Sheet

*ABCDEF
7******
8******
9Line CodeProject #SectionTechMOBKM
10CM-GF-2010121120BISN19283
11WS-NN-1210363912ACD132.91
12WNR-EB-1210363912CCLP201.06
13KB-QU-2010363920BCLP18352.63
14NN-WNR-2010363920FCLP2072.84
15YP-KB-2410363924ACLP19175.85
16YP-KB-2410363924AICR22175.85
17YP-KB-2410363924ASDY21175.85
18CM-GF-1610629216CCLP43282.7
19CM-GF-1610629216CISN77282.7
20KB-QU-2010629220DSDY72352.63
21EP-YP-2410629224ACLP55175.45
22EP-YP-2410629224BCDX69175.45
23EP-YP-2410629224BICR73175.45
24EP-YP-2410629224BSDY70175.45
25KB-QU-2410629224CICR74352.91
26KB-QU-2410629224CSDY71352.91
27EP-YP-2410629224FCDX75175.45
28KB-QU-2410629224GCDX76352.91
29QU-CM-3410629234CCDX57254.64
30YP-KB-3410629234EWMX60175.6
31NW-RE-3010764630AMF317194
32ML-CD-3010764630BCLP18206.04
33VG-PL-3610764936AM3X646.56
34CR-CS-3610764936CM3X771

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Just confirming that you are not interested in a macro approach this time?
If you are, is the "specific Tech" stored on one of the sheets somewhere? (Where?)

Peter,

I'm looking to avoid the macro approach in this instance. To make my query a little more straight forward, lets use the example from the multiple vlookups link that yourself and Aladin contributed to: http://www.mrexcel.com/forum/excel-questions/307832-multiple-vlookups.html#post1511354

Lets assume that there is no "Code" section within the data, but we would still like to pull all lines with description of "15MM Sandstone" & QTY of "3,018". Is there a way to do that? I really thought using if(and within the array formula would work, but I'm clearly doing something wrong.
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi Aladin,

I was wondering if this array approach is useable with multiple criteria? For instance, lets say I want all lines that possess the given code, but also possess a specific Tech. I've tried using IF(And( within the "Small(" section of the formula, but with no success.

Peter,

I'm looking to avoid the macro approach in this instance. To make my query a little more straight forward, lets use the example from the multiple vlookups link that yourself and Aladin contributed to: http://www.mrexcel.com/forum/excel-questions/307832-multiple-vlookups.html#post1511354

Lets assume that there is no "Code" section within the data, but we would still like to pull all lines with description of "15MM Sandstone" & QTY of "3,018". Is there a way to do that? I really thought using if(and within the array formula would work, but I'm clearly doing something wrong.

Hard to see whether these two specs mean the same. Would you give an example of a given code and a specific tech? In fact, testing for multiple conditions should be possible. AND cannot do this by the way because it returns a scalar (single) result, not an array of results...

AND(X=x1,Y=y1) where X and Y are equally sized multi-cell ranges can be re-written as:

IF(X=x1,IF(Y=y1,...
 
Upvote 0
Hey,

Sorry this took a little bit of time, I had to make up some mock data and set it up. But this is essentially what I'm looking at for my data. Basically I'm hoping to accomplish this following:

Pull all rows from the data_dump sheet that fit three criteria. These are:
1) Last Run (years) is less than or equal to the "Time Capture" criteria (in this ex. it is 10)
2) Tech is equal to the selected "Technology" criteria (in this ex. it is CDX)
3) Actual Margin is greater than or equal to "Margin" criteria (in this ex. it is 60)

As usual, thanks a ton!

Data_Dump

*ABCDEFGHIJK
1***********
2***********
3*Time Capture:10
*
Technology:
CDX
*
Margin:
60
**
4***********
5***********
6***********
7***********
8***********
9Last Run (Years)Sec NoTechActual MarginRun NoReport QtrReport YearBase CurrLease DealRemove From Order BookProject Plan
102.720BISN721Q42011USD*NY
118.212ACD01Q12006USD*NN
128.512CCLP01Q42005USD*NN
138.620BCLP02Q42005USD*NN
148.520FCLP01Q42005USD*NN
158.524ACLP02Q42005USD*NN
163.524AICR681Q12011USD*NY
173.324ASDY911Q12011USD*NY
187.616CCLP01Q42006USD*NN
192.716CISN711Q42011USD*NY
203.320DSDY951Q12011USD*NY
217.524ACLP01Q42006USD*NN
223.624BCDX931Q42010USD*NN
233.424BICR851Q12011USD*NY
243.324BSDY991Q12011USD*NY
253.524CICR861Q12011USD*NY
263.324CSDY631Q12011USD*NY
273.224FCDX811Q22011USD*NY
283.224GCDX631Q22011USD*NY
297.634CCDX01Q42006USD*NN
307.434EWMX01Q12007USD*NN
316.430AMF301Q12008USD*NN
326.630BCLP01Q12008USD*NN
333.636AM3X381Q42010USD*NN
343.636CM3X01Q42010USD*NN
354.336DICS531Q22010USD*NN
363.636DM3X791Q42010USD*NN

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:104px;"><col style="width:95px;"><col style="width:64px;"><col style="width:64px;"><col style="width:108px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Upvote 0
Data_dump, A:K, with the headers in row 9.

Sheet1 (the destination sheet)

A1: Time Capture
B1: 10

A2: Technology
B2: CDX

A3: Margin
B3: 60

Row 4, A4: Idx, B4:L4 replicates row 9 in Data_Dump

A5, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IFERROR(SMALL(IF(Data_Dump!$A$10:$A$36>=$B$1,
  IF(Data_Dump!$C$9:$C$36=$B$2,IF(Data_Dump!$D$9:$D$36>=$B$3,
  ROW(Data_Dump!$A$10:$A$36)-ROW(Data_Dump!$A$10)+1))),ROWS($A$5:A5)),"")

B5, just enter, copy across, and down:
Rich (BB code):
=IF($A5="","",INDEX(Data_Dump!$A$10:$A$36,$A5,MATCH(B$4,Data_Dump!$A$9:$K$9,0)))
 
Upvote 0
Thank-you so much again for your help. For my understanding, the And( function only has the capability to search for singular entries, while the nested if( functions you provided with me make use of the array? I'm glad you pointed that out, will make things easier down the road!
 
Upvote 0
Thank-you so much again for your help.

You are welcome.

For my understanding, the And( function only has the capability to search for singular entries, while the nested if( functions you provided with me make use of the array? I'm glad you pointed that out, will make things easier down the road!

AND like OR is capable of evaluating a multicell range (a multi-item reference). The evaluation must logically result in a single value: either TRUE or FALSE.
 
Upvote 0
Just a hint for using Excel jeanie & avoiding all those asterisks in your screen shots. They occur when your preview or edit your post. If doing either of those things, it is best if you re-Paste your jeanie code. For example, if you preview your post it is usually very easy to re-Paste the code because it is likely still on your Clipboard. If I later edit one of my posts I would go back to my Excel sheet and re-generate the jeanie code. It only takes a moment and makes the screen shot much easier for other people to copy to their own worksheet and test without first having to clear all the asterisks. :)
 
Upvote 0
Just a hint for using Excel jeanie & avoiding all those asterisks in your screen shots. They occur when your preview or edit your post. If doing either of those things, it is best if you re-Paste your jeanie code. For example, if you preview your post it is usually very easy to re-Paste the code because it is likely still on your Clipboard. If I later edit one of my posts I would go back to my Excel sheet and re-generate the jeanie code. It only takes a moment and makes the screen shot much easier for other people to copy to their own worksheet and test without first having to clear all the asterisks. :)

I thought that's what was happening! Thanks for the input and I"ll definitely keep it in mind moving forward :).
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,667
Members
449,462
Latest member
Chislobog

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