| || |
Join Date: Aug 2010
Re: Cannot highlight distinct cells in different rows and column in a Pivot table ?
To automate a repetitive task, you can quickly record a macro (macro: An action or a set of actions that you can use to automate tasks. Macros are recorded in the Visual Basic for Applications programming language.) in Microsoft Office Excel. You can also create a macro by using the Visual Basic Editor (Visual Basic Editor: An environment in which you write new and edit existing Visual Basic for Applications code and procedures. The Visual Basic Editor contains a complete debugging toolset for finding syntax, run-time, and logic problems in your code.) in Microsoft Visual Basic to write your own macro script, or to copy all or part of a macro to a new macro. After you create a macro, you can assign it to an object (such as a toolbar button, graphic, or control) so that you can run it by clicking the object. If you no longer use a macro, you can delete it.
When you record a macro, the macro recorder records all the steps required to complete the actions that you want your macro to perform.
- If the Developer tab is not available, do the following to display it:
- Click the Microsoft Office Button Button image, and then click Excel Options.
- In the Popular category, under Top options for working with Excel, select the Show Developer tab in the Ribbon check box, and then click OK.
- To set the security level temporarily to enable all macros, do the following:
- On the Developer tab, in the Code group, click Macro Security.
- Excel Ribbon Image
- Under Macro Settings, click Enable all macros (not recommended, potentially dangerous code can run), and then click OK.
- On the Developer tab, in the Code group, click Record Macro.
- In the Macro name box, enter a name for the macro.
- To assign a CTRL combination shortcut key (shortcut key: A function key or key combination, such as F5 or CTRL+A, that you use to carry out a menu command. In contrast, an access key is a key combination, such as ALT+F, that moves the focus to a menu, command, or control.) to run the macro, in the Shortcut key box, type any lowercase letter or uppercase letter that you want to use.