SlideShare a Scribd company logo
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.1
© NCC Education LimitedV1.0
Read the Code Generated by a
Macro in the VB Editor
• When using the macro recorder, it is worth taking a
look at the code that is written in in the VB Editor.
• The following are the steps involved in creating a
macro that is assigned to the keys Ctrl + m, so that
when Crtl + m are pressed in cells containing whole
numbers, the numbers will be displayed as
currency.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.2
© NCC Education LimitedV1.0
Reading VBA Code - 1
• A spreadsheet is opened that displays the following
data:
1.Click to select a cell.
2.Open Record macro.
3.Enter the macro name.
4.Assign short cut keys Ctrl + m.
5.Save to the current workbook.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.3
© NCC Education LimitedV1.0
Reading VBA Code - 2
6. Click OK.
7. Format the cells to Currency > set to 2 decimal
places and select the £ symbol.
8. Click OK.
9. Stop the Macro Recorder.
10. Apply the macro by pressing the Ctrl + m keys.
11. The numbers are now displayed as currency.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.4
© NCC Education LimitedV1.0
Reading VBA Code - 3
• Let us have a look at the code in which that this macro is
written.
• To do this, we select module1 in the VBA Project window.
• Then we open the
View Code window.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.5
© NCC Education LimitedV1.0
Reading VBA Code - 4
• The code for the macro is then displayed:
• You can look at the code for all the macros that you
create if you want to learn more about VBA.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.6
© NCC Education LimitedV1.0
Create a Macro that Uses Absolute
Cell References - 1
• When a macro is recorded, it will run in exactly the
same sheets/cells/columns/rows that are specified by
the user – it is has been provided with absolute cell
references. The following slide shows the instructions
to create a macro to make column A in a spreadsheet
bold.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.7
© NCC Education LimitedV1.0
Create a Macro that Uses Absolute
Cell References - 2
1. Open the Record Macro dialogue box, name the macro
BoldColumn, save it in This Workbook and assign it to the
shortcut keys Ctrl + a.
2. Click OK and click on the column header for column A to
highlight the whole column. Click on the Bold icon and stop
recording.
3. When you click on Ctrl + a, you can see that column A is
highlighted; however, if you click on a cell in any other
column, the macro does not work, because it uses only an
absolute cell reference.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.8
© NCC Education LimitedV1.0
Create a Macro that Uses Relative
Cell References
• The Use Relative References button
must be clicked on to be activated.
• Once this is done, the macro recorder
can be opened, a macro named, saved
and recorded using the same steps as
for the macro that used absolute cell
referencing.
• When recording is complete, the macro
can be tested and this time, when the
short cut keys are used, any column in
the spreadsheet can be made bold.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.9
© NCC Education LimitedV1.0
Assign an Icon to Run a Macro - 1
1. Open a spreadsheet in which you have already
created a macro.
2. Click on the Customize Quick Access Toolbar.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.10
© NCC Education LimitedV1.0
Assign an Icon to Run a Macro - 2
3. Select More Commands from the bottom of the drop
down menu.
4. Select Macros from Choose Commands from.
5. Select the name of the spreadsheet.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.11
© NCC Education LimitedV1.0
Assign an Icon to run a Macro - 3
6. Select the macro that you want to add to the Quick
Access Toolbar, click Add and the macro is moved to
the box on the right.
7. Click on Modify and the Modify Button dialogue box
appears.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.12
© NCC Education LimitedV1.0
Assign an Icon to Run a Macro - 4
8. Select an icon from the Modify Button box, click on
OK twice and the icon will appear on the Quick
Access Toolbar:
9. The macro can now be run by simply clicking on the
icon!
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.13
© NCC Education LimitedV1.0
Printing Data Using a Macro
• The following macro can be created to automate
printing a spreadsheet:
1. Open the Record Macro dialogue box.
2. Name the macro and assign it to the shortcut keys
Ctrl + j.
3. Click on OK.
4. Select the print commands.
5. Stop recording.
6. Test by pressing Ctrl + j.
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.14
© NCC Education LimitedV1.0
• If a user attaches a digital signature to a file, it helps to
certify that he or she is the owner of the file and no
attempt has been made to send it fraudulently.
1. Open the VB Editor.
2. Select Tools
3. The Digital Signature box appears
4. Select Choose
Adding a Digital Signature to a
Macro
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.15
© NCC Education LimitedV1.0
Digital Signatures
5. Choose a certificate and click OK twice.
6. Click Save
7. Click File, choose Close and return to the
spreadsheet.
8. If you suspect that a digital signature has
problems, select Show Signature Details which
will indicate a problem with a signature by a X
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.16
© NCC Education LimitedV1.0
References
• Gonzalez, J., Meister, C., Ozgur, S., Dilworth, B., Troy, A.
and Brandt, T. (2006). Office VBA Macros You Can Use
Today: Over 100 Amazing Ways to Automate Word, Excel,
PowerPoint, Outlook & Access, Holy Macroi Press.
• Microsoft Office: Digital Signatures. (2011). [Available
Online] http://office.microsoft.com
Using Macros in Microsoft Excel Part 2 Topic 9 - 9.17
© NCC Education LimitedV1.0
Topic 9 – Using Macros in Microsoft Excel
Part 2
Any Questions?

More Related Content

What's hot

An introduction to vba and macros
An introduction to vba and macrosAn introduction to vba and macros
An introduction to vba and macros
Er. Nawaraj Bhandari
 
Getting started with Microsoft Excel Macros
Getting started with Microsoft Excel MacrosGetting started with Microsoft Excel Macros
Getting started with Microsoft Excel Macros
Nick Weisenberger
 
VBA - Macro For Ms.Excel
VBA - Macro For Ms.ExcelVBA - Macro For Ms.Excel
VBA - Macro For Ms.Excel
C-Train Learning Point
 
MACROS excel
MACROS excelMACROS excel
MACROS excel
Zenobia Sukhia
 
MS Excel Macros/ VBA Project report
MS Excel Macros/ VBA Project reportMS Excel Macros/ VBA Project report
MS Excel Macros/ VBA Project report
Prafull Dhamankar
 
Excel 2007 Unit I
Excel 2007 Unit IExcel 2007 Unit I
Excel 2007 Unit I
Raja Waseem Akhtar
 
Useful macros and functions for excel
Useful macros and functions for excelUseful macros and functions for excel
Useful macros and functions for excel
Nihar Ranjan Paital
 
Vbabook ed2
Vbabook ed2Vbabook ed2
Vbabook ed2
NilsonVallecillo
 
Mac2
Mac2Mac2
Form4 cd4
Form4 cd4Form4 cd4
Form4 cd4smktsj2
 
Recording and running macros in the office application
Recording and running macros in the office applicationRecording and running macros in the office application
Recording and running macros in the office application
putiadetiara
 
Quick Guide to Get Started with ShoutOUT V4.0
Quick Guide to Get Started with ShoutOUT V4.0 Quick Guide to Get Started with ShoutOUT V4.0
Quick Guide to Get Started with ShoutOUT V4.0
Tharindu Dassanayake
 
Microsoft Office 2003 Creating Macros
Microsoft Office 2003 Creating MacrosMicrosoft Office 2003 Creating Macros
Microsoft Office 2003 Creating Macros
S Burks
 
Group 3 how to create tables, figures and equations
Group 3   how to create tables, figures and equationsGroup 3   how to create tables, figures and equations
Group 3 how to create tables, figures and equations
Best in Class Education Center
 

What's hot (20)

An introduction to vba and macros
An introduction to vba and macrosAn introduction to vba and macros
An introduction to vba and macros
 
Getting started with Microsoft Excel Macros
Getting started with Microsoft Excel MacrosGetting started with Microsoft Excel Macros
Getting started with Microsoft Excel Macros
 
VBA - Macro For Ms.Excel
VBA - Macro For Ms.ExcelVBA - Macro For Ms.Excel
VBA - Macro For Ms.Excel
 
MACROS excel
MACROS excelMACROS excel
MACROS excel
 
MS Excel Macros/ VBA Project report
MS Excel Macros/ VBA Project reportMS Excel Macros/ VBA Project report
MS Excel Macros/ VBA Project report
 
Excel 2007 Unit I
Excel 2007 Unit IExcel 2007 Unit I
Excel 2007 Unit I
 
Useful macros and functions for excel
Useful macros and functions for excelUseful macros and functions for excel
Useful macros and functions for excel
 
VBA
VBA VBA
VBA
 
Vbabook ed2
Vbabook ed2Vbabook ed2
Vbabook ed2
 
Mac2
Mac2Mac2
Mac2
 
Vba 2 (students copy)
Vba 2 (students copy)Vba 2 (students copy)
Vba 2 (students copy)
 
VBA
VBAVBA
VBA
 
Form4 cd4
Form4 cd4Form4 cd4
Form4 cd4
 
Recording and running macros in the office application
Recording and running macros in the office applicationRecording and running macros in the office application
Recording and running macros in the office application
 
Quick Guide to Get Started with ShoutOUT V4.0
Quick Guide to Get Started with ShoutOUT V4.0 Quick Guide to Get Started with ShoutOUT V4.0
Quick Guide to Get Started with ShoutOUT V4.0
 
oracle-forms
oracle-formsoracle-forms
oracle-forms
 
Oracle Forms
Oracle FormsOracle Forms
Oracle Forms
 
4. safe tutorial v. 12 ingles
4.  safe tutorial v. 12 ingles4.  safe tutorial v. 12 ingles
4. safe tutorial v. 12 ingles
 
Microsoft Office 2003 Creating Macros
Microsoft Office 2003 Creating MacrosMicrosoft Office 2003 Creating Macros
Microsoft Office 2003 Creating Macros
 
Group 3 how to create tables, figures and equations
Group 3   how to create tables, figures and equationsGroup 3   how to create tables, figures and equations
Group 3 how to create tables, figures and equations
 

Similar to Using macros in microsoft excel part 2

VT University Live Session 3
VT University Live Session 3VT University Live Session 3
VT University Live Session 3
VisibleThread
 
ExcelMacros.pptx
ExcelMacros.pptxExcelMacros.pptx
ExcelMacros.pptx
AshishDhiman62
 
VBA Tips
VBA TipsVBA Tips
VBA Tips
Ike Onwubuya
 
Recordingandrunningmacrosintheofficeapplication3
Recordingandrunningmacrosintheofficeapplication3Recordingandrunningmacrosintheofficeapplication3
Recordingandrunningmacrosintheofficeapplication3
Astrid yolanda
 
0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdf0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdf
ABHISHEK MALIK
 
Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1
rupeshkanu
 
Autocad excel vba
Autocad excel vbaAutocad excel vba
Autocad excel vbarjg_vijay
 
27 e
27 e27 e
Spreadsheet Analytical Tools
Spreadsheet Analytical ToolsSpreadsheet Analytical Tools
Spreadsheet Analytical Tools
Joselito Perez
 
XMetaL Macros for Non-Programmers
XMetaL Macros for Non-ProgrammersXMetaL Macros for Non-Programmers
XMetaL Macros for Non-Programmers
XMetaL
 
ExcelMacros.pptx
ExcelMacros.pptxExcelMacros.pptx
ExcelMacros.pptx
PerlaVillarrealPlasc1
 
Micro station v8 manual
Micro station v8 manualMicro station v8 manual
Micro station v8 manualyuri30
 
Learn Vba excel 2007
Learn Vba excel 2007Learn Vba excel 2007
Learn Vba excel 2007
Steve Johnson
 
Gutmacher practical-coding-examples-for-sourcers-sc18 atl
Gutmacher practical-coding-examples-for-sourcers-sc18 atlGutmacher practical-coding-examples-for-sourcers-sc18 atl
Gutmacher practical-coding-examples-for-sourcers-sc18 atl
Glenn Gutmacher
 
How to Implement Modbus TCP Protocol using VBA with Excel
How to Implement Modbus TCP Protocol using VBA with ExcelHow to Implement Modbus TCP Protocol using VBA with Excel
How to Implement Modbus TCP Protocol using VBA with Excel
ACC Automation
 

Similar to Using macros in microsoft excel part 2 (20)

VT University Live Session 3
VT University Live Session 3VT University Live Session 3
VT University Live Session 3
 
ExcelMacros.pptx
ExcelMacros.pptxExcelMacros.pptx
ExcelMacros.pptx
 
VBA Tips
VBA TipsVBA Tips
VBA Tips
 
Working with Excel Macros
Working with Excel MacrosWorking with Excel Macros
Working with Excel Macros
 
Recordingandrunningmacrosintheofficeapplication3
Recordingandrunningmacrosintheofficeapplication3Recordingandrunningmacrosintheofficeapplication3
Recordingandrunningmacrosintheofficeapplication3
 
0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdf0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdf
 
Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1
 
Autocad excel vba
Autocad excel vbaAutocad excel vba
Autocad excel vba
 
Excel chapter-7
Excel chapter-7Excel chapter-7
Excel chapter-7
 
27 e
27 e27 e
27 e
 
VBA
VBAVBA
VBA
 
Excel ch10
Excel ch10Excel ch10
Excel ch10
 
Spreadsheet Analytical Tools
Spreadsheet Analytical ToolsSpreadsheet Analytical Tools
Spreadsheet Analytical Tools
 
Excel300
Excel300Excel300
Excel300
 
XMetaL Macros for Non-Programmers
XMetaL Macros for Non-ProgrammersXMetaL Macros for Non-Programmers
XMetaL Macros for Non-Programmers
 
ExcelMacros.pptx
ExcelMacros.pptxExcelMacros.pptx
ExcelMacros.pptx
 
Micro station v8 manual
Micro station v8 manualMicro station v8 manual
Micro station v8 manual
 
Learn Vba excel 2007
Learn Vba excel 2007Learn Vba excel 2007
Learn Vba excel 2007
 
Gutmacher practical-coding-examples-for-sourcers-sc18 atl
Gutmacher practical-coding-examples-for-sourcers-sc18 atlGutmacher practical-coding-examples-for-sourcers-sc18 atl
Gutmacher practical-coding-examples-for-sourcers-sc18 atl
 
How to Implement Modbus TCP Protocol using VBA with Excel
How to Implement Modbus TCP Protocol using VBA with ExcelHow to Implement Modbus TCP Protocol using VBA with Excel
How to Implement Modbus TCP Protocol using VBA with Excel
 

More from Er. Nawaraj Bhandari

Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methods
Er. Nawaraj Bhandari
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data mining
Er. Nawaraj Bhandari
 
Mining Association Rules in Large Database
Mining Association Rules in Large DatabaseMining Association Rules in Large Database
Mining Association Rules in Large Database
Er. Nawaraj Bhandari
 
Introduction to data mining and data warehousing
Introduction to data mining and data warehousingIntroduction to data mining and data warehousing
Introduction to data mining and data warehousing
Er. Nawaraj Bhandari
 
Data warehouse testing
Data warehouse testingData warehouse testing
Data warehouse testing
Er. Nawaraj Bhandari
 
Data warehouse physical design
Data warehouse physical designData warehouse physical design
Data warehouse physical design
Er. Nawaraj Bhandari
 
Data warehouse logical design
Data warehouse logical designData warehouse logical design
Data warehouse logical design
Er. Nawaraj Bhandari
 
Classification and prediction in data mining
Classification and prediction in data miningClassification and prediction in data mining
Classification and prediction in data mining
Er. Nawaraj Bhandari
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean Function
Er. Nawaraj Bhandari
 
Chapter 6: Sequential Logic
Chapter 6: Sequential LogicChapter 6: Sequential Logic
Chapter 6: Sequential Logic
Er. Nawaraj Bhandari
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
Er. Nawaraj Bhandari
 
Chapter 4: Combinational Logic
Chapter 4: Combinational LogicChapter 4: Combinational Logic
Chapter 4: Combinational Logic
Er. Nawaraj Bhandari
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
Er. Nawaraj Bhandari
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
Er. Nawaraj Bhandari
 
Introduction to Electronic Commerce
Introduction to Electronic CommerceIntroduction to Electronic Commerce
Introduction to Electronic Commerce
Er. Nawaraj Bhandari
 
Evaluating software development
Evaluating software developmentEvaluating software development
Evaluating software development
Er. Nawaraj Bhandari
 
Testing software development
Testing software developmentTesting software development
Testing software development
Er. Nawaraj Bhandari
 
Application software and business processes
Application software and business processesApplication software and business processes
Application software and business processes
Er. Nawaraj Bhandari
 
An introduction to end user software development
An introduction to end user software developmentAn introduction to end user software development
An introduction to end user software development
Er. Nawaraj Bhandari
 
Advanced features of ms office packages 1
Advanced features of ms office packages 1Advanced features of ms office packages 1
Advanced features of ms office packages 1
Er. Nawaraj Bhandari
 

More from Er. Nawaraj Bhandari (20)

Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methods
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data mining
 
Mining Association Rules in Large Database
Mining Association Rules in Large DatabaseMining Association Rules in Large Database
Mining Association Rules in Large Database
 
Introduction to data mining and data warehousing
Introduction to data mining and data warehousingIntroduction to data mining and data warehousing
Introduction to data mining and data warehousing
 
Data warehouse testing
Data warehouse testingData warehouse testing
Data warehouse testing
 
Data warehouse physical design
Data warehouse physical designData warehouse physical design
Data warehouse physical design
 
Data warehouse logical design
Data warehouse logical designData warehouse logical design
Data warehouse logical design
 
Classification and prediction in data mining
Classification and prediction in data miningClassification and prediction in data mining
Classification and prediction in data mining
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean Function
 
Chapter 6: Sequential Logic
Chapter 6: Sequential LogicChapter 6: Sequential Logic
Chapter 6: Sequential Logic
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
Chapter 4: Combinational Logic
Chapter 4: Combinational LogicChapter 4: Combinational Logic
Chapter 4: Combinational Logic
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
 
Introduction to Electronic Commerce
Introduction to Electronic CommerceIntroduction to Electronic Commerce
Introduction to Electronic Commerce
 
Evaluating software development
Evaluating software developmentEvaluating software development
Evaluating software development
 
Testing software development
Testing software developmentTesting software development
Testing software development
 
Application software and business processes
Application software and business processesApplication software and business processes
Application software and business processes
 
An introduction to end user software development
An introduction to end user software developmentAn introduction to end user software development
An introduction to end user software development
 
Advanced features of ms office packages 1
Advanced features of ms office packages 1Advanced features of ms office packages 1
Advanced features of ms office packages 1
 

Recently uploaded

Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
PedroFerreira53928
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 

Recently uploaded (20)

Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 

Using macros in microsoft excel part 2

  • 1. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.1 © NCC Education LimitedV1.0 Read the Code Generated by a Macro in the VB Editor • When using the macro recorder, it is worth taking a look at the code that is written in in the VB Editor. • The following are the steps involved in creating a macro that is assigned to the keys Ctrl + m, so that when Crtl + m are pressed in cells containing whole numbers, the numbers will be displayed as currency.
  • 2. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.2 © NCC Education LimitedV1.0 Reading VBA Code - 1 • A spreadsheet is opened that displays the following data: 1.Click to select a cell. 2.Open Record macro. 3.Enter the macro name. 4.Assign short cut keys Ctrl + m. 5.Save to the current workbook.
  • 3. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.3 © NCC Education LimitedV1.0 Reading VBA Code - 2 6. Click OK. 7. Format the cells to Currency > set to 2 decimal places and select the £ symbol. 8. Click OK. 9. Stop the Macro Recorder. 10. Apply the macro by pressing the Ctrl + m keys. 11. The numbers are now displayed as currency.
  • 4. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.4 © NCC Education LimitedV1.0 Reading VBA Code - 3 • Let us have a look at the code in which that this macro is written. • To do this, we select module1 in the VBA Project window. • Then we open the View Code window.
  • 5. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.5 © NCC Education LimitedV1.0 Reading VBA Code - 4 • The code for the macro is then displayed: • You can look at the code for all the macros that you create if you want to learn more about VBA.
  • 6. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.6 © NCC Education LimitedV1.0 Create a Macro that Uses Absolute Cell References - 1 • When a macro is recorded, it will run in exactly the same sheets/cells/columns/rows that are specified by the user – it is has been provided with absolute cell references. The following slide shows the instructions to create a macro to make column A in a spreadsheet bold.
  • 7. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.7 © NCC Education LimitedV1.0 Create a Macro that Uses Absolute Cell References - 2 1. Open the Record Macro dialogue box, name the macro BoldColumn, save it in This Workbook and assign it to the shortcut keys Ctrl + a. 2. Click OK and click on the column header for column A to highlight the whole column. Click on the Bold icon and stop recording. 3. When you click on Ctrl + a, you can see that column A is highlighted; however, if you click on a cell in any other column, the macro does not work, because it uses only an absolute cell reference.
  • 8. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.8 © NCC Education LimitedV1.0 Create a Macro that Uses Relative Cell References • The Use Relative References button must be clicked on to be activated. • Once this is done, the macro recorder can be opened, a macro named, saved and recorded using the same steps as for the macro that used absolute cell referencing. • When recording is complete, the macro can be tested and this time, when the short cut keys are used, any column in the spreadsheet can be made bold.
  • 9. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.9 © NCC Education LimitedV1.0 Assign an Icon to Run a Macro - 1 1. Open a spreadsheet in which you have already created a macro. 2. Click on the Customize Quick Access Toolbar.
  • 10. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.10 © NCC Education LimitedV1.0 Assign an Icon to Run a Macro - 2 3. Select More Commands from the bottom of the drop down menu. 4. Select Macros from Choose Commands from. 5. Select the name of the spreadsheet.
  • 11. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.11 © NCC Education LimitedV1.0 Assign an Icon to run a Macro - 3 6. Select the macro that you want to add to the Quick Access Toolbar, click Add and the macro is moved to the box on the right. 7. Click on Modify and the Modify Button dialogue box appears.
  • 12. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.12 © NCC Education LimitedV1.0 Assign an Icon to Run a Macro - 4 8. Select an icon from the Modify Button box, click on OK twice and the icon will appear on the Quick Access Toolbar: 9. The macro can now be run by simply clicking on the icon!
  • 13. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.13 © NCC Education LimitedV1.0 Printing Data Using a Macro • The following macro can be created to automate printing a spreadsheet: 1. Open the Record Macro dialogue box. 2. Name the macro and assign it to the shortcut keys Ctrl + j. 3. Click on OK. 4. Select the print commands. 5. Stop recording. 6. Test by pressing Ctrl + j.
  • 14. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.14 © NCC Education LimitedV1.0 • If a user attaches a digital signature to a file, it helps to certify that he or she is the owner of the file and no attempt has been made to send it fraudulently. 1. Open the VB Editor. 2. Select Tools 3. The Digital Signature box appears 4. Select Choose Adding a Digital Signature to a Macro
  • 15. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.15 © NCC Education LimitedV1.0 Digital Signatures 5. Choose a certificate and click OK twice. 6. Click Save 7. Click File, choose Close and return to the spreadsheet. 8. If you suspect that a digital signature has problems, select Show Signature Details which will indicate a problem with a signature by a X
  • 16. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.16 © NCC Education LimitedV1.0 References • Gonzalez, J., Meister, C., Ozgur, S., Dilworth, B., Troy, A. and Brandt, T. (2006). Office VBA Macros You Can Use Today: Over 100 Amazing Ways to Automate Word, Excel, PowerPoint, Outlook & Access, Holy Macroi Press. • Microsoft Office: Digital Signatures. (2011). [Available Online] http://office.microsoft.com
  • 17. Using Macros in Microsoft Excel Part 2 Topic 9 - 9.17 © NCC Education LimitedV1.0 Topic 9 – Using Macros in Microsoft Excel Part 2 Any Questions?

Editor's Notes

  1. NCC Education - End Slide Master