Skip to main content

Intro To Macro: Record A Macro

HELLO THERE!!!

       How are you guys? I hope all of you are fine and in a good mood always.Sorry for not posting last week, been real busy submitting my partial thesis and stuff. This week, before I get deeper into Macros, I would like to introduce you guys on how to record a Macro. Basically, you don't need to code these Macros, you only need to record them and then implement them in your Excel. I would say however, there are some advantages and disadvantages on recording these macros based on my opinion.


Advantages:
1. Fast
2. Do not need to code
3. Can be used for stagnant type or non changing type of application
4. Code can be modified manually

Disadvantages:
1. Not Flexible to all type of applications.


Ok, now let's get straight on how to record a Macro. First the requirements needed for this experiment is:

SOFTWARE
1. MICROSOFT EXCEL 


Well, that's pretty much the requirement needed. For the steps, let's refer to the figures below( we are going to do addition by recording the Macro):

Fig 1: Go to the developer Tab and press the record Macro button to start recording your Macro

Fig 2: Give a name for the Macro and press OK. After pressing OK, any movement or activity in the worksheet will be recorded by Excel and saved as Visual Basic code.

Fig 3:Lets record some Addition!!! Go to the Formulas tab, click the AUTOSUM panel and click SUM

Fig 4: Choose which two columns to be added and press Enter. I chose column A and column B with the result shown in column C

Fig 5: After choosing the two columns to add, go back to the developer Tab and press stop recording. Excel will stop recording the Macro.

Fig 6 : To use the recorded Macro. Click the Macros in the Developer Tab. A Macro pane will pop up, showing all the Macros that have been recorded.Choose the macro you had recorded and click run. In this example, I chose to run my macro in column C2 while I had recorded my Macro using C1.

Fig 7 : The C2 column is now implemented with the macro that we had just recorde. Go ahead and key in some numbers in A2 and B2. The addition result will be produced in C2

Fig 8: If you want to modify the macro that has been recorded, then click the Visual Basic button in the developers Tab,  the recorded macro should be in the modules folder. In the Image above, you can see the recorded macro's code.






   Looks, like that's all for the basics of Macro recording. You can go ahead and tinker around and even try to implement it in the simple calculator( Last post I made). Well, I'll see you guys next week with a simple Arduino system. Till then, Happy Tinkering!!!












Comments