Part 1: Introduction Record a macro. Is it easy to record and use macro? My answer is yes! Because it is just the same, if you compare the way you record your voice with a voice recorder. . Turn on the voice recorder. . Record it. . Play it frequently whenever you need 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. NOTE: understand the scenarios: 1. Performing macro for sorting / filtering: Macro is not really useful here. because MS Excel has already assigned short keys for performing this task. (I respect your logic and reasoning as each individual have their own way of making decision) 2. Performing macro for formatting: Macro is really useful in this scenario . why? Usually (each individual use excel for different purpose) whenever you work on a sheet you have to perform lot of formatting. For my excel sheet I have to perform formatting as follows: . First row has to be formatted as headings and other rows as data. . For heading: Make bold, underlined, increase font sizes, font color, wrap text, text alignment, font style, effects etc. . And need to freeze the first row. . First column of data: usually I enter date here so convert this to long date format. . Second column: usually I enter names here so it has to be text format. . Third column: we will have a number with two decimal places. And many more similar conditions: Part 2: Now we will discuss the steps Record a macro: . Go to Upper ribbon and select view tab. . Go to macro dropdown button and select record macro option. Note: you will find a typical dialogue box. . Give a name. Note: The first character of the macro name must be a letter. Subsequent characters can be letters, numbers, or underscore characters. Spaces cannot be used in a macro name; an underscore character works well as a word separator. If you use a macro name that is also a cell reference, you may get an error message that the macro name is not valid. . Assign a short key combination (don't use control +c, windows has already assigned this key combination! and continue with other textboxes) Note The shortcut key will override any equivalent default Excel shortcut key while the workbook that contains the macro is open. For a list of CTRL combination shortcut keys that are already assigned in Excel, see Excel shortcut and function keys. I assigned control + m here! (In excel control + m combination is not used) . In the Store macro in list, select the workbook where you want to store the macro. Note: Remember you have started recording and perform all the actions step by step and macro is recording everything step by step and when all formatting is done, got to macro dropdown button again and stop recording. NOW I AM READY WITH NEW MACRO AND NEW SHORTCUT KEY (control + m) Please go to any work sheet or any work book and use this shortcut key and perform all formatting with one key press.
Hearty welcome to Mitrajyothi to learn MS Excel (advanced level and open for other applications too), All the best, Regards, Tony, Computer Trainer, Mitrajyothi. Message: 1 Date: Wed, 5 Dec 2012 05:46:51 +0530 From: "Mukesh" <[email protected]> To: "Access India" <[email protected]>, "Kiran S Deshpande" <[email protected]> Subject: [AI] Macro code for column ascending Good morning Friends, I'm in a need of macro function for automatically sort the column in ascending order for dates. I request you to send me vb code for this function at the earliest. Thanking you in anticipation. Regards Mukesh Baviskar Mobile: 943161157 Register at the dedicated AccessIndia list for discussing accessibility of mobile phones / Tabs on: http://mail.accessindia.org.in/mailman/listinfo/mobile.accessindia_accessindia.org.in Search for old postings at: http://www.mail-archive.com/[email protected]/ To unsubscribe send a message to [email protected] with the subject unsubscribe. To change your subscription to digest mode or make any other changes, please visit the list home page at http://accessindia.org.in/mailman/listinfo/accessindia_accessindia.org.in
