Macros Programming in Excel Sheet 2010

By | July 17, 2012

Macros programming in Excel has made it very easy to use, it provides a visual basic programming interface which is an easy task. Here is a step wise instruction on how to do it.

1)    Start Excel Sheet 2010

2)    Click on View tab

3)    Now click on dropdown Macros and select Record Macros in dropdown menu

4)    Name your Macro, in the sample I named it ‘MyMacro’. You can also set a shortcut key for it e.g I have used “Ctrl+w”. Now Press ok in the new window opened.

5)    Now again pull down dropdown menu of Macros and click on Stop Recording.

6)    Now select View Macros in dropdown menu of Macros.

7)    You will get a window showing all the macros like this

8)    Select your Macro as in our case its MyMacro and now click on edit.

9)    You will get a new window as shown in figure below, this window is the visual basic programming interface, this Interface show different components as project explorer, property window, code window.

You will see:

Sub MyMacro

End Sub

place your code between these two lines.

10) Press Alt+F11 to go back to the excel sheet (You can always switch between programming interface and excel sheet with Alt+F11)

11) Now again Select View Macros from the Macros drop down menu and just click on run after selecting your Macro from the View Macro window to see the effect of your work. In  this sample we have coded to change the text in UPPERCASE, you can code it according to your requirement.

Enjoy programming Macros for Excel.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.