Lookup and match part lines to a purchase order number

ac7

New Member
Joined
Jul 26, 2023
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hello -

I have two worksheets, "Parts" and "Purch".

Parts:
A​
B​
C​
D​
1​
PartQtyShort?
2​
1234565N
3​
1234563Y
4​
1234565Y
5​
1234565Y

Purch:
A​
B​
C​
D​
E​
F​
G​
H​
1POLinePartQtyPromisedExpectedD?
2123112345638/11/20238/14/2023
3123212345638/18/20238/18/2023
4456112345628/25/20238/30/2023
5789112345659/1/2023
61001112345659/8/20239/8/2023D
71010112345659/15/20239/15/2023

I am looking for a way to lookup/match a part from the Parts worksheet and find the next purchase order, line, and expected date on the "Purch" worksheet that can satisfy the Parts line. Conditions:
  • If Short? on the Parts worksheet is "N", then no lookup needed.
  • If Promised on the Purch worksheet is blank, then don't use this purchase order in the results. Go to the next purchase order.
  • If D? on the Purch worksheet has a "D", then don't use this purchase order in the results. Go to the next purchase order.
  • I have some lines that might be satisfied by more than one purchase order. Is it possible to put multiple matches into the return cell? If not, then pull the last purchase order, line, and expected date that will satisfy the PO.
Here is what I am expecting for results:

A​
B​
C​
D​
E​
F​
G​
1PartQtyShort?POLineExpected
21234565N
31234563Y12318/14/2023
51234565Y123
456
2
1
8/18/2023
8/30/2023
51234565Y101019/15/2023

I wasn't sure if this is best handled by a formula or VBA. I am open to any and all ideas. I have thousands of parts that I am looking to assign purchase order numbers to. Thank you!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Bump. Hoping for any suggestions to help me accomplish this.
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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