One table is a list of package types with allowed weight and charges:
So I have:
Parcel Name
Exact Parcel Type
Min Allowed Weight
Max Allowed Weight
Standard fee EU> UK
Promotional fee EU > UK
as per image:
then I have a table that contains:
productid, parcelname, weight
SKU123, ExtraLargeEnvelope, 459,99
For each product id I need to extract the appropriate promotional fee eu>uk and I would do that by matching parcel names in both columns and finding the row where weight falls between min allowed weight and max allowed weight. How do I do that in excel ?
If it makes it any clearer I was able to achieve that in mysql with the following query:
SELECT
p.sku, p.asin, efn.exact_parcel_type, efn.promotionalfeeeuuk
FROM
products p
JOIN
efneuuk efn ON p.product_size_weight_band = efn.parcel_name
WHERE
p.item_package_weight BETWEEN efn.minallowedweight AND efn.maxallowedweight
GROUP BY p.sku;