Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For VBA excel Codes Please, Thanks. I have just fixed it. Write a macro that processes the following sales data (your final code should work

For VBA excel Codes Please, Thanks. I have just fixed it.

image text in transcribed

Write a macro that processes the following sales data (your final code should work with data that have any number of products, different number of price breaks, different quantities for a price break, different % of extra discount, different amount for a total discount and a list with more or fewer clients). It can be safely assumed that the data in the Products worksheet has the word Product in an anchor cell (e.g., cell A4) and the Extra Discount and If more than values are two columns to the right from the last column with price breaks. Similarly, the Total Ordered, Total Amount and Total Amount (with extra discount) columns are after skipping one column (as shown in the example below). In the worksheet named Products the following example data are given:

Thus, for example if a customer orders between 100 and 499 units of Gadget1 the unit price is $10.20 for each unit, not only for the units in excess of 100. Each customer can order different quantities of each of the gadgets. If the total dollar amount ordered by a customer exceeds $25,000.00 (number specified in cell G7 for this example three rows down from the anchor cell (i.e., cell A4 in this example) and two columns to the right of the last column with price breaks), then the customer receives an extra discount of 5% (number in cell G5 one row down from the anchor cell and two columns to the right of the last column with price breaks) of the total purchase. Note that headers in this Products worksheet are pre-specified.

Write a macro that processes the following sales data (your final code should work with data that have any number of products, different number of price breaks, different quantities for a price break, different % of extra discount, different amount for a total discount and a list with more or fewer clients). It can be safely assumed that the data in the "Products" worksheet has the word "Product" in an anchor cell (e.g., cell A4) and the "Extra Discount" and "If more than" values are two columns to the right from the last column with price breaks. Similarly, the "Total Ordered", "Total Amount" and "Total Amount (with extra discount)" columns are after skipping one column (as shown in the example below). In the worksheet named "Products" the following example data are given: Thus, for example if a customer orders between 100 and 499 units of Gadget1 the unit price is $10.20 for each unit, not only for the units in excess of 100. Each customer can order different quantities of each of the gadgets. If the total dollar amount ordered by a customer exceeds $25,000.00 (number specified in cell G7 for this example-three rows down from the anchor cell (i.e., cell "A4" in this example) and two columns to the right of the last column with price breaks), then the customer receives an extra discount of 5% (number in cell G5-one row down from the anchor cell and two columns to the right of the last column with price breaks) of the total purchase. Note that headers in this "Products" worksheet are pre-specified

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions