Hi everyone,
I'm trying to solve this problem in an easy way. I have a database (1000s+ lines) with lines of sellers ID's and amount of sales over a time period. Each seller has a different commission percentage. I want to calculate the total amount of commission to be paid in one formula.
So far I have been doing this by having a different tab where I calculate the total commission calculate for each vendors with SUMIF and VLOOKUP:
For example for seller "AA" I want to have (1000+2200)*0.05:
=SUMIF(A:A;"AA";B:B)*VLOOKUP("AA";D:D;2)
And then sum the results I get of each seller vendors
Works fine but I want an easier way to do it in one short formula. Maybe using INDEX and Match? But I'm not to sure how to use it.
[TABLE="class: grid, width: 448"]
<colgroup><col span="2"><col><col span="3"></colgroup><tbody>[TR]
[TD] [/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]Seller[/TD]
[TD]Sold Value[/TD]
[TD] [/TD]
[TD="colspan: 2"]Commission Rule[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]AA[/TD]
[TD="align: center"]1000[/TD]
[TD] [/TD]
[TD]AA[/TD]
[TD="align: right"]5%[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]BB[/TD]
[TD="align: center"]1500[/TD]
[TD] [/TD]
[TD]BB[/TD]
[TD="align: right"]6%[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]AA[/TD]
[TD="align: center"]2200[/TD]
[TD] [/TD]
[TD]CC[/TD]
[TD="align: right"]4%[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]CC[/TD]
[TD="align: center"]3200[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]BB[/TD]
[TD="align: center"]2000[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
Thanks for your help!
P:S: Bonus if the formula includes a lookup for sellors with blank ID !
I'm trying to solve this problem in an easy way. I have a database (1000s+ lines) with lines of sellers ID's and amount of sales over a time period. Each seller has a different commission percentage. I want to calculate the total amount of commission to be paid in one formula.
So far I have been doing this by having a different tab where I calculate the total commission calculate for each vendors with SUMIF and VLOOKUP:
For example for seller "AA" I want to have (1000+2200)*0.05:
=SUMIF(A:A;"AA";B:B)*VLOOKUP("AA";D:D;2)
And then sum the results I get of each seller vendors
Works fine but I want an easier way to do it in one short formula. Maybe using INDEX and Match? But I'm not to sure how to use it.
[TABLE="class: grid, width: 448"]
<colgroup><col span="2"><col><col span="3"></colgroup><tbody>[TR]
[TD] [/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]Seller[/TD]
[TD]Sold Value[/TD]
[TD] [/TD]
[TD="colspan: 2"]Commission Rule[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]AA[/TD]
[TD="align: center"]1000[/TD]
[TD] [/TD]
[TD]AA[/TD]
[TD="align: right"]5%[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]BB[/TD]
[TD="align: center"]1500[/TD]
[TD] [/TD]
[TD]BB[/TD]
[TD="align: right"]6%[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD]AA[/TD]
[TD="align: center"]2200[/TD]
[TD] [/TD]
[TD]CC[/TD]
[TD="align: right"]4%[/TD]
[/TR]
[TR]
[TD="align: right"]5[/TD]
[TD]CC[/TD]
[TD="align: center"]3200[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD]BB[/TD]
[TD="align: center"]2000[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
Thanks for your help!
P:S: Bonus if the formula includes a lookup for sellors with blank ID !