Select data based on cell value

rovert

New Member
Joined
Aug 4, 2009
Messages
22
Hi All,

I have an excel workbook with 2 sheets named "Info" and the other "Newcastle".

Info sheet consists of 100's of rows of data, see below:

[TABLE="width: 1038"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]PartNumber[/TD]
[TD]QTA[/TD]
[TD]B3_Free[/TD]
[TD]B3_Locn[/TD]
[TD]Branch[/TD]
[/TR]
[TR]
[TD]BC2020[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]Birmingham_Branch[/TD]
[/TR]
[TR]
[TD]BC2051R[/TD]
[TD]1[/TD]
[TD]43[/TD]
[TD]201C2,53A[/TD]
[TD]Newcastle_Branch[/TD]
[/TR]
[TR]
[TD]BC2056[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]Birmingham_Branch[/TD]
[/TR]
[TR]
[TD]BC2056R[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]Birmingham_Branch[/TD]
[/TR]
[TR]
[TD]BC2063[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]17D[/TD]
[TD]Builds[/TD]
[/TR]
[TR]
[TD]BC2063R[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]17D[/TD]
[TD]Birmingham_Branch[/TD]
[/TR]
[TR]
[TD]BC2065[/TD]
[TD]1[/TD]
[TD]28[/TD]
[TD]201A2[/TD]
[TD]Newcastle_Branch[/TD]
[/TR]
[TR]
[TD]BC2065R[/TD]
[TD]1[/TD]
[TD]46[/TD]
[TD]13M5[/TD]
[TD]Newcastle_Branch[/TD]
[/TR]
</tbody>[/TABLE]

The Newcastle sheet consists of just headings, see below:

[TABLE="width: 445"]
<tbody>[TR]
[TD="width: 103"]PART[/TD]
[TD="width: 92"]ORDER QTY[/TD]
[TD="width: 111"]STK[/TD]
[TD="width: 139"]LOCN
[/TD]
[/TR]
</tbody>[/TABLE]


What i need to be able to do is list all data in the Newcastle sheet where branch = Newcastle_Branch in the Info sheet..

Thank you in advance

Rovert:rolleyes:
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
This assumes the 4 columns on the Newcastle sheet are the first four columns on the Info sheet - unsure as they have different names and you havent specified what's what.

Try

in Newcastke!A2
=IFERROR(INDEX(Info!$A$2:$E$100000,AGGREGATE(15,6,ROW(Info!$E$2:$E$100000)/((Info!$E$2:$E$100000="Newcastle_Branch")),ROWS(A$2:A2))-(2-1),COLUMN()),"")
copy across and down for as many rows as you have on the Info sheet
 
Upvote 0
This assumes the 4 columns on the Newcastle sheet are the first four columns on the Info sheet - unsure as they have different names and you havent specified what's what.

Try

in Newcastke!A2
=IFERROR(INDEX(Info!$A$2:$E$100000,AGGREGATE(15,6,ROW(Info!$E$2:$E$100000)/((Info!$E$2:$E$100000="Newcastle_Branch")),ROWS(A$2:A2))-(2-1),COLUMN()),"")
copy across and down for as many rows as you have on the Info sheet

Hi Special-K99

This is how both sheets will look like after.

[TABLE="width: 649"]
<colgroup><col span="4"><col></colgroup><tbody>[TR]
[TD]Info sheet[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ShaftecNumber[/TD]
[TD]QTA[/TD]
[TD]B3_Free[/TD]
[TD]B3_Locn[/TD]
[TD]Branch[/TD]
[/TR]
[TR]
[TD]BC2020[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]Birmingham_Branch[/TD]
[/TR]
[TR]
[TD]BC2051R[/TD]
[TD]1[/TD]
[TD]43[/TD]
[TD]201C2,53A[/TD]
[TD]Newcastle_Branch[/TD]
[/TR]
[TR]
[TD]BC2056[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]Birmingham_Branch[/TD]
[/TR]
[TR]
[TD]BC2056R[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]Birmingham_Branch[/TD]
[/TR]
[TR]
[TD]BC2063[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]17D[/TD]
[TD]Builds[/TD]
[/TR]
[TR]
[TD]BC2063R[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]17D[/TD]
[TD]Birmingham_Branch[/TD]
[/TR]
[TR]
[TD]BC2065[/TD]
[TD]1[/TD]
[TD]28[/TD]
[TD]201A2[/TD]
[TD]Newcastle_Branch[/TD]
[/TR]
[TR]
[TD]BC2065R[/TD]
[TD]1[/TD]
[TD]46[/TD]
[TD]13M5[/TD]
[TD]Newcastle_Branch[/TD]
[/TR]
[TR]
[TD]BC20907[/TD]
[TD]2[/TD]
[TD]50[/TD]
[TD]0[/TD]
[TD]Newcastle_Branch[/TD]
[/TR]
[TR]
[TD]BC2093R[/TD]
[TD]14[/TD]
[TD]80[/TD]
[TD]201C1[/TD]
[TD]Newcastle_Branch[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Newcastle sheet[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]PART[/TD]
[TD]ORDER QTY[/TD]
[TD]STK[/TD]
[TD]LOCN[/TD]
[TD]PICKED[/TD]
[/TR]
[TR]
[TD]BC2051R[/TD]
[TD]1[/TD]
[TD]43[/TD]
[TD]201C2,53A[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BC2065[/TD]
[TD]1[/TD]
[TD]28[/TD]
[TD]201A2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BC2065R[/TD]
[TD]1[/TD]
[TD]46[/TD]
[TD]13M5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BC20907[/TD]
[TD]2[/TD]
[TD]50[/TD]
[TD]0[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BC2093R[/TD]
[TD]14[/TD]
[TD]80[/TD]
[TD]201C1[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Thank you in advance..

Rovert
 
Upvote 0

Forum statistics

Threads
1,223,786
Messages
6,174,551
Members
452,572
Latest member
KP53

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