Hi Al,
Can anyone explain to me in detail about Macros in Excel? :confused:
What is the exact use of it? How can we create it in Excel? What is the procedure for it? Can any non-IT person also create this, or only software engineers can create this? Also, give or attach some examples of Macros in Excel format.
Regards,
Nisha
From India, Lucknow
Can anyone explain to me in detail about Macros in Excel? :confused:
What is the exact use of it? How can we create it in Excel? What is the procedure for it? Can any non-IT person also create this, or only software engineers can create this? Also, give or attach some examples of Macros in Excel format.
Regards,
Nisha
From India, Lucknow
Macro is used to record the action taken on one data, which you want to repeat for other data also. Suppose you want to analyze the demography of 10 districts of India or any state and you have the same type of data for each district. In this case, the analysis technique used on data for one district can be applied to other districts without repeating all the steps. You just need to record the steps taken on one district's data through a macro. It can be applied to any type of data, regardless of whether it belongs to IT or not.
With Regards,
Amit
From India, Jaipur
With Regards,
Amit
From India, Jaipur
Hi Nisha,
"...
Macro on Excel - please help
HI AL,
Can anyone explain to me in detail about macros in Excel..."
Please follow the steps below to get all your queries answered:
1. As mentioned by Amit, a macro is used to automate repetitive tasks.
For example, if you have a list of 3 students - A, B, and C - with scores in Subjects 1, 2, 3, 4. If you want to calculate the total score of each student, you would need to write a formula for the sum in every column. Instead, if you create a macro for the same, you won't need to do it every time. Once you define the macro, it will calculate the total for whichever student you choose.
2. How to create a macro in Excel?
Answer - Using the same example, I have attached an Excel sheet with this post. Please refer to it.
- Create a table of contents (in this case, Student vs. Scores).
- Go to Tools > Macro > Security (Select Medium).
- Go to Tools > Macro > Record New Macro > Give Macro Name (e.g., Addition) > Select Store in this workbook > Give a shortcut key if you want to (not necessary) > Click OK.
- Go to cell D8 - write "=SUM(D4:D7)" - Click Enter - Click Stop recording Macro.
- The macro is now stored.
By running the macro, it will add values from E4 to E7 when your cursor is in E8 (Blue cell).
- Go to Tools > Macro > Run macro keeping the cursor in F8 - It will total the marks scored by student C (Orange cell).
- To simplify the process of running the macro, you can use a shortcut key (if assigned).
- Also, you can draw a rectangle or any other drawing object, right-click on it and choose "Assign macro" - click on the macro name. So, whenever you click on this rectangle, the macro will run.
3. This is a simple example of a macro. You can create graphs, charts, assessment sheets with thousands of entries, etc. It can save more than 90% of the time you may spend on writing/copying formulas everywhere.
4. Any non-IT person can create this. For using MS Office (Word, PowerPoint, Excel, etc.), no specialist is required. So, please remove any fear you have.
All the best.
From India, Pune
"...
Macro on Excel - please help
HI AL,
Can anyone explain to me in detail about macros in Excel..."
Please follow the steps below to get all your queries answered:
1. As mentioned by Amit, a macro is used to automate repetitive tasks.
For example, if you have a list of 3 students - A, B, and C - with scores in Subjects 1, 2, 3, 4. If you want to calculate the total score of each student, you would need to write a formula for the sum in every column. Instead, if you create a macro for the same, you won't need to do it every time. Once you define the macro, it will calculate the total for whichever student you choose.
2. How to create a macro in Excel?
Answer - Using the same example, I have attached an Excel sheet with this post. Please refer to it.
- Create a table of contents (in this case, Student vs. Scores).
- Go to Tools > Macro > Security (Select Medium).
- Go to Tools > Macro > Record New Macro > Give Macro Name (e.g., Addition) > Select Store in this workbook > Give a shortcut key if you want to (not necessary) > Click OK.
- Go to cell D8 - write "=SUM(D4:D7)" - Click Enter - Click Stop recording Macro.
- The macro is now stored.
By running the macro, it will add values from E4 to E7 when your cursor is in E8 (Blue cell).
- Go to Tools > Macro > Run macro keeping the cursor in F8 - It will total the marks scored by student C (Orange cell).
- To simplify the process of running the macro, you can use a shortcut key (if assigned).
- Also, you can draw a rectangle or any other drawing object, right-click on it and choose "Assign macro" - click on the macro name. So, whenever you click on this rectangle, the macro will run.
3. This is a simple example of a macro. You can create graphs, charts, assessment sheets with thousands of entries, etc. It can save more than 90% of the time you may spend on writing/copying formulas everywhere.
4. Any non-IT person can create this. For using MS Office (Word, PowerPoint, Excel, etc.), no specialist is required. So, please remove any fear you have.
All the best.
From India, Pune
Hi,
Just be aware that if you save a macro in the Personal Macro Workbook, it can be used in any worksheet you open. However, the macro recorded will function the same way in other sheets as well, regardless of the data, but it will apply to the same columns and rows.
-Krish
From United States, Bentonville
Just be aware that if you save a macro in the Personal Macro Workbook, it can be used in any worksheet you open. However, the macro recorded will function the same way in other sheets as well, regardless of the data, but it will apply to the same columns and rows.
-Krish
From United States, Bentonville
Hi Omravi,
Thank you for your help. I hope this attachment will help me to solve my problem. However, I am unable to run this macro. When I click on the addition cell, a message appears on the window stating, "Macros in this workbook are disabled because the security level is high, and the macros have not been digitally signed."
Even after changing my security level, it is still not running. How can I sign the macros? Please help.
Nisha
From India, Lucknow
Thank you for your help. I hope this attachment will help me to solve my problem. However, I am unable to run this macro. When I click on the addition cell, a message appears on the window stating, "Macros in this workbook are disabled because the security level is high, and the macros have not been digitally signed."
Even after changing my security level, it is still not running. How can I sign the macros? Please help.
Nisha
From India, Lucknow
Hi Nisha, Find attached ebook on macros this might be useful for you. Ragards Naveen K
From India, Mumbai
From India, Mumbai
Hi Nisha,
Regarding the issue you mentioned about a message appearing when clicking on the addition cell, stating, "Macros in this workbook are disabled because the security level is high, and the macros have not been digitally signed"... When you open the file, it prompts you with options such as "Disable Macros" or "Enable Macros." Please click on "Enable Macros." Ensure that the security level is set to low or medium before clicking on the Addition button.
I have not applied any digital signature. I downloaded the same file from citeHR and tried running it; it worked smoothly. Kindly follow the above two steps and let me know the outcome. I believe it should work. If not, you can try creating macros following the steps I have taken. I am confident you can do it with these instructions. If you encounter any issues, we can schedule an online meeting where I can provide guidance, and you can follow along. The choice is yours.
All the best.
From India, Pune
Regarding the issue you mentioned about a message appearing when clicking on the addition cell, stating, "Macros in this workbook are disabled because the security level is high, and the macros have not been digitally signed"... When you open the file, it prompts you with options such as "Disable Macros" or "Enable Macros." Please click on "Enable Macros." Ensure that the security level is set to low or medium before clicking on the Addition button.
I have not applied any digital signature. I downloaded the same file from citeHR and tried running it; it worked smoothly. Kindly follow the above two steps and let me know the outcome. I believe it should work. If not, you can try creating macros following the steps I have taken. I am confident you can do it with these instructions. If you encounter any issues, we can schedule an online meeting where I can provide guidance, and you can follow along. The choice is yours.
All the best.
From India, Pune
Dear Nisha,
Sometimes you want Excel to do something that Excel cannot do normally. Here comes the use of Macros. You can command Excel through VBA to accomplish the task. This is a cool site I found helpful for learning Excel VBA: [Free Help on VBA for Excel (Macros)](http://www.excel-vba.com/). I have used a lot of their materials to teach my advanced Excel-Macro classes. I am attaching an e-book for your reference; work on it, and you will get there one day. Good luck!
Mr. Naveen, thanks for that good book. I have so many of them, but this one is simple and good.
Cheers!
Captn_zee
From Oman, Ibra
Sometimes you want Excel to do something that Excel cannot do normally. Here comes the use of Macros. You can command Excel through VBA to accomplish the task. This is a cool site I found helpful for learning Excel VBA: [Free Help on VBA for Excel (Macros)](http://www.excel-vba.com/). I have used a lot of their materials to teach my advanced Excel-Macro classes. I am attaching an e-book for your reference; work on it, and you will get there one day. Good luck!
Mr. Naveen, thanks for that good book. I have so many of them, but this one is simple and good.
Cheers!
Captn_zee
From Oman, Ibra
Some time you wanted Excel to do something which Excel cannot do normally. Here comes the use of Macros. You can command Excel through VBA to accomplish the task. This is a cool site I found good to learn Excel VBA Free Help on VBA for Excel (Macros).
Thanks, captn_Zee. Keep sharing.
From India, Pune
Thanks, captn_Zee. Keep sharing.
From India, Pune
Hi Nisha,
Find attached tutorial on Macro in Excel. For more manuals/guides and tutorials of MS Excel, visit my following post - https://www.citehr.com/183149-ms-excel-manuals.html.
Best wishes,
Rashid
From Saudi Arabia, Riyadh
Find attached tutorial on Macro in Excel. For more manuals/guides and tutorials of MS Excel, visit my following post - https://www.citehr.com/183149-ms-excel-manuals.html.
Best wishes,
Rashid
From Saudi Arabia, Riyadh
Looking for something specific? - Join & Be Part Of Our Community and get connected with the right people who can help. Our AI-powered platform provides real-time fact-checking, peer-reviewed insights, and a vast historical knowledge base to support your search.