PowerPoint Presentation

1 of
Published on Video
Go to video
Download PDF version
Download PDF version
Embed video
Share video
Ask about this video

Page 1 (0s)

Getting Starting With Microsoft Excel Macros.

Page 2 (8s)

What is Macro?. If you perform a task repeatedly you cam take advantage of a macro to automate the task. A macro is a series of functions written in a programming language that is grouped in a single command to perform the requested task automatically. Excel macros are used to save time and reduce the possibility of human error by automating repetitive processes. Macros use programming but you don’t need to be a programmer or have programming knowledge to use them ( though it certainly does help)..

Page 3 (31s)

Why Macros use?. Macros are used to save time and reduce the possibility of human error by automating repetitive processes. Other reasons for using macros include: •Standardization •Improving efficiency •Expanding excels’s capabilities •Streaming procedures.

Page 4 (45s)

Macro Examples. The application of Automation in the design process is virtually unlimited. Some real world examples of excel automation at work: Export to word , PPT, email, etc. Reset a spreadsheet template to blank Allow users who has little experience with excel to do complicated tasks. Automatically create folders. Combine multiple workbooks into one . And so on and so on . The possibilities are nearly limitless.

Page 5 (1m 7s)

VBA. VBA stands for Visual Basic for Applications and is a simple programming language that is available through excel Visual Basic Editor(VBE), which is available from the DEVELOPER tab on the ribbon. When you record a macro, excel generates VBA code. If you want to record a macro and run it , there is no need to learn excel VBA . However, if you want to modify a macro , then you can do it only by modifying the VBA code in the excel VBA editor..

Page 6 (1m 31s)

Macro Code In VBA. You can record and run micros from Excel even if you do not know Excel VBA . However, if you have to modify a recorded macro or create a macro by writing VBA code, you should learn Excel VBA . You can refer to the Excel VBA tutorial in this tutorial library for this . However, you should know to view the macro code. You can learn how to access VBA editor in Excel and about the different parts of the VBA. Editor . You can learn how to view macro code in VBA excel editor and you can understand the macro in the code –understanding macro code..

Page 7 (2m 1s)

How to create Macros. Macros within Excel are created by two primary methods: Using the macro recorder. Writing custom code with the macro editor. To view macros in a workbook: Go to view tab at top>Macros Keyboard shortcut: Alt+F8..

Page 8 (2m 17s)

Macro Recorder. One method for creating macros is by recording your mouse actions by: Going to view > Macros>Record Macro Enter the name to hn click OK Excel is now recording your actions until you click the stop button in the left hand corner. Do &Don’t Don’t : Record more than is absolutely necessary. Don’t: Use the UNDO button when recording a macro. Do : Check each macro after its recorded..

Page 9 (2m 39s)

Excel Macros Creation. You can create a macro with Excel commands by recording the key strokes and mouse clicks, giving the macro a name and specifying how to store the macros . A macro thus recorded can be run with an excel command..

Page 10 (2m 59s)

Macro Recorder. The Macro Recorder, a very useful tool included in Excel VBA, records every task you perform with Excel. All you have to do is record a specific task once. Next, you can execute the task over and over with the click of a button. The Macro Recorder is also a great help when you don't know how to program a specific task in Excel VBA. Simply open the Visual Basic Editor after recording the task to see how it can be programmed..

Page 11 (3m 22s)

Record a Macro. On the developer tab, click Record Macro..

Page 12 (3m 32s)

Enter a name. Select This Workbook from the drop-down list. As a result, the macro will only be available in the current workbook..

Page 13 (3m 44s)

Note: if you store your macro in Personal Macro Workbook, the macro will be available to all your workbooks (Excel files). This is possible because Excel stores your macro in a hidden workbook that opens automatically when Excel starts. If you store your macro in New Workbook, the macro will only be available in an automatically new opened workbook. Click OK..

Page 14 (4m 4s)

Right mouse click on the active cell (selected cell). Be sure not to select any other cell! Next, click Format Cells..

Page 15 (4m 15s)

Select percentage. Click OK..

Page 16 (4m 23s)

Finally click Stop Recording. Congraulations. You’ve just recorded a macro with the Macro Recorder!.

Page 17 (4m 33s)

Run a recorded Macro. Now we’ll test the macro to see if it can change the number format to Percentage. 1. Enter some numbers between 0 and 1. 2. Select the numbers..

Page 18 (4m 47s)

3.On the Developer tab , Click OK..

Page 19 (4m 56s)

4.Click Run..

Page 20 (5m 4s)

5.Result:.

Page 21 (5m 12s)

See the macro. To take a look at the macro, open the Visual Basic Editor..

Page 22 (5m 35s)

Summary. Macros simplify our work lives by automating most of the routine works that we do. Macros Excel are powered by Visual Basic for Applications..