Chapter 5. Using Macros in Spreadsheet IT 402 Book Solution

Unit 2: Electronics Spreadsheet (Advanced) using LibreOffice Calc

Chapter 5. Using Macros in Spreadsheet

Check Your Progress

A. Multiple-choice questions.

Question 1:
Macro Recordings can be enabled from the ______ option in the menu bar.
(a) Sheet
(b) Data
(c) Tools
(d) Window.

Answer: (c) Tools

Question 2:
Which of the following is a valid Macro Name?
(a) 1formatword
(b) format word
(c) format*word
(d) Format_word

Answer: (d) Format_word

Question 3:
Which of the following Libraries contains modules with prerecorded macros and should not be changed?
(a) My Macros
(b) LibreOfficeMacros
(c) Untitled1
(d) Test

Answer: (b) LibreOfficeMacros

Question 4:
Identify which of the following is a programming Language.
(a) Calc
(b) BASIC
(c) Writer
(d) Macro.

Answer: (b) BASIC

Question 5:
The Module can be executed from the IDE by pressing _____.
(a) F3
(b) F4
(c) F5
(d) F6

Answer: (c) F5

Question 6:
Which of the following is the default name of the Macro ______.
(a) Default
(b) Main
(c) Macro1
(d) Main_Macro

Answer: (b) Main

B. Fill in the blanks.

Question 1:
_____ library is automatically loaded when the document is opened.

Answer: Standard

Question 2:
IDE stands for ___________________.

Answer: Integrated Development Environment

Question 3:
Macro as a function is capable of accepting _______ and returning a ______.

Answer: arguments/values, result/value

Question 4:
Macro ____ allows us to add, delete a module.

Answer: Organizer

Question 5:
The code of macro begins with ______ followed by the name of the macro and ends with _______.

Answer: Sub, End Sub

Question 6:
By default, a macro is saved in the _______ .

Answer: Standard Library

C. State whether the following statements are True or False.

Question 1:
Macro is a group of instructions executing a single instruction.

Answer: False

Question 2:
Once created, Macro can be used any number of times.

Answer: True

Question 3:
By default, the Macro recording feature is turned on.

Answer: False

Question 4:
It is not possible to stop recording of a Macro.

Answer: False

Question 5:
Every Macro should be given a unique name.

Answer: True

Question 6:
A macro once created can be edited later.

Answer: True

D. Answer the following questions.

Question 1:
What is a Macro? List any two real-life situations where they can be used.

Answer: A macro is a single instruction that executes a set of instructions. These set of instructions can be a sequence of commands or keystrokes that can be used for any number of times later. A sequence of actions such as keystrokes and clicks can be recorded and then run as per the requirement.

Two real-life situations are

  • Typing school name, address, contact numbers with a specific formatting
  • Apply the same formula at a particular cell for different sheets in a workbook

Question 2:
List the actions that are not recorded by a macro.

Answer: The following actions are not recorded by a Macro.

  • Opening of windows.
  • Actions were carried out in another window than where the recording was started.
  • Window switching.
  • Actions that are not related to the spreadsheet contents. For example, changes made in the Options dialog, macro organizer, and customizing.
  • Selections are recorded only if they are done by using the keyboard (cursor traveling), but not when the mouse is used.

Question 3:
How is LibreOffice Macros Library different from my Macros?

Answer: LibreOffice Macros library is provided by LibreOffice and contains modules with pre-recorded macros and should not be changed.

while My Macros contain macros that we write or add to LibreOffice.

Question 4:
Differentiate between predefined functions in Calc and Macros as a function.

Answer: Predefined function vs Macro as function

  • Predefined functions are available in the function list, while macros do not appear in the function lists.
  • Predefined functions can return values while macro does not.
  • Predefined functions are precompiled while macro does not.
  • Predefined functions can not be nest, while macro can be nested.

Question 5:
List the rules that should be kept in mind while naming a macro.

Answer: Rules that should kept in mind while naming a Macro, Module or Library :

  • The name should begin with a letter.
  • The name should not contain spaces.
  • The name should not contain special characters except for _ (underscore)

Question 6:
Give anyone advantage of macros.

Answer: Advantage of macro:

It will ensure that we maintain the standardization in terms of font style without any typing mistake.

Lab Exercises

1. Record a Macro that performs Bold, Underline on the Heading in Cell A1. Give macro the name BoldunderlineA1 and save it in a New Module named Basic Formatting which is created in a New Library named DocumenHeadingA1.

2. Record a Macro that creates a bar chart for data stored in cells A2 – A9 and K2 to K9.

3. Run the macro recorded in (i) and display a bar chart for the following data showing Minimum and Maximum temperature from 2010-2017.

You cannot copy content of this page

Scroll to Top