Hello All!
Trying to solve the following:
A purchase order is placed for a product on DATE A. (For purposes of demonstration, let's say July 1, 2022)
The product has a Part Number (which can be numeric or text) within a contract number (text) within a supplier number (text)
Prices for each Part Number can change over time depending on start and end date within a contract number and supplier number. Part Numbers can reside on multiple contracts at the same time with different suppliers.
Example:
PN123 Price within Contract ABC for Supplier XYX is:
$10 from 1/1/2020 to 12/31/2020
$12 from 1/1/2021 to 12/31/2021
$14 from 1/1/2022 to 12/31/2022
$16 from 1/1/2023 to 12/31/2023
Obviously in this simple example, DATE A in 2022 (so the price is $14)
I have many Part Numbers, Order Dates, Contracts and Suppliers so I need to look up the date range in which each order will fall so I can then look up the correct price at date.
In order to create a Lookup_Value, I have tried to concatenate SupplierNumber&ContractNumber&PartNumber but because I want the date to fall within a range of start and end dates, I can't also concatenate the PurchaseOrderDate.
I have tried concatenating SupplierNumber&ContractNumber&PartNumber&ContractStartDate in Column A of a new lookup Table_Array which The ContractRate in Column B, then setting my Lookup_value to SupplierNumber&ContractNumber&PartNumber&PurchaseOrderDate with a Range_lookup as 1 in order to catch the last date, but I can't get Excel to understand that.
What I think I need is either some way to name each array (maybe with VBA) or something that first defines the SupplierNumber section, then defines the ContractNumber within the Supplier, then defines the PartNumber within the Contract. Once I had the array defined at the correct Part Number, I could use Range_lookup of 1 to return the correct contract rate for the range of dates that my purchase order falls within.
Maybe Index Match is a better approach than VLookup. Not sure.
I've attached a sample spreadsheet. As you can I see, I also want to do the same with contract price at delivery date, but that's exactly the same mechanism as purchase order date.
Trying to solve the following:
A purchase order is placed for a product on DATE A. (For purposes of demonstration, let's say July 1, 2022)
The product has a Part Number (which can be numeric or text) within a contract number (text) within a supplier number (text)
Prices for each Part Number can change over time depending on start and end date within a contract number and supplier number. Part Numbers can reside on multiple contracts at the same time with different suppliers.
Example:
PN123 Price within Contract ABC for Supplier XYX is:
$10 from 1/1/2020 to 12/31/2020
$12 from 1/1/2021 to 12/31/2021
$14 from 1/1/2022 to 12/31/2022
$16 from 1/1/2023 to 12/31/2023
Obviously in this simple example, DATE A in 2022 (so the price is $14)
I have many Part Numbers, Order Dates, Contracts and Suppliers so I need to look up the date range in which each order will fall so I can then look up the correct price at date.
In order to create a Lookup_Value, I have tried to concatenate SupplierNumber&ContractNumber&PartNumber but because I want the date to fall within a range of start and end dates, I can't also concatenate the PurchaseOrderDate.
I have tried concatenating SupplierNumber&ContractNumber&PartNumber&ContractStartDate in Column A of a new lookup Table_Array which The ContractRate in Column B, then setting my Lookup_value to SupplierNumber&ContractNumber&PartNumber&PurchaseOrderDate with a Range_lookup as 1 in order to catch the last date, but I can't get Excel to understand that.
What I think I need is either some way to name each array (maybe with VBA) or something that first defines the SupplierNumber section, then defines the ContractNumber within the Supplier, then defines the PartNumber within the Contract. Once I had the array defined at the correct Part Number, I could use Range_lookup of 1 to return the correct contract rate for the range of dates that my purchase order falls within.
Maybe Index Match is a better approach than VLookup. Not sure.
I've attached a sample spreadsheet. As you can I see, I also want to do the same with contract price at delivery date, but that's exactly the same mechanism as purchase order date.