introspective
New Member
- Joined
- May 19, 2024
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
- MacOS
Hello all - first time on here...
I am working with a set of data where I want to select the cost per month based on the product code and the quantity. Depending on the quantity, which sits between 2 numbers, determines the cost. I have tried using index, match and the xlookups and get part of the solution. How do I allocate the right cost depending on the quantity when it sits between the min and max values for each line item? Many thanks for your help on this.
I am working with a set of data where I want to select the cost per month based on the product code and the quantity. Depending on the quantity, which sits between 2 numbers, determines the cost. I have tried using index, match and the xlookups and get part of the solution. How do I allocate the right cost depending on the quantity when it sits between the min and max values for each line item? Many thanks for your help on this.
ProductName | ProductCode | CostPerMonth | MinQuantity | MaxQuantity |
Product A | 12345 | 500.000 | 1 | 100 |
Product A | 12345 | 600.000 | 101 | 151 |
Product A | 12345 | 700.000 | 152 | 251 |
Product A | 12345 | 900.000 | 252 | 751 |
Product A | 12345 | 1000.000 | 752 | 1501 |
Product A | 12345 | 1050.000 | 1502 | 3501 |
Product A | 12345 | 2000.000 | 3502 | 7501 |
Product A | 12345 | 0.400 | 7502 | |
Product B | 67890 | 2500.000 | 1 | 100 |
Product B | 67890 | 2600.000 | 101 | 151 |
Product B | 67890 | 2900.000 | 152 | 251 |
Product B | 67890 | 3100.000 | 252 | 751 |
Product B | 67890 | 3200.000 | 752 | 1501 |
Product B | 67890 | 4000.000 | 1502 | 3501 |
Product B | 67890 | 5000.000 | 3502 | 7501 |
Product B | 67890 | 1.500 | 7502 |