Taking the right amount out of more than one condition

JimmyBambo

New Member
Joined
Dec 8, 2018
Messages
29
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)

 

JimmyBambo

New Member
Joined
Dec 8, 2018
Messages
29
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".
 

oldbrewer

Board Regular
Joined
Apr 11, 2010
Messages
10,985
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>
 

oldbrewer

Board Regular
Joined
Apr 11, 2010
Messages
10,985
can cocacola and pepsi both supply sprite ?
 

JimmyBambo

New Member
Joined
Dec 8, 2018
Messages
29
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.
 

Forum statistics

Threads
1,081,989
Messages
5,362,581
Members
400,683
Latest member
LogChief

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top