Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need this written in macros, not a formula please. Create the following macro: Create a function that accepts four user inputs: (1) a cash

I need this written in macros, not a formula please.

image text in transcribed

Create the following macro: Create a function that accepts four user inputs: (1) a cash flow amount; (2) a discount rate; (3) the number of periods; and (4) an indicator for which TVM calculation to compute (we call this the operation'). Name the function 'My_TVM' If the argument (operation) supplied by the user in cell C19 is the letter "P", then the function should compute and return the Present Value of the lump sum cash flow amount. If the argument (operation) supplied by the user in cell C19 is the letter "F", then the function should compute and return the Future Value of the lump sum cash flow amount. If the argument (operation) supplied by the user in cell C19 any value OTHER THAN a "P" or "F" then the function should return the numeric value -9999. NOTE: functions return values to the cell from which they are called. I have include numeric data for use in cells C16:018 - call the MY_TVM function from cell D21 Cash Flow Amou Discount Rate Number of perio Operation 200 5% 3 F Enter the letter 'P' to find the present value of the lump sum cash flow; enter the letter 'F' to find the future value of the lump sum cash flow Call the My_TVM function here: * Your function should contain NO Cells or Range commands ... ensure you pass in the data as arguments within the function () * Your function should contain a nested IF structure ** Ensure you save your Excel file as macro-enabled

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intermediate Accounting Volume 2

Authors: Kin Lo, George Fisher

4th Edition

0135220491, 9780135220498

More Books

Students also viewed these Accounting questions