Extract Data onto another sheet based on Criterias

ameenuksg

Board Regular
Joined
Jul 11, 2017
Messages
83
Sample%20Data.JPG
Hi

I have Data on a sheet that looks something like this:

Zip Code/Area CodeOrder Numbers
PT
10073301

<tbody>
</tbody>
MSW
10073302

<tbody>
</tbody>
MSP
10073304

<tbody>
</tbody>
WCP
10073305

<tbody>
</tbody>
629613

<tbody>
</tbody>
10078998
8198341

<tbody>
</tbody>
10078989
129811

<tbody>
</tbody>
10075643

<tbody>
</tbody>
I want to extract specific data to be transferred onto another sheet. Is there a formula I can use to transfer order numbers that bear these area codes PT, MSW, MSP & WCP onto another sheet. I have a long list that runs to row 3000 and more to be updated on daily basis. So I would like these numbers that bear the above mentioned area codes on another sheet so that I could separately work on them. I would like that sheet to be updated automatically instead filtering, copying and pasting.

Any help would be most appreciated. Thank you in advance.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
They are exclusively numeric, I would like to have them in the order layed out in the source list
 
Upvote 0
They are exclusively numeric, I would like to have them in the order layed out in the source list

1. Define Lrow in Name Manager as referring to:

=MATCH(9.99999999999999E+307,Sheet1!$B:$B)

2. Define Code in Name Manager as referring to:

=Sheet1!$A$2:INDEX(Sheet1!$A:$A,Lrow)

3. Define Order in Name Manager as referring to:

=Sheet1!$B$2:INDEX(Sheet1!$B:$B,Lrow)

4. Define Ivec in Name Manager as referring to:

=ROW(Order)-ROW(INDEX(Order,1,1))+1

Adjust the sheet name in the above formulas if needed.

Sheet2 (the processing sheet)

Row\Col
A​
B​
1​
PT
4​
2​
MSWorder list
3​
MSP
10073301​
4​
WCP
10073302​
5​
10073304​
6​
10073305​
7​
8​

5. In B1 of Sheet2 control+shift+enter, not just enter:

=SUM(IF(ISNUMBER(MATCH(Code,$A$1:$A$4,0)),1))

6. In B3 of Sheet2 control+shift+enter, not just enter, and copy down:

=IF(ROWS($B$4:B4)>$B$1,"",INDEX(Order,SMALL(IF(ISNUMBER(MATCH(Code,$A$1:$A$4,0)),Ivec),ROWS($B$4:B4))))

7. If you would like to know which code exactly is associated with each order (not shown in the above exhibit), in C3 just enter and copy down:

=IF($B3="","",INDEX(Code,MATCH($B3,Order,0)))
 
Upvote 0
1. Define Lrow in Name Manager as referring to:

=MATCH(9.99999999999999E+307,Sheet1!$B:$B)

2. Define Code in Name Manager as referring to:

=Sheet1!$A$2:INDEX(Sheet1!$A:$A,Lrow)

3. Define Order in Name Manager as referring to:

=Sheet1!$B$2:INDEX(Sheet1!$B:$B,Lrow)

4. Define Ivec in Name Manager as referring to:

=ROW(Order)-ROW(INDEX(Order,1,1))+1

Adjust the sheet name in the above formulas if needed.

Sheet2 (the processing sheet)

Row\Col
A​
B​
1​
PT
4​
2​
MSWorder list
3​
MSP
10073301​
4​
WCP
10073302​
5​
10073304​
6​
10073305​
7​
8​

<tbody>
</tbody>


5. In B1 of Sheet2 control+shift+enter, not just enter:

=SUM(IF(ISNUMBER(MATCH(Code,$A$1:$A$4,0)),1))

6. In B3 of Sheet2 control+shift+enter, not just enter, and copy down:

=IF(ROWS($B$4:B4)>$B$1,"",INDEX(Order,SMALL(IF(ISNUMBER(MATCH(Code,$A$1:$A$4,0)),Ivec),ROWS($B$4:B4))))

7. If you would like to know which code exactly is associated with each order (not shown in the above exhibit), in C3 just enter and copy down:

=IF($B3="","",INDEX(Code,MATCH($B3,Order,0)))

Thank you do much, will try this and get back to you
 
Upvote 0

Forum statistics

Threads
1,214,883
Messages
6,122,077
Members
449,064
Latest member
MattDRT

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