How to lookup when lookup value repeats?

joe29

New Member
Joined
Mar 19, 2009
Messages
6
Hi everyone! <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p> </o:p>
I haven’t had any luck finding an answer to my question using the forum’s search function. Maybe I’m searching with the wrong terminology. Hopefully someone here can help me out or point me in the right direction.<o:p></o:p>
<o:p> </o:p>
I need a formula or macro that will look up a specified ID number in a specified sheet and return all rows from that sheet containing the ID number.<o:p></o:p>
<o:p> </o:p>
Example:<o:p></o:p>
<o:p> </o:p>
  • Sheet “Selection”: User enters ID “ABC01” in cell B2 and enters sheet “M2” in cell B3<o:p></o:p>
<o:p> </o:p>
  • Sheet “Model 1”: A data table. Column A is “ID” with a list of ID numbers. Each number can repeat several times. Columns B through D is misc info related to that ID number.<o:p></o:p>
<o:p> </o:p>
  • Sheet “Model 2”: A data table. Column A is “ID” with a list of ID numbers. Each ID number can repeat several times. Columns B through D is misc info related to that ID number. In this example there are 1000 rows total. Of those 1000 rows, 20 rows have “ABC01” in the ID column.

  • Sheet “Data”: This should be where the results are pasted. Columns A,B,C,D of any row that contains “ABC01” in column A of sheet “Model 2” should appear on this sheet, “Data”. Therefore, there should only be 20 rows on this sheet.<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
Likewise, if the user enters “M1” on the “Selection” sheet, I would like all rows with “ABC01” from the “Model 1” sheet to appear on the “Data” sheet.<o:p></o:p>
<o:p> </o:p>
I hope that’s enough information. I REALLY appreciate the help.<o:p></o:p>
<o:p> </o:p>
BTW, I’m using Excel 2003.<o:p></o:p>
<o:p> </o:p>
Thank you so much.<o:p></o:p>
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,214,523
Messages
6,120,034
Members
448,940
Latest member
mdusw

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