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

Popular posts from this blog

Arduino and Multi Function Shield: Pots,LEDs and buzzers

HELLO THERE!!!!!    How are you guys? I hope everyone is fine and in good mood always. This week, I continue my tinkerings with the Multi Function Shield. In this experiment, I used the potentiometer in the shield to control the LEDs in the shield. Without further wasting time, let's jump in straight to the experiment!! HARDWARE 1.ARDUINO UNO  2.MULTI-FUNCTION SHIELD SOFTWARE: 1. ARDUINO IDE CIRCUIT ASSEMBLY    The circuit assembly is fairly simple. Just attach the multi function shield on top of Arduino properly. Please attach the shield properly as failure to do so would cause the shield  not to function as intended. CODING THE ARDUINO: Let's refer to the multi-function shield image below: Referring to the image of the shield, it can be seen that the potentiometer (blue object near buttons) is connected to pin A0 (analog 0)     int pot = A0; //declaring the pot and led pins int l1 = 13; int l2

Arduino Beginner Experiments: Arduino and Light Blocking Sensor

HELLO THERE!!!     How are you guys? I hope everyone is fine and in a good mood always. This week, I would like to share with you guys my experiment on Arduino and Light Blocking Sensor. The objective of this experiment is to receive feedback from the sensor ( Digital and Analog) What is Light Blocking Sensor?      A linear hall sensor is a type of sensor which responds when the sensor is blocked out from light. The sensor is different for LDR's as LDR's responds to the amount of light it received while the light blocking sensor responds if the light is blocked out or not from the sensor.It can be used for both digital and analog measurements. HARDWARE: 1.Arduino UNO 2. Light Blocking Sensor SOFTWARE: 1.Arduino IDE CIRCUIT ASSEMBLY   Let's refer to the image of the blocking sensor below: The Connection of the Sensor to the Arduino is shown below: SENSOR  ----->       ARDUINO Signal      ------>     Any Analog/Digital pin

Arduino Tinkering : Controlling multiple LED with multiple potentiometers

HELLO THERE!!!!            How are you guys? I hope everyone is fine and well always. For this week's post, I would like to share with you guys a simple tinkering on Arduino, LED, and potentiometers. The objective of the experiment is to light up different amount of LED's with different intensity by controlling two potentiometers. Before starting, of course, we need to know what items are needed. The items needed are: 1. Arduino UNO   2. 4 to 5 LEDs 3. 2 Potentiometers The software used in this experiment is: 1. Arduino IDE. Now that all the hardware and software are obtained, let's go to the schematics of the circuit. The circuit is quite simple actually. The long legs of the LED's were connected to PWM pins while the shorter legs were connected to ground. The potentiometers however have three legs. The middle leg is connected to the analog pins (A0, A1) while the other two legs were connected to 5V and GND respectively. Don't w