0% found this document useful (0 votes)
47 views27 pages

Handson VBA

Uploaded by

drnalafinsys
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views27 pages

Handson VBA

Uploaded by

drnalafinsys
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

Hands on VBA for

Accounting, Finance and


Strategy Professionals

-Hands on Workshop

Dr Nala FinSys Consulting & Training


https://www.4kfinlearntech.com 1
• 1
• D
• 0
• 4
• 8
• 5
• X
• 7
• 6
• 1 f 6 3 8 # Dr4 Nala FinSys Consulting & Training
https://www.4kfinlearntech.com 2
Agenda

Dr Nala FinSys Consulting & Training https://www.4kfinlearnte 3


ch.com
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 https://www.4kfinlearnte 4


ch.com
Key MS Excel Concepts
• Referencing

Dr Nala FinSys Consulting & Training https://www.4kfinlearnte 5


ch.com
Key MS Excel Concepts
• Naming of Cells

Dr Nala FinSys Consulting & Training https://www.4kfinlearnte 6


ch.com
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 https://www.4kfinlearntech.com 7


• Fixed (Absolute) Referencing
• Relative Referencing
Referencing • Mixed Referencing
• Absolute + Relative Referencing
Highereducationbookpc484101114.xlsm
(TERM-SCHK);(ITAX-SCHM)

8
Dr Nala FinSys Consulting & Training https://www.4kfinlearnte
ch.com
Formulas – > Name Manager

Benefits

Naming a Cell Highereducationbookpc484101114.xlsm


(Balance Sheet)
/ Range
StatAnal.xlsm (Scenario Analysis)

Cell Name vs Range Name

Dr Nala FinSys Consulting & Training https://www.4kfinlearnte 9


ch.com
• Significance of “Round” in calculations
Highereducationbookpc484101114.xlsm (DEP-WDV-SCHL)

Formulas & • IF, SUMIF, SUMIFS Trial Balance.xlsm


• Summing Top / Bottom ‘n’ values Trial Balance.xlsm
Functions (array formula)
• NPV; IRR StatAnal.xlsm (NPVnIRR)
• Construction of Frequency Table StatAnal.xlsm (Freq)
• Analysis ToolPak
• Simulation StatAnal.xlsm (Simulation)
• Goal Seek Financial Modelling Template1.xlsm
(MicroModels) contd.,

10
Dr Nala FinSys Consulting & Training https://www.4kfinlearnte
ch.com
Contd.,
 Date (Net Work Days) StatAnal.xlsm (Freq)
 Scenario Analysis Financial Modelling Template1.xlsm
(Micro Models; Scenario Summary 2)
Formulas & • StatAnal.xlsm(ScenarioAnalysis)

Functions • Data Table Financial Modelling Template1.xlsm


(Dtable)
• Standard Deviation StatAnal.xlsm (STDDEV)
• Array formula :
Highereducationbookpc484101114.xlsm SALARIES-
SCHG&H)
• Regression, Forecast and Trend Line StatAnal.xlsm
(Regrn)
11
Dr Nala FinSys Consulting & Training https://www.4kfinlearntech.com
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 https://www.4kfinlearntech.com
• 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 https://www.4kfinlearntech.com
• Calling a UDF (VBA Macro) in Excel Sheet
Calling a UDF Financial Modelling Template1.xlsm
(COTBAS)

14
Dr Nala FinSys Consulting & Training https://www.4kfinlearntech.com
• Is the heart and soul of VBA for MS Excel
Excel Object Hierarchy
VBA • Application

Architecture - • Workbook Trial Balance.xls (Checksnbal)


• Worksheet
Excel Objects • Range
• Row Chap7XLnMac.xlsm (XLnMac – New
Supplier Ln 118)
• Cell
• Buttons, User Forms etc.,

15
Dr Nala FinSys Consulting & Training https://www.4kfinlearntech.com
Object
Properties
• Dimensions and Characteristics of Objects

16
Dr Nala FinSys Consulting & Training https://www.4kfinlearntech.com
Methods
• What we can do with the objects based on
their properties

17
Dr Nala FinSys Consulting & Training https://www.4kfinlearntech.com
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 https://www.4kfinlearntech.com 18


Form Controls
Control
Tools
Active X
Controls
Dr Nala FinSys Consulting & Training https://www.4kfinlearntech.com 19
Function Procedures

Procedures
Insert – Module /VBA Editor

workingmaterials2.xlsm (Main)

Sub Procedures

Dr Nala FinSys Consulting & Training https://www.4kfinlearntech.com 20


Storing Value in Variables

-Calculate Tax and Enter the Tax workingmaterials2.xlsm

-Passing Values and Enter Value in User Specified Location(calling

Programming
other Procedures / Functions) workingmaterials2.xlsm

in VBA for -Checking whether TB is tallied - Trial Balance.xlsm (Checksnbal)

Excel Do While .. Loop StatAnal.xlsm (Iterate100Times)

Opening & Naming New Workbooks, Creating & Naming Sheets


(While … Wend) workingmaterials2.xlsm

Keeping Ledger Accounts in XL If ..End If


Chap7XLnMac.xlsm Check Each Row (For Each Row…. Next Row)

Dr Nala FinSys Consulting & Training https://www.4kfinlearntech.com 21


Storing Value in Variables

-Calculate Tax and Enter the Tax workingmaterials2.xlsm

-Passing Values and Enter Value in User Specified Location(calling

Creating
other Procedures / Functions) workingmaterials2.xlsm

Controls and -Checking whether TB is tallied - Trial Balance.xlsm (Checksnbal)

Alerts Do While .. Loop StatAnal.xlsm (Iterate100Times)

Opening & Naming New Workbooks, Creating & Naming Sheets


(While … Wend) workingmaterials2.xlsm

Keeping Ledger Accounts in XL If ..End If


Chap7XLnMac.xlsm Check Each Row (For Each Row…. Next Row)

Dr Nala FinSys Consulting & Training https://www.4kfinlearntech.com 22


Analysis of Case
• Features of the Case
• Analysis of the requirements

Dr Nala FinSys Consulting & Training https://www.4kfinlearnte 23


ch.com
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 https://www.4kfinlearnte 24


ch.com
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 https://www.4kfinlearntech.com 25


Q&A

Dr Nala FinSys Consulting & Training https://www.4kfinlearnte 26


ch.com
To reach us:

Dr. Subramanian Nalayiram


M.Com., FCA, CISA (USA), Ph.D.,
Data Sci (Johns Hopkins) +6588728260 /
[email protected]
Dr Nala FinSys Consulting and
Training [email protected]
https://www.4kfinlearntech.com

Dr Nala FinSys Consulting & Training https://www.4kfinlearnte 27


ch.com

You might also like