{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


2011_09_22_Project_10_VBA_analysis - in succession three...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
VBA PROJECT ASSIGNMENT @ 22 September 2011 Write a program to compute the customer billing amount (BILL) for a given energy usage (EUSE) in kilowatt-hours (kWh), where the charges are a certain rate (RATE) in $/kWh for the first 100 kWh and are a different rate (DRATE) for usage in excess of 100 kWh. Which means for 140 kWh usage the first 100 kWh would be charged at RATE and the remaining 40 kWh would be charged at DRATE. Your program should have the following VBA steps: - Start and name your ‘Sub’ - Dimension all of your variables as necessary - Have the program ask you for the necessary variable values: RATE – the cost, in $, for each kWh, to the first 100 kWh DRATE – the cost, in $, for each kWh above 100 kWh - Have the program then use a ‘Do-Loop’ or a ‘For-Next’ routine where it will calculate
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: in succession three separate billing values’ (NOTE: see examples from class)- In succession, for each of the latter three iterations, have the program then ask you to enter a total EUSE value for energy consumption- Determine the billing amount, in dollars and cents- Print the answer to the screen (e.g., “The bill for 100 kWh will be $31.20”)- Copy the VBA output screen with your answers- Paste this copy onto your answer sheet- REPEAT this You should use the following values: RATE: $0.12/kWh DRATE: $0.42/kWh EUSE: 85 kWh, 170 kWh and 340 kWh NOTE: the following example cut-and-paste answers are NOT correct for the latter given values! NOTE: this approach for multiple billing strategies is actually used by electric power companies!...
View Full Document

{[ snackBarMessage ]}

Page1 / 2

2011_09_22_Project_10_VBA_analysis - in succession three...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online