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
 
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

<tbody>
</tbody>
Thank you very much for your try and efforts to resolve this problem.
I dont have problem with discount adjustments, because anyways I will put manually these discounts in table (it is big job at the beginning, but that is one-time job).
The problem for me here is that I have more conditions.
As you helped me at the first case, we use helper & helper1, where we said "=Coca Cola&Fanta", and according to that you make OFFSET and everything works fine.

In this case, I have to spread that condition even more.
So we have here for example "Restaurant&Coca Cola&Fanta" (Buyer, Supplier and product) as a helper.
Another problem is that most of the buyers will be in "other buyers", so the formula should recognize buyers from the list, and if they are not listed, than to use discount from "other buyers".
And also, like in previous case, discount is related for the date.
Is it possible to do that with "helper" and OFFSET and "IF ISERROR" for helper1?
 
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
customerdiscountADJUSTproductDISCOUNTTODAY =18/12/2018
alan1.2pepsi3.7
alan1.35cola4.85123
alan1.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
NOTE
alan now has 3 separate discount codes
for pepsi, cola and nescafe

<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
alan now has 3 separate discount codes
for pepsi, cola and nescafe

<tbody>
</tbody>
I will have 20 main buyers and 1 "other", where I should have all who are not mentioned in this 20 main buyers.
Also I have aprox 250 products at this moment (which can be more in future), so this table will need more than 5000 lines, which could be unreadable.
That is why I am trying to put this buyers in columns, not in rows, and to see is it possible to link it with data which we predefined at the beginning of this problem :) .

https://www.dropbox.com/s/kvaem9ub8g9mry4/Report (1).xlsx?dl=0
 
Upvote 0
buyertypeTODAY =18/12/2018
buy1MAIN
buy99other
buy2MAIN
buy3MAIN
buy70other
buy71other
buy72other
buy73other
buy74other
buyers
buy1
buy2
buy3
buy4
buy5
the main in cell B2 derived bybuy6
buy7
=IF(ISERROR(MATCH(A2,$H$17:$H$36,0)),"other","MAIN")buy8
buy9
buy10
buy11
buy12
buy13
buy14
so now you only have to maintain the list of main buyersbuy15
buy16
buy17
buy18
buy19
buy20

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

Forum statistics

Threads
1,216,084
Messages
6,128,724
Members
449,465
Latest member
TAKLAM

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