In the Macro dialog box, click on the macro Name – EnterText.In the Code group, click the Macros button.This is to test whether the macro selects cell A2 or not. This is to test if the macro inserts the text in cell A2 or not. While the macro doesn’t do anything useful, it’ll serve its purpose in explaining how a macro recorder works in Excel.įollow the steps below to test the macro: You have just recorded your first macro in Excel. Click on the Stop Recording button the Developer tab.Enter the text Excel (or you can use your name).You can see the ‘Stop recording’ button in the Developer tab, which indicates that the macro recording is in progress. As soon as you click OK, it starts to record your actions in Excel. I usually don’t do this, but if you’re extremely organized, you may want to add what the macro is about. It will be there when you save it and reopen again, or even if you share it with someone. This step ensures that the macro is a part of the workbook. In the ‘Store macro in’ option, make sure ‘This Workbook’ is selected.For example, if you assign the shortcut Control + S, you will not be able to use this for saving the workbook (instead, everytime you use it, it will execute the macro). Remember that the shortcut you assign here would override any existing shorcuts in your workbook. In this case, we will use the shortcut Control + Shift + N. (Optional Step) You can assign a keyboard shortcut if you want.You can also use underscore to separate two words – such as Enter_Text. I usually prefer to keep my macro names as a single word, with different parts with a capitalized first alphabet. For example, you can not use spaces in between. There are some naming conditions that you need to follow when naming a macro. In the Record Macro dialog box, enter a name for your macro.This will open the ‘Record Macro’ dialog box. In the Code group, click on the Macro button.I am using the text ‘Excel’ while recording this macro, but feel free to enter your name or any other text that you like. Let’s record a very simple macro – one that selects a cell and enters the text ‘Excel’ in it. Now that we have everything in place, let’s learn how to record a macro in Excel. The above steps would make the Developer tab available in the ribbon area. On the right, within the Main Tabs pane, check the Developer option. In the Excel Options dialogue box, you will have the Customize the Ribbon options. It will open the Excel Options dialogue box.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |