Returning specfic value based on customer X spend which is an array

calvinsheep

New Member
Joined
Apr 22, 2019
Messages
2
I have a question on returning X customer's discount percentage Y, based on their Z spend amount.Ie: I have a list of 5000 customers, Various min and max spend and its corresponding discount. For customer John, i can locate John by index match among the list of customers. Then when at customer John, John has 3 different discount structure based on John's spend ($0-$1000 returns 10%, $1001 to $2000 returns 20%, $2001 to $3000 returns 30%). John has spend $1500, therefore the output I am after is 20%. How can I write this formula?I have tried using SUMPRODUCT(Customer array 5000 = John)*(Spend1500=> Min amount)*(spend1500=< max amount)*(discount="" array)
if you could kindly shed some light please, it would be much appreciated thanks.
 
Last edited by a moderator:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Welcome to Mr Excel forum

Maybe something like this


A
B
C
D
E
F
G
H
1
Customer​
Min​
Max​
Discount​
Customer​
Spend​
Result​
2
Mike​
0​
1000​
10%​
John​
1500​
20%​
3
Mike​
1001​
2000​
20%​
4
Mike​
2001​
3000​
30%​
5
John​
0​
1000​
10%​
6
John​
1001​
2000​
20%​
7
John​
2001​
3000​
30%​
8

Formula in H2
=SUMIFS(D2:D7,A2:A7,F2,B2:B7,"<="&G2,C2:C7,">="&G2)

Hope this helps

M.
 
Upvote 0
Thank You so much Marcelo!! works like a charm... i guess i was tying to over complicate things with SUMPRODUCT - as i remember i used it before for something similiar in the past!
Much appreciated..
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,872
Members
449,097
Latest member
dbomb1414

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