An EMI Calculator runs on Excel VBA Macro that calculates and compares EMIs of loans from various banks
It contains two files named Bank Details.xlsx
and EMI Calculator.xlsm
Bank Details.xlsx
is a source file in which various bank names are stored with their respective interest charges (%) and processing fees.
EMI Calculator.xlsm
is the main file where you can access the EMI Calculator by following the instructions given in that file or by just pressing Ctrl-q
in that workbook.
This macro has 2 UserForms, 1 ClassFile and 14 Modules.
- calc_ufm :
- Mail_Ufm :
- ThisWorkbook.cls : It is just used to show a prompt about enabling a set of macro settings whenever user open this workbook.
-
References_Mod.bas : It is used to check if proper references are loaded in the workbook. (e.g. Mailing options won't work if Microsoft Outlook reference is not loaded.
-
OpenCalculator_Mod.bas : It is used for showing the calculator form to user.
-
UpdateBanks_Mod.bas : It is used to source data from
Bank Details.xlsx
and save it inBank Details
worksheet ofEMI Calculator.xlsm
workbook. -
UpdateBanksLbx_Mod.bas : It contains a function that populate the list box with the banks from
Bank Details
worksheet ofEMI Calculator.xlsm
workbook. -
CalcEMI_Mod.bas : It calculates EMI of all the selected banks and other inputs given by user and make a separate worksheet
Selected Banks
for them. -
SortEMI_Mod.bas : This module sorts EMIs of Selected Banks by calling QuickSort function.
-
CreateGraph_Mod.bas : It is used to create Bar Chart of all the banks from
Selected Banks
worksheet and save it inEMI Graphs
worksheet ofEMI Calculator.xlsm
workbook. -
Print_Mod.bas : It opens the Print Preview page for the report generated by user.
-
SaveReport_Mod.bas : It is used to save the user generated report in Report_ddmmyyyy-hhmm.pdf format.
-
Email_Mod.bas : It enables the Mail Options to the user, by which user can easily mail report to anyone by specifying Email-To, Subject and Body.
-
QuickSort_Mod.bas : A module that sorts EMIs of Selected Banks by using QuickSort Algorithm.
-
PatternMatching_Mod.bas : It is used for pattern matching used in Email and other variables by using RegEx.
-
Swap_Mod.bas : It contains a function to swap the values of two variables
-
createSheet_Mod.bas : It is used to create a Excel Worksheet if it is not already present.
-
fitAndFormat_Mod.bas : It contains a function that auto-fit all cells in the worksheet and change the formatting of the first row as specified.