FE 102

PROGRAMMING ASSIGNMENT #8

 

OBJECTIVES: 1.  To become familiar with basic programming principles and to apply them using Visual Basic for Applications (VBA) in Excel.

REFERENCE: Introduction to VBA for Excel, Chapters 4 and 5.

ASSIGNMENT: Do the following problems from the Power Programming text:

 

Chapter 4

Problem 1(4.4), p 37. There will be two arguments in your function. Read these in from two cells in your worksheet. Output the result to another cell in your worksheet located two rows below the input cells. Put headers next to the input and output cells so that it's clear what the values are. For your final submission, input the values 23 and 45. 

In addition to the code, submit a hardcopy of your Excel worksheet.

Problem 2 (4.5), p. 37. 

a. The problem asks you to name the cells for that contain the input values. Instead read your function values in from worksheet cells.

b. So that we can see your function, put the function into your worksheet so that it displays (remove the equal sign from in front of the function in other words).

In addition to the code, submit a hardcopy of your Excel worksheet.

Chapter 5

Problem 2 (5.2), p. 52. Input and output all values using worksheet cells. Do this twice in your worksheet for each of the cases. Put these side-by-side and label them Case 1 and Case 2. List the root values (what is x?) that are determined for both cases. You do not have to address the imaginary root case.  In addition to the code, submit a hardcopy of your Excel worksheet that shows the interface, input values, and output values. All input and output variables should be labeled.

 

YOUR JOB:

  1. Answer each question on a separate worksheet within one single workbook.  Problems with more than one part should be done on the same worksheet- be sure to label all parts.  Answer all parts of the question unless otherwise specified.  Name each worksheet with the corresponding problem number.
  2. Parts requiring a written answer should be included on the same worksheet as the remainder of the problem.
  3. Save your spreadsheet (workbook) with your last name_8.xlsm. For example I would save mine under wing_8.xlsm. Use the first column and rows 1-4 of each worksheet for your name, course number, lab day (Tuesday or Wednesday), assignment number, and problem number. In addition, save your final file to your workspace location under T:\Teach\Classes\fe102\StudentFolders\workspace (your workspace uses the first seven letters of your last name and first letter of your firstname). Make sure that nothing else but final assignments are saved to this location (delete anything else that might exist). All of your class examples and other Excel work should be saved to your ONID workspace.
  4. Submit a hardcopy of your excel worksheet output and hardcopy of your final code to me with each problem on a separate page.  It may be easiest to paste your code into a Word document for submission.  All pages should be stapled together and each page should include your name, course number, lab day (Tuesday or Wednesday), assignment number, and problem number as described above.  The problem number should contain the chapter separated from the number by a period.  Example: Problem 3 in Chapter 1 is problem number 1.3.

EVALUATION: Your programs will be evaluated according to the following:

Grading

Problems are worth 10 points each.

Seven points for correct answer.

Three points for arrangement and formatting.

 

horizontal rule

Back to main page