EXCEL VBA MACROS: AN INTRODUCTION
… A PROFESSIONAL’S PERSPECTIVE
CA Vineet Gupta
B.Com, F.C.A, DISA(ICAI)
IP(IBBI), RV(IBBI)
📞 : +91-9811022855
: vineet@vrskca.com
WHAT IS A MACRO ?
BENEFITS OF USING MACROS
PRE-REQUISITES TO �GETTING STARTED WITH MACROS
HOW TO LEARN TO CREATE A MACRO?
HOW TO LEARN TO CREATE A MACRO?.........CONT’D
- Absolute Address : means say A5, Z8 etc
-Relative Address : means current cell or 2 rows down or 2 columns right of current cell etc
-Range(“a5”) Range(“A5:G9”)
- Cells(5,1) range(cells(5,1),cells(9,7))
Some Simple Codes that we can repeatedly use while CREATING Macros
Select a range of rows | Rows("2:7").Select |
Selecting a range of columns | Columns("B:L").Select |
Selecting a range | Range("a8:g100").Select |
Underline | Selection.Font.Underline = xlUnderlineStyleSingle |
Delete | Selection.EntireRow.Delete |
Insert | Selection.EntireColumn.Insert |
Some Simple Commands that we can repeatedly use while CREATING Macros ……Cont’d.
To Find Last Used Row in a sheet | With ActiveSheet.UsedRange�lastrow = .Rows(.Rows.Count).Row�End With |
To Find Last Used Column in a sheet | With ActiveSheet.UsedRange�lastcolumn = .Columns(.Columns.Count).Column�End With |
Selecting a range with variable | Range("A8:G" & lastrow).Select |
Sorting of Data | Recording the Macro |
Bold | Selection.Font.Bold = True |
| |
LET US SEE SOME PRACTICAL USAGE OF MACROS IN ACCOUNTANCY PRACTICE
- Proprietorship Firm - Partnership/LLP
Practical usage of macros in Accountancy Practice � Contd…….
CA Vineet Gupta
B.Com, F.C.A, DISA(ICAI)
IP(IBBI), RV(IBBI)
📞 : +91-9811022855
: vineet@vrskca.com