1

I am trying to write a formula to lookup a value based on two columns, with one being an exact match and one approximate.

I have been looking at https://exceljet.net/formula/index-and-match-with-multiple-criteria, but that only works for both being exact matches.

The project is regarding customer pricing discounts. Each customer is assigned a discount group, with has quantity breaks depending on how many they order.

So for example:

Discount Group  Qty Break   % Discount
A               0           0%
A               50          10%
A               100         20%
B               0           0%
B               100         15%
B               200         25%

So if a customer in group B orders 150 units, I want to lookup B in the first column, and then the value below 150, so 100, and return 15% discount.

Hope that makes sense! Thanks.

1 Answer 1

2

try,

=aggregate(14, 7, c:c/((a$1:a$99="B")*(b$1:b$99<=150)), 1)
Sign up to request clarification or add additional context in comments.

2 Comments

Sorry to be a pain; do you know if this can return text values as well as numeric? For large quantities, it needs to return "Speak to Manager".
Maybe =if(qty>999, "speak with manager", aggregate(14, 7, ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.