Hands on VBA for
Accounting, Finance and
Strategy Professionals
-Hands on Workshop
Dr Nala FinSys Consulting & Training
[Link] 1
• 1
• D
• 0
• 4
• 8
• 5
• X
• 7
• 6
• 1 f 6 3 8 # Dr4 Nala FinSys Consulting & Training
[Link] 2
Agenda
Dr Nala FinSys Consulting & Training [Link] 3
[Link]
Building Blocks – MS Excel and VBA
Key MS Excel Concepts, Functions and Techniques
Excel Macros
VBA Architecture
VBA Macros (UDF)
Programming in MS Excel
Dr Nala FinSys Consulting & Training [Link] 4
[Link]
Key MS Excel Concepts
• Referencing
Dr Nala FinSys Consulting & Training [Link] 5
[Link]
Key MS Excel Concepts
• Naming of Cells
Dr Nala FinSys Consulting & Training [Link] 6
[Link]
Building
REFERENCING NAMING CELLS & KEY FUNCTIONS AND
Blocks – Key RANGES AND THEIR
USE IN CALCULATION
FORMULAS
MS Excel /
VBA
concepts, and
EXCEL MACROS – VBA ARCHITECTURE DESIGNING EXCEL
CREATING AND SHEET WITH
EDITING MACROS CONTROLS
Dr Nala FinSys Consulting & Training [Link] 7
• Fixed (Absolute) Referencing
• Relative Referencing
Referencing • Mixed Referencing
• Absolute + Relative Referencing
[Link]
(TERM-SCHK);(ITAX-SCHM)
8
Dr Nala FinSys Consulting & Training [Link]
[Link]
Formulas – > Name Manager
Benefits
Naming a Cell [Link]
(Balance Sheet)
/ Range
[Link] (Scenario Analysis)
Cell Name vs Range Name
Dr Nala FinSys Consulting & Training [Link] 9
[Link]
• Significance of “Round” in calculations
[Link] (DEP-WDV-SCHL)
Formulas & • IF, SUMIF, SUMIFS Trial [Link]
• Summing Top / Bottom ‘n’ values Trial [Link]
Functions (array formula)
• NPV; IRR [Link] (NPVnIRR)
• Construction of Frequency Table [Link] (Freq)
• Analysis ToolPak
• Simulation [Link] (Simulation)
• Goal Seek Financial Modelling [Link]
(MicroModels) contd.,
10
Dr Nala FinSys Consulting & Training [Link]
[Link]
Contd.,
Date (Net Work Days) [Link] (Freq)
Scenario Analysis Financial Modelling [Link]
(Micro Models; Scenario Summary 2)
Formulas & • [Link](ScenarioAnalysis)
Functions • Data Table Financial Modelling [Link]
(Dtable)
• Standard Deviation [Link] (STDDEV)
• Array formula :
[Link] SALARIES-
SCHG&H)
• Regression, Forecast and Trend Line [Link]
(Regrn)
11
Dr Nala FinSys Consulting & Training [Link]
Developer
• Creating an Excel Macro (Absolute and
Creating and Relative)
editing Excel Invoking Macro –
• Calling Shortcut Key
Macros • View Menu
• Assigning Macro to Quick Access Tool Bar
• Creating a Button in the Work Sheet
• Editing a Macro
12
Dr Nala FinSys Consulting & Training [Link]
• Excel Object Model
• Properties
• Methods
VBA • Procedures, Sub Routines, Functions and
Architecture their Scope
• Variables and their Scope
• Control Tools (Command Buttons, User
Forms)
• Syntax Construction
13
Dr Nala FinSys Consulting & Training [Link]
• Calling a UDF (VBA Macro) in Excel Sheet
Calling a UDF Financial Modelling [Link]
(COTBAS)
14
Dr Nala FinSys Consulting & Training [Link]
• Is the heart and soul of VBA for MS Excel
Excel Object Hierarchy
VBA • Application
Architecture - • Workbook Trial [Link] (Checksnbal)
• Worksheet
Excel Objects • Range
• Row [Link] (XLnMac – New
Supplier Ln 118)
• Cell
• Buttons, User Forms etc.,
15
Dr Nala FinSys Consulting & Training [Link]
Object
Properties
• Dimensions and Characteristics of Objects
16
Dr Nala FinSys Consulting & Training [Link]
Methods
• What we can do with the objects based on
their properties
17
Dr Nala FinSys Consulting & Training [Link]
BYTE 1 byte Number from 0 to 255 for storing binary data
INTEGER 2 Integer from -32 768 to 32 767.
LONG 4 Integer from -2 147 483 648 to 2 147 483 647
SINGLE 4 Numeric data type with float precision to 6 decimal digits
Numeric data type with float precision with double precision in
DOUBLE 8
calculatons
Data Type CURRENCY 8 A number with fixed 4 decimal digits
Numeric data type with fixed precision and scale (accuracy upto
DECIMAL 14
28).
STRING Text strings. Flexible length or 64 kilobytes
BOOLEAN 2 Logical value (true or false)
DATE 8 The date in the range from 1.1.100 to 31.12.9999
OBJECT 4 Reference to an object.
Basic type. May contain special value Null, numeric value, text,
VARIANT 16
reference to object or variable array.
Dr Nala FinSys Consulting & Training [Link] 18
Form Controls
Control
Tools
Active X
Controls
Dr Nala FinSys Consulting & Training [Link] 19
Function Procedures
Procedures
Insert – Module /VBA Editor
[Link] (Main)
Sub Procedures
Dr Nala FinSys Consulting & Training [Link] 20
Storing Value in Variables
-Calculate Tax and Enter the Tax [Link]
-Passing Values and Enter Value in User Specified Location(calling
Programming
other Procedures / Functions) [Link]
in VBA for -Checking whether TB is tallied - Trial [Link] (Checksnbal)
Excel Do While .. Loop [Link] (Iterate100Times)
Opening & Naming New Workbooks, Creating & Naming Sheets
(While … Wend) [Link]
Keeping Ledger Accounts in XL If ..End If
[Link] Check Each Row (For Each Row…. Next Row)
Dr Nala FinSys Consulting & Training [Link] 21
Storing Value in Variables
-Calculate Tax and Enter the Tax [Link]
-Passing Values and Enter Value in User Specified Location(calling
Creating
other Procedures / Functions) [Link]
Controls and -Checking whether TB is tallied - Trial [Link] (Checksnbal)
Alerts Do While .. Loop [Link] (Iterate100Times)
Opening & Naming New Workbooks, Creating & Naming Sheets
(While … Wend) [Link]
Keeping Ledger Accounts in XL If ..End If
[Link] Check Each Row (For Each Row…. Next Row)
Dr Nala FinSys Consulting & Training [Link] 22
Analysis of Case
• Features of the Case
• Analysis of the requirements
Dr Nala FinSys Consulting & Training [Link] 23
[Link]
Building the Models
• Identify the Component Models
• Define the Scope of the Component Models
• Design the Models
• Design the Controls Sheet
• Input the Parameters
Dr Nala FinSys Consulting & Training [Link] 24
[Link]
Module 6 – Preparation of Reports
Section 1 : Executive
Summary
Section 2 : Project Cost
Section 3 : Financial
Performance
Section 4 : Financial Position
Section 5 : Cash Flows
Dr Nala FinSys Consulting & Training [Link] 25
Q&A
Dr Nala FinSys Consulting & Training [Link] 26
[Link]
To reach us:
Dr. Subramanian Nalayiram
[Link]., FCA, CISA (USA), Ph.D.,
Data Sci (Johns Hopkins) +6588728260 /
subbunassociates@[Link]
Dr Nala FinSys Consulting and
Training drnala@[Link]
[Link]
Dr Nala FinSys Consulting & Training [Link] 27
[Link]