A warehouse gives a discount to customers based on the number of units sold. The current, non- discounted price is $75/unit. Write a procedure that gets the number of units the customer is buying via an input box. Send that number of units to a function which will return the discount. The original procedure will then calculate the total cost and puts all information on a spreadsheet. Be sure to properly format, via code, the information going on the spreadsheet. The discount schedule is: DISCOUNT (ON TOTAL UNITS SOLD COST) 100-200 5% 201-500 10% 501-1000 15% >1000 20%

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section8.1: Logical Functions
Problem 3QC
icon
Related questions
Question
Please write a code that would run in VBA excel and please only use the data types attached thanks
A warehouse gives a discount to customers based on the number of units sold. The current, non-
discounted price is $75/unit. Write a procedure that gets the number of units the customer is buying via
an input box. Send that number of units to a function which will return the discount. The original
procedure will then calculate the total cost and puts all information on a spreadsheet. Be sure to
properly format, via code, the information going on the spreadsheet. The discount schedule is:
DISCOUNT (ON TOTAL
COST)
UNITS SOLD
100-200
5%
201-500
10%
501-1000
15%
>1000
20%
Transcribed Image Text:A warehouse gives a discount to customers based on the number of units sold. The current, non- discounted price is $75/unit. Write a procedure that gets the number of units the customer is buying via an input box. Send that number of units to a function which will return the discount. The original procedure will then calculate the total cost and puts all information on a spreadsheet. Be sure to properly format, via code, the information going on the spreadsheet. The discount schedule is: DISCOUNT (ON TOTAL COST) UNITS SOLD 100-200 5% 201-500 10% 501-1000 15% >1000 20%
Data Types.pdf
Data Type or Required
Variable
Default Value
Range
Subtype
Memory
Prefix
Integer
2 bytes
int
-32,768 to 32,767
Long
4 bytes
Ing
-2,147,483,648 to 2,147,486,647
Single
4 bytes
sng
-3402823E38 to -1.401298E-45 or 1.401298E-45 to
3.402823E38
Double
8 bytes
dbl
-1.79769313486232E308 to -4.94065645841247E-324 or
1.79769313486232E308 to 4.94065645841247E324
8 bytes
-922,337,203,477.5808 to 922,337,203,685,477.5807
Currency
cur
Date
8 bytes
00:00:00
dtm
January 1, 100 to December 31, 9999
Number of spaces to
String's
length
String
str
1 to 65,400 characters
accommodate string
(fixed length)
Object
4 bytes
Nothing (vbNothing)
obj
Any Office object, ActiveX component or Class object
2 bytes
-1 (true) or 0 (false)
Boolean
False
bln
Transcribed Image Text:Data Types.pdf Data Type or Required Variable Default Value Range Subtype Memory Prefix Integer 2 bytes int -32,768 to 32,767 Long 4 bytes Ing -2,147,483,648 to 2,147,486,647 Single 4 bytes sng -3402823E38 to -1.401298E-45 or 1.401298E-45 to 3.402823E38 Double 8 bytes dbl -1.79769313486232E308 to -4.94065645841247E-324 or 1.79769313486232E308 to 4.94065645841247E324 8 bytes -922,337,203,477.5808 to 922,337,203,685,477.5807 Currency cur Date 8 bytes 00:00:00 dtm January 1, 100 to December 31, 9999 Number of spaces to String's length String str 1 to 65,400 characters accommodate string (fixed length) Object 4 bytes Nothing (vbNothing) obj Any Office object, ActiveX component or Class object 2 bytes -1 (true) or 0 (false) Boolean False bln
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Database connectivity
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L