Taking the right amount out of more than one condition

JimmyBambo

New Member
Joined
Dec 8, 2018
Messages
30
Hi friends,
I took picture of my problem as it is easier for me to explain on it, as I cant fully solve this problem.
So I have to determine percentage of discounts (F row) according to conditions in table on right side.
1) For different suppliers I have different discount rates on different dates,
2) For some products of suppliers I have also different discount rates.
So for example, if producer is Coca Cola, product is Coca Cola, date of invoice is 28.01.2018, discount is 5%. If it was product Fanta or Sprite, discount would be 7%.
I hope so that this is solvable, thank you in advance (y)

jTyGvDN
V57Xzxg.png
 
have you named the lower table as mytable2
if you think you have use insert name , mytable2, ok then delete it then rename it
Thank you, I forgot to change table name, now it works.
One more (and I hope so last question regarding this problem), I need to resolve problem with "buyer discount", where I will have 20 biggest buyers (in this example I have only 3 big, and one which I will put in "others"), and "other buyers", where will be every other buyer who is not named on list (in this case, that will be "R" buyer, but in real case it will be more than 100 buyers).
Buyer discounts are also linked to different dates.

buyersupplierproddatedishelper1Buyer discount
CSCOCcoca1/28/20185COC4
CSCOCfan7/23/20188COCfancolumn Kcolumn Pcolumn Tcolumn AB
CSPEPpepsi8/16/20189PEP
CSNESnesc11/21/20183NESmytable
FFPEP7up2/5/201810PEP
FFCOCccz5/1/20186COCother buyersCSFFGS
FFNESnesg8/30/20186NESnesg123123123123123
RPEPmir3/15/20188PEPmirhelpersupplierproduct4/30/20188/25/20189/28/20183/31/20189/30/201811/30/20182/28/20185/31/20188/12/20181/31/20185/31/20189/25/20181/31/20185/31/20189/25/2018
RCOCspr6/30/20186COCsprrow 10COCCOC565456445355535
RCOCcoca7/15/20186COCCOCfanCOCfan788677666576756
RNESnese9/29/20183NESCOCsprCOCspr667546545455635
RNESnesa10/31/20183NESNESNES4233133022124-12
GSCOCspr3/13/20186COCsprNESnesNESnes3231122010113-11
GSPEPmir8/23/20188PEPmirNESnesgNESnesg566345444254534
GSNESneso11/15/201812NESnesoNESnesoNESneso1010128799887981078
PEPPEP109118889777871067
PEPmirPEPmir889766765675855row 18
mytable2Column1
1/1/20181
5/1/20182
9/29/20183
12/31/20183

<tbody>
</tbody>
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
are biggest buyers defined by you or is it the top 20 by sales value (ie the top 20 is dynamic) . You already calculate discount by product and by date, so you could give the top 20 an extra 1% discount ????
 
Upvote 0
are biggest buyers defined by you or is it the top 20 by sales value (ie the top 20 is dynamic) . You already calculate discount by product and by date, so you could give the top 20 an extra 1% discount ????
I will define 20 biggest buyers manually
I will also put manually discount per supplier, product and by date. It will be variable from buyer to buyer, and different for different dates. These numbers for discounts are put randomly.
So I will have 20 biggest buyers, and 1 column for other buyers.
Every big buyer will have their discount.
Discounts could be changed three times in year, so they should be linked with date of invoice.
 
Upvote 0
How about a list of all buyers in first column and their discount status in column 2 - this will act as a lookup table so discounts will be applied correctly ? (in your main table)
 
Upvote 0
How about a list of all buyers in first column and their discount status in column 2 - this will act as a lookup table so discounts will be applied correctly ? (in your main table)
Can you show me in short line how did you imagine that?
As I already said, this is just example table, real table have more than 200 suppliers, will it make problem for your idea?
 
Upvote 0
highdisc
supplier11
supplier21
supplier31
supplier41.01
supplier51
supplier61
supplier71.01
supplier81
supplier91.01
supplier101
let us say just 3 suppliers, 4 7 and 9 get higher discounts
let us say they get an extra 1%
now in your main table you calculate
discount according to product sold
just look up in this table to see if a particular
supplier gets higher discount
so you calculate discount as before
and multiply it by
in the case of supplier 4
=VLOOKUP(supplier4,highdisc,2)

<colgroup><col width="64" span="10" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
now in your main table you calculate
discount according to product sold
just look up in this table to see if a particular
supplier gets higher discount
so you calculate discount as before
and multiply it by
in the case of supplier 4
=VLOOKUP(supplier4,highdisc,2)

<tbody>
</tbody>
Good idea, but I can not use it in my case, because discount is not proportional.
For example, one buyer will have bigger discount on cola, but not on pepsi, and second one will have bigger discount on nescafe, but lower on coca cola. Discount for buyers are not related with discount which I get from suppliers.
So basically I had to put in separate rows discount for 20 buyers, and other buyers will have same discount in one row. The reason why I am putting discount in rows is because supplier and products are in columns, so I just expand current table.
 
Upvote 0
before I retired I was a business improvement leader for a major company and saw many examples of bolt on tweaks to systems - we recommended a complete redesign. In your case say you have just 2 customers bill and fred and they each buy only cola, pepsi and nescafe. You need a look up table as below

fredcola.......4
fredpepsi.....3.7
frednescafe.....7.2
billpeps1.......6.5
billcola........4.75
bill nescafe 7.77

the beauty of this is you can tweak the percentages in this table any time you like

if you have hundreds of customers you can assign each one a discount rating of D1 D2 D3 which can also be changed whenever you want
 
Upvote 0
You're welcome
Hi MickG,
any code for this problem?
Discount from buyer:
- 20 manually defined buyers will have their discounts
- All other buyers which are not on listed will have same discount (under "other buyers")
other problem are similar to previous problem.
If it is possible to solve with code, maybe it will be easier than with formula.
I really appreciate your hard work(y)

https://www.dropbox.com/s/tvoxybq81pepmo6/Report (1).xlsx?dl=0
 
Upvote 0
customerdiscountADJUSTproductDISCOUNTTODAY =18/12/2018
alan0pepsi2.5
bill0cola3.5123
colin1.5nescafe601/10/201801/01/201901/04/2019
dave0pepsi2.531/12/201831/03/201930/06/2019
ed0.8cola4.3pepsi2.52.72.9
fred0.6nescafe5.1cola3.53.84MYTABLE
george0pepsi2.5nescafe4.54.64.7
harry0cola3.501/01/20181
ian0nescafe4.531/12/20181
31/03/20192
30/06/20193
with this approach you can change both the amounts in the regular discount table
and the discount adjust amounts
eg you could make fred a 0 and make bill a 0.7

<colgroup><col><col><col><col><col><col><col span="3"><col span="3"><col span="2"><col><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,216,095
Messages
6,128,795
Members
449,468
Latest member
AGreen17

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