Hi guys. I am currently having trouble getting the right excel function combination for a particular question that has asked me to use the IF, OR, AND function together to produce a certain percentage discount. This is the question:
"The Purchase Volume Discount % (heading “Purchase Volume Discount %”) is a strategy used to encourage ‘large volume’ orders. The current business rule is as follows: There is no ‘volume discount’ on ‘Bananas’. There is no ‘volume discount’ if the purchaser is already entitled to the ‘Preferred Purchaser Discount’. Any order satisfying either one of these conditions will disqualify the customer from receiving “Preferred Purchaser Discount”. For all other products (‘Apples’, ‘Pears’, and ‘Pineapples’) and all ‘non‐preferred’ customers the discount will apply if (1) the order is greater than or equal to 20kg, AND (2) the customer lives in the suburbs of Sandgate OR Boondall. The discount is 5%."
Below is the table that pertains to this question. The solution is to be answered under the purchase volume discount which I have bolded in the table below. This is in excel 2013 if that's relevant. I have tried this "=IF(AND(E9>=20,OR(B9="Sandgate",B9="Boondall",D8:D20<>"Bananas",G9=G9,G9=G12,G9=G17,G9=G18)),"5%","No discount")" but it didn't seem to work. If anyone can help I will be very grateful. Thank you in advance.
[TABLE="width: 1305"]
<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Purchaser Name[/TD]
[TD]Suburb[/TD]
[TD]Purchase
Date[/TD]
[TD]Product Ordered[/TD]
[TD]Volume Ordered (kg)[/TD]
[TD]Total Order Cost/Kg[/TD]
[TD]Preferred Purchaser Discount %[/TD]
[TD]Purchase Volume Discount %[/TD]
[TD]Total Order Cost[/TD]
[/TR]
[TR]
[TD]Smith[/TD]
[TD]Aspley[/TD]
[TD="align: right"]42563[/TD]
[TD]Apples[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]$2.15[/TD]
[TD="align: right"]10%[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Butler[/TD]
[TD]Sandgate[/TD]
[TD="align: right"]42566[/TD]
[TD]Pears[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]$1.65[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Dorney[/TD]
[TD]Boondall[/TD]
[TD="align: right"]42570[/TD]
[TD]Bananas[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]$1.65[/TD]
[TD="align: right"]8%[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thomas[/TD]
[TD]Sunnybank[/TD]
[TD="align: right"]42570[/TD]
[TD]Pineapples[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]$1.62[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Higgins[/TD]
[TD]Enoggera[/TD]
[TD="align: right"]42571[/TD]
[TD]Apples[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]$2.15[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Simmons[/TD]
[TD]Tarragindi[/TD]
[TD="align: right"]42571[/TD]
[TD]Pears[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]$1.65[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Monroe[/TD]
[TD]Deagon[/TD]
[TD="align: right"]42572[/TD]
[TD]Bananas[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]$1.65[/TD]
[TD="align: right"]6%[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Moore[/TD]
[TD]Mt Cootha[/TD]
[TD="align: right"]42573[/TD]
[TD]Pineapples[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]$1.62 [/TD]
[TD]No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]White[/TD]
[TD]Indooroopilly[/TD]
[TD="align: right"]42574[/TD]
[TD]Apples[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]$2.15 [/TD]
[TD]No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thompson[/TD]
[TD]Toowong[/TD]
[TD="align: right"]42576[/TD]
[TD]Pears[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]$1.65[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jonas[/TD]
[TD]Logan City[/TD]
[TD="align: right"]42578[/TD]
[TD]Bananas[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]$1.65 [/TD]
[TD]No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Drysdale[/TD]
[TD]Sandgate[/TD]
[TD="align: right"]42581[/TD]
[TD]Pineapples[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]$1.62[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Total Volume[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Total Cost[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
"The Purchase Volume Discount % (heading “Purchase Volume Discount %”) is a strategy used to encourage ‘large volume’ orders. The current business rule is as follows: There is no ‘volume discount’ on ‘Bananas’. There is no ‘volume discount’ if the purchaser is already entitled to the ‘Preferred Purchaser Discount’. Any order satisfying either one of these conditions will disqualify the customer from receiving “Preferred Purchaser Discount”. For all other products (‘Apples’, ‘Pears’, and ‘Pineapples’) and all ‘non‐preferred’ customers the discount will apply if (1) the order is greater than or equal to 20kg, AND (2) the customer lives in the suburbs of Sandgate OR Boondall. The discount is 5%."
Below is the table that pertains to this question. The solution is to be answered under the purchase volume discount which I have bolded in the table below. This is in excel 2013 if that's relevant. I have tried this "=IF(AND(E9>=20,OR(B9="Sandgate",B9="Boondall",D8:D20<>"Bananas",G9=G9,G9=G12,G9=G17,G9=G18)),"5%","No discount")" but it didn't seem to work. If anyone can help I will be very grateful. Thank you in advance.
[TABLE="width: 1305"]
<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Purchaser Name[/TD]
[TD]Suburb[/TD]
[TD]Purchase
Date[/TD]
[TD]Product Ordered[/TD]
[TD]Volume Ordered (kg)[/TD]
[TD]Total Order Cost/Kg[/TD]
[TD]Preferred Purchaser Discount %[/TD]
[TD]Purchase Volume Discount %[/TD]
[TD]Total Order Cost[/TD]
[/TR]
[TR]
[TD]Smith[/TD]
[TD]Aspley[/TD]
[TD="align: right"]42563[/TD]
[TD]Apples[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]$2.15[/TD]
[TD="align: right"]10%[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Butler[/TD]
[TD]Sandgate[/TD]
[TD="align: right"]42566[/TD]
[TD]Pears[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]$1.65[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Dorney[/TD]
[TD]Boondall[/TD]
[TD="align: right"]42570[/TD]
[TD]Bananas[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]$1.65[/TD]
[TD="align: right"]8%[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thomas[/TD]
[TD]Sunnybank[/TD]
[TD="align: right"]42570[/TD]
[TD]Pineapples[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]$1.62[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Higgins[/TD]
[TD]Enoggera[/TD]
[TD="align: right"]42571[/TD]
[TD]Apples[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]$2.15[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Simmons[/TD]
[TD]Tarragindi[/TD]
[TD="align: right"]42571[/TD]
[TD]Pears[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]$1.65[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Monroe[/TD]
[TD]Deagon[/TD]
[TD="align: right"]42572[/TD]
[TD]Bananas[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]$1.65[/TD]
[TD="align: right"]6%[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Moore[/TD]
[TD]Mt Cootha[/TD]
[TD="align: right"]42573[/TD]
[TD]Pineapples[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]$1.62 [/TD]
[TD]No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]White[/TD]
[TD]Indooroopilly[/TD]
[TD="align: right"]42574[/TD]
[TD]Apples[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]$2.15 [/TD]
[TD]No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Thompson[/TD]
[TD]Toowong[/TD]
[TD="align: right"]42576[/TD]
[TD]Pears[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]$1.65[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Jonas[/TD]
[TD]Logan City[/TD]
[TD="align: right"]42578[/TD]
[TD]Bananas[/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]$1.65 [/TD]
[TD]No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Drysdale[/TD]
[TD]Sandgate[/TD]
[TD="align: right"]42581[/TD]
[TD]Pineapples[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]$1.62[/TD]
[TD] No discount[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Total Volume[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Total Cost[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]