130 PCWorld MARCH 2020
HERE’S HOW HOW TO CREATE EXCEL MACROS
course, because you are calculating all the
values in cell C2 from the first tab Boston
through the last tab Denver and entering the
totals in cell C2 of the Master. Then Enter key
is pressed).
- Up arrow, Ctrl+ C [Moves cursor back
up to cell C2 and copies this formula] - Right- Right- Shift- Right- Right-
Right Enter [moves cursor to the right twice
and stops on cell E2, press the Shift key and
hold down while moving to the right three
times, which highlights cells E2 thru H2,
then press the Enter key]. - [While these cells are still highlighted,
press] Shift+ Ctrl+ 4. - Alt+ T+ M+ R [Press these keys
simultaneously or select the
Developer tab and click
Stop Recording].
Save, copy, and
distribute
- Ctrl+ Home.
2. Save the Master file,
MasterDB.
3. Send copies of the
MasterDB to all store
managers.
DEBUGGING
YOUR MACROS
Debugging macros in Excel
is actually easier than you
might think. Printing and
reading through your macros will help you
learn more about how Excel’s macro
language (Visual Basic) works. You don’t
have to be a programmer to debug macros,
and the more you know, the easier it gets.
- First, create a simple macro so you can
see what the various instructions look like in
Visual Basic. - Select the Developer tab, then click
the Record macro icon/button. - Enter the keystrokes that perform the
task you are automating, then click the
Macro Stop icon/button. - To view your macro, click the Macros
icon/button or press Alt+ F8. - The Macros dialog appears,
Enter+ calculate formulas in Master for multiple sheets.