VBA Lookup Question

krehkop

Board Regular
Joined
Jul 6, 2007
Messages
133
Office Version
  1. 365
Platform
  1. Windows
Note: For illustration purposes, Columns E and F (Wkst 1) would normally be on a separate worksheet and columns H and I (Wkst 2) would be too.

I'm trying to design a macro that will look at a result (M or B) in column C, and if B, look for the Component Item # in Column A and using that, find all of the Purchase Orders in Wkst 1 associated with the Item Number. Ideally, I would like for the results to show in one cell - see cell B3 as an example. If Column C contained an M, it would search Wkst 2 and return the Manufacturing Order numbers associated with the lookup value - see cell B4 as an example. Thanks!
Shortage_Report_MAS200_Version(main) - Sanitized.xls
ABCDEFGHI
1ComponentPO/WOMake/ItemItem
2Item#NumberBuyPurchaseOrdersNumberManufacturingOrderNumber
3KBR11450807060807061807062807063M807060KBR11450807060KBR11450
490005000808080808081808082B8080809000500080808090005000
5KBR11450M807061KBR11450807061KBR11450
690005000B807062KBR11450807062KBR11450
7KBR11450M8080809000500080808190005000
8KBR11450M8080809000500080808290005000
9KBR11450M807063KBR11450807063KBR11450
WO Detail
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,215,054
Messages
6,122,893
Members
449,097
Latest member
dbomb1414

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