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
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Thank you again.
If it was Fanta, discount would be 7% if it was invoiced until 30.04.2018.
If date of invoice is from 30.04.2018. until 25.08.2018., discount is 8% for fanta.-
For Sprite discount is 6% until 25.08.2018, from 25.08.2018 until 28.09.2018 is 7%.
If it was some product which is supplied by Coca Cola, but it is not in list "Product name" (column I), like Coca Cola zero for example, than take discount from name of supplier (Coca Cola, column H), and ignore column I "Product name".
 
Upvote 0
buyersupplierproddatedishelper1
CSCOCcoca28/01/20185COC
CSCOCfan23/07/20188COCfan
CSPEPpepsi16/08/20189PEP
CSNESnesc21/11/20183NESmytable
FFPEP7up05/02/201810PEP
FFCOCccz01/05/20186COC
FFNESnesg30/08/20186NESnesg123
RPEPmir15/03/20188PEPmirhelpersupplierproduct30/04/201825/08/201828/09/2018
RCOCspr30/06/20186COCsprCOCCOC565
RCOCcoca15/07/20186COCCOCfanCOCfan788
RNESnese29/09/20183NESCOCsprCOCspr667
RNESnesa31/10/20183NESNESNES423
GSPEPspr13/03/2018#N/APEPsprNESnesNESnes323
GSPEPmir23/08/20188PEPmirNESnesgNESnesg566
GSNESneso15/11/201812NESnesoNESnesoNESneso101012
PEPPEP10911
PEPmirPEPmir889
mytable2
01/01/20181
01/05/20182
29/09/20183
31/12/20183
does this look along the right lines ?

<colgroup><col span="3"><col><col span="9"><col span="3"><col span="2"></colgroup><tbody>
</tbody>
 
Upvote 0
can cocacola and pepsi both supply sprite ?
I made mistake, there should be 7up. This is just example of my problem so I made some mistakes, because full table is something like 500k lines, but when I resolve this problem in example, I will resolve everything.
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,509
Members
448,967
Latest member
screechyboy79

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