Vba Excel 2010 2013 and 2016 Tutorial pdf.300
Vba Excel 2010 2013 and 2016 Tutorial pdf.300
Introduction
A macro is a series of instructions which can be issued using a single command. The
macro can be invoked in various different ways - from the keyboard (using a Control key
combination), from a special icon on a toolbar or through the menu system. Ideally, you
need to know a programming language (Microsoft Visual Basic) to create really useful
macros; the examples below give you an introduction to macro writing.
2. Set the Macro name: as Sum and the Shortcut key: to Ctrl+ S (i.e. press <Shift> + s to give an
uppercase S)
Note that case matters - avoid existing key combinations: <Ctrl s> is currently set to the Save
command.
3. Store macro in: This Workbook - the alternative is to store it in your Personal Macro Workbook,
which would make the macro available every time you used Excel
4. Amend the Description: if you like (use this to say what the macro does & who recorded it)
5. Press <Enter> or click on [OK] to start recording
You now need to carry out the keystrokes required:
6. Press <Ctrl Home> (or click on A1) to make sure the macro starts in cell A1
7. Hold down <Ctrl> and press <down arrow> to move the active cell to the end of column A
8. Release <Ctrl> then press <down arrow> once more to move to cell A52
9. Press <Alt => (or click on the [AutoSum] button on the HOME tab) then press <Ctrl Enter> to
confirm the formula =SUM(A2:A51) and stay in cell A52
10. Next, press <Ctrl b> (or click on the [Bold] button) to embolden the result
11. Click on the green square in the bottom right-hand corner of cell A52 and drag the formula in
A52 across to E52 to automatically fill the totals for all the columns (these may be rounded up)
12. Click on the DEVELOPER tab then on [Stop Recording] to end the macro
You should now have a macro which sums up the values in column A. Test out the macro as follows:
13. First, press <Delete> to empty the cells A52 to E52
14. Hold down the <Ctrl> and <Shift> keys together and type the letter s - the sums appear again in
bold characters in cells A52 to E52
Microsoft Excel 2013 Macros
Click Here