Download Importing COST function to the Team file

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Importing COST function to the
Team file
When it is difficult or very complicated to compute with built-in Excel
functions, we can seek help from custom programming. InMarketing
particular, the Visual
Calculus, Mathematics,
Tests, Homework, Computers
Basic language can be used to construct user defined functions
in any Excel file.
Computer
These are accessed via pull-down menus, in the same way that the built-in
Drives
functions are used.
on the project
Given the complexity of our cost function, it is desirable to custom
program the formula in Visual Basic and attach it to the Excel file. This has been
done in Marketing Focus.xls, with the resulting function, COST, being placed in the
list of functions under User Defined. Look in the formula bar for Cell E125 in the
sheet Functions of Marketing Focus.xls to see how the function is used.
To view the Visual Basic code for COST in Office 2007, click on the
Developer tab, then on Visual Basic. In earlier versions, click on
Tools/Macro/Visual Basic Editor. In the side bar, select VBAProjects (Marketing
Focus.xls), double click on Modules, then double click on Module1.
D, R, C, & P, Focus
Marketing
Focus.xls
Class Project
(material continues)

T
C
I

on the project
Marketing
Calculus, Mathematics,
Tests, Homework, Computers
Computer
Drives
You are not expected to do any Visual Basic programming in Calculus for
Business Decisions. However, you will probably find it convenient to use the
function COST while working on your team’s project. To transfer the Cost function
from Marketing Focus.xls into another Excel file, open both files. Open Module1
(as directed above), click on its icon in the side bar under VBAProject (Marketing
Focus.xls) and drag the icon into the VBAProject side bar area of the new file.
You can also move modules containing macros or custom functions with
export/import. To do this, open the module, click on File/Export File, then select a
folder to contain a copy of the module. To attach the module to another Excel file,
open the Visual Basic Editor in that file, click on File/Import File, and open the
module.
D, R, C, & P, Focus
Marketing
Focus.xls
Class Project
(material continues)

T
C
I
