8.22: Assignment- Create Macro for Car Loan Spreadsheet
In this assignment, we will record a macro and run it to modify a spreadsheet of car loan data received on a weekly basis. After recording a macro for the first week, run the macro on a new set of data for week two.
To complete this assignment, download the car loan file here . Follow the directions, then submit your assignment. If you get stuck on a step, review this module and ask your classmates for help in the discussion forum.
- Open the workbook and save the new Module 8 assignment file to the Rowan folder on your desktop as BA132_LastName_CarLoans.xlsx, replacing “LastName” with your own last name. (Example: BA132_Hywater_Memo) It is a good idea to save your work periodically.
-
Scenario:
Each week you receive a worksheet filled with car loan data. To make it easier to analyze on a weekly, record a macro and change the worksheet look, calculate the monthly loan payment amount and identify which loans are leases. (Hint: Read through all the instructions first and practice going through the steps before starting the macro recording.)
-
Record Macro:
Open the spreadsheet and from the View tab or the Developer tab start a macro recording. Name the macro whatever you would like, add a short-cut key (optional), and write a description for it.
-
Once the recording is started walk through these steps, then stop the recording.
-
Change the title row to any color, change the font color if needed, and bold the titles.
-
Change all the currency columns to a currency format (this includes the PV, Annual Income, Total Payment).
-
Change the Interest Rate column to a percentage (%).
- Add in a new column to the right of the Interest Rate column and call it PMT.
- Financial Function: In the new column use the PMT function and calculate the monthly payment amount for the first loan. (Remember the rate needs to be divided by 12 to get the monthly payment and place a minus sign before the PV cell (-B2) if you don’t want the negative red numbers.)
-
Autofill the rest of the column with the formula to discover each loan’s monthly payment amount.
-
Add filters to column titles and sort the monthly payment amount from the highest to the lowest.
-
Use conditional formatting in the ‘Ownership Type’ column to highlight all car leases in red.
- Select the entire table and autofit the columns to be wide enough to fit all the data
- Stop the macro recording.
-
Once the recording is started walk through these steps, then stop the recording.
- Select ‘Week 2’ worksheet tab containing a new week of information. (Note: Make a copy of this tab first in case you need to redo the Macro. Remember once a Macro is run there is no going back with ‘Undo Typing’ option.)
-
Run the new macro and watch the new information change almost instantly.
-
Save your work by selecting Save As and choose Excel Macro-Enabled Workbook.
- Submit the document in your course online.
Contributors and Attributions
CC licensed content, Original
- Assignment: Create Macro for Car Loan Spreadsheet. Authored by : Sherri Pendleton. Provided by : Lumen Learning. License : CC BY: Attribution