SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
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?

Más contenido relacionado

La actualidad más candente

La actualidad más candente (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 a 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 3VisibleThread
 
Recordingandrunningmacrosintheofficeapplication3
Recordingandrunningmacrosintheofficeapplication3Recordingandrunningmacrosintheofficeapplication3
Recordingandrunningmacrosintheofficeapplication3Astrid yolanda
 
0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdf0403-excel-macros-made-easy.pdf
0403-excel-macros-made-easy.pdfABHISHEK MALIK
 
Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1Excel Vba Basic Tutorial 1
Excel Vba Basic Tutorial 1rupeshkanu
 
invoice Computer Science homework help.docx
invoice Computer Science homework help.docxinvoice Computer Science homework help.docx
invoice Computer Science homework help.docxwrite4
 
invoice Computer Science homework help.docx
invoice Computer Science homework help.docxinvoice Computer Science homework help.docx
invoice Computer Science homework help.docxstudywriters
 
Autocad excel vba
Autocad excel vbaAutocad excel vba
Autocad excel vbarjg_vijay
 
Spreadsheet Analytical Tools
Spreadsheet Analytical ToolsSpreadsheet Analytical Tools
Spreadsheet Analytical ToolsJoselito Perez
 
XMetaL Macros for Non-Programmers
XMetaL Macros for Non-ProgrammersXMetaL Macros for Non-Programmers
XMetaL Macros for Non-ProgrammersXMetaL
 
10- If necessary- add the Developer tab to the ribbon- Create an abso.docx
10-  If necessary- add the Developer tab to the ribbon- Create an abso.docx10-  If necessary- add the Developer tab to the ribbon- Create an abso.docx
10- If necessary- add the Developer tab to the ribbon- Create an abso.docxAndrewYogHudsonw
 
Micro station v8 manual
Micro station v8 manualMicro station v8 manual
Micro station v8 manualyuri30
 

Similar a 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
 
invoice Computer Science homework help.docx
invoice Computer Science homework help.docxinvoice Computer Science homework help.docx
invoice Computer Science homework help.docx
 
invoice Computer Science homework help.docx
invoice Computer Science homework help.docxinvoice Computer Science homework help.docx
invoice Computer Science homework help.docx
 
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
 
10- If necessary- add the Developer tab to the ribbon- Create an abso.docx
10-  If necessary- add the Developer tab to the ribbon- Create an abso.docx10-  If necessary- add the Developer tab to the ribbon- Create an abso.docx
10- If necessary- add the Developer tab to the ribbon- Create an abso.docx
 
Micro station v8 manual
Micro station v8 manualMicro station v8 manual
Micro station v8 manual
 

Más de Er. Nawaraj Bhandari

Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methodsEr. 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 miningEr. Nawaraj Bhandari
 
Mining Association Rules in Large Database
Mining Association Rules in Large DatabaseMining Association Rules in Large Database
Mining Association Rules in Large DatabaseEr. 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 warehousingEr. Nawaraj Bhandari
 
Classification and prediction in data mining
Classification and prediction in data miningClassification and prediction in data mining
Classification and prediction in data miningEr. Nawaraj Bhandari
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionEr. 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 LSIEr. 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 GatesEr. Nawaraj Bhandari
 
Introduction to Electronic Commerce
Introduction to Electronic CommerceIntroduction to Electronic Commerce
Introduction to Electronic CommerceEr. Nawaraj Bhandari
 
Application software and business processes
Application software and business processesApplication software and business processes
Application software and business processesEr. 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 developmentEr. 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 1Er. Nawaraj Bhandari
 

Más de 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
 

Último

2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptxSandy Millin
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...CaraSkikne1
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRATanmoy Mishra
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxDr. Santhosh Kumar. N
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxDr. Asif Anas
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsEugene Lysak
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17Celine George
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxMYDA ANGELICA SUAN
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxheathfieldcps1
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxEduSkills OECD
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfMohonDas
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapitolTechU
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxraviapr7
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17Celine George
 

Último (20)

2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
 
Prelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quizPrelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quiz
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptx
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptx
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George Wells
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptx
 
The basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptxThe basics of sentences session 10pptx.pptx
The basics of sentences session 10pptx.pptx
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 
HED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdfHED Office Sohayok Exam Question Solution 2023.pdf
HED Office Sohayok Exam Question Solution 2023.pdf
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptx
 
Finals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quizFinals of Kant get Marx 2.0 : a general politics quiz
Finals of Kant get Marx 2.0 : a general politics quiz
 
Education and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptxEducation and training program in the hospital APR.pptx
Education and training program in the hospital APR.pptx
 
How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17How to Use api.constrains ( ) in Odoo 17
How to Use api.constrains ( ) in Odoo 17
 

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?

Notas del editor

  1. NCC Education - End Slide Master