Create a workbook with the first two worksheets called “Television Ads” and “Con
ID: 665319 • Letter: C
Question
Create a workbook with the first two worksheets called “Television Ads” and “Conversion Rates”. They have to be identical to the worksheets shown below when the workbook is first opened. Additional worksheets are allowed.
Television Ads worksheet
You are thinking of buying television ads for your new Excel consulting firm. The price of the ads drops depending on the number purchased. Initially, when the workbook is opened the user will see:
Say the user enters 8 in the “Ads” box:
After hitting the Enter key:
Do not display a cost until a value is entered in D14. You can assume that the number of ads entered will be ? 1.
Conversion Rates worksheet
The user enters the amount of the foreign currency to purchase in G8. For example, the user could enter 100:
The user then chooses a foreign currency in cell I8. Cell I8 contains a drop down list with the following options: US Dollar, and Euro. See p. 595 of the text for instructions on how to create a drop-down list. Assume the user chooses “Euro”.
The cost to purchase 100 Euros is then displayed in G10:
Do not display anything in G10 until the user has entered both the quantity and currency. Use current Bank of Montreal exchange rates from the Web.
Computing the Cost of Television Ads Number of ads Price per add 1-5$ 10,000 6-10 $ 9,000 11-20$ 8,000 21 or more 7,000 10 12 13 Ads: 15 16 17 Total Cost:Explanation / Answer
you can create a simple excel macro for doing this.
place a command button
Private Sub CommandButton1_Click()
UserForm1.Show
End Sub
initialize the form values
Private Sub UserForm_Initialize()
With ListBox1
.AddItem "Euro"
.AddItem "Us Dollar"
.AddItem "British Pound"
End With
With ListBox2
.AddItem "Euro"
.AddItem "Us Dollar"
.AddItem "British Pound"
End With
ListBox1.ListIndex = 1
ListBox2.ListIndex = 0
TextBox1.Value = 1
TextBox2.Value = 0.722152
End Sub
perform the conversion on command button
Private Sub CommandButton1_Click()
Dim rates(0 To 2, 0 To 2) As Double, i As Integer, j As Integer
rates(0, 0) = 1
rates(0, 1) = 1.38475
rates(0, 2) = 0.87452
rates(1, 0) = 0.722152
rates(1, 1) = 1
rates(1, 2) = 0.63161
rates(2, 0) = 1.143484
rates(2, 1) = 1.583255
rates(2, 2) = 1
For i = 0 To 2
For j = 0 To 2
If ListBox1.ListIndex = i And ListBox2.ListIndex = j Then TextBox2.Value = TextBox1.Value * rates(i, j)
Next j
Next i
End Sub
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.