0% found this document useful (0 votes)
68 views

CH 5 - Using Macros in Spreadsheet_Final

Uploaded by

kkr408475
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views

CH 5 - Using Macros in Spreadsheet_Final

Uploaded by

kkr408475
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

BCM SCHOOL, BASANT AVENUE, DUGRI ROAD, LUDHIANA

CH 5 - Using Macros in Spreadsheet


A. Multiple choice questions
1. Macro Recordings can be enabled from the ________ option in the menu bar.
(a) Sheet (b) Data (C) TOOLS (d) Window.
2. Which of the following is a valid Macro Name?
(a) 1formatword (b) format word
(c) format*word (d) FORMAT_WORD
3. Which of the following Libraries contains modules with pre recorded macros
and should not be changed?
(a) My Macros (b) LibreOfficeMacros
(c) Untitled1 (d) Test.
4. Identify which of the following is a programming Language?
(a) Calc (b) BASIC (c) Writer (d) Macro.
5. The Module can be executed from the IDE by pressing _________________.
(a) F3 (b) F4 (c) F5 (d) F6
5. Which of the following is the default name of the Macro _______________.
(a) Default (b) Main (c) Macro1 (d) Main_Macro

B. Fill in the blanks


1. Standard library is automatically loaded when the document is opened.
2. IDE stands for __Integrated Development Environment___.
3. Macro as a function is capable of accepting _arguments/values, ___ and
returning a __ result/value __.
4. Macro ___ Organizer _ allows us to add, delete a module.
5. The code of macro begins with _SUB_ followed by the name of the macro and
ends with _END SUB_.
6. By default a macro is saved in the _ Standard Library _.

C. State whether the following statements are True or False


1. Macro is a group of instructions executing a single instruction. FALSE
2. Once created, Macro can be used any number of times. TRUE
3. By default, the Macro recording feature is turned on. FALSE
4. It is not possible to stop recording of a Macro. FALSE
5. Every Macro should be given a unique name. TRUE
6. A macro once created can be edited later. TRUE

1. What is a Macro? List any two real life situations where they can be used.
ANS: A macro is a single instruction that executes a set of instructions. These set of
instructions can be a sequence of commands that can be used for any number of
times. Two real life situations where they can be used are:
1. Data Entry in Spreadsheets: If you regularly enter the same type of data into
a spreadsheet (like sales records or class result), you can create a macro to
automate the entry process. For example, a macro can fill in predefined fields,
format cells, or calculate totals, saving time and reducing errors.
2. Automating Repetitive Tasks in Word Documents: In professions like legal or
academic writing, macros can automate the formatting of documents. For
instance, a macro can automatically apply specific styles to headings, create a
table of contents.
2. List the actions that are not recorded by a macro.
ANS: The Macro records all the keyboard and mouse actions but the following
actions are not recorded.

1. Opening of Windows: Actions that involve opening new windows or


applications are not recorded.

2. Actions in Other Windows: Activities performed in a different window from


where the macro recording began are typically not captured.

3. Window Switching: Switching between windows does not get recorded in the
macro.

4. Non-Spreadsheet Related Actions: Changes made in dialog boxes related to


settings, options, or customizations outside of the main document content
are not recorded.

5. Selection Methods: Selections are recorded when made using the keyboard
(e.g., arrow keys) but not when using the mouse.

6. Application Limitation: The macro recorder generally works only within


specific applications like Calc and Writer.

3. How is LibreOffice Macros Library different from my Macros?


ANS: In LibreOffice, the distinction between the Macros Library and My Macros is
important for organizing and managing your macros effectively.
Macros Library:
 Global Storage: The Macros Library can contain macros that are available
across different documents. This means that any macro saved in this library
can be accessed from any LibreOffice document you open.
 Organizational Structure: It typically includes various libraries and modules
that can be shared and reused across multiple projects.
 Multiple Libraries: You can create and manage multiple libraries, allowing for
better categorization of macros based on different projects or functionalities.

My Macros:

 User-Specific: This is a specific location within the Macros Library that is


unique to the user. It’s intended for macros that the individual user creates
and manages.
 Personal Customization: "My Macros" is the place where you can easily store
and modify your personal macros without affecting the global library.
 Simpler Management: It provides a straightforward way for users to quickly
access their own macros without having to navigate through multiple
libraries.

In summary, while My Macros is a personal storage area for your macros, the
Macros Library encompasses a broader range of macros that can be shared and
accessed across different users and documents. This structure allows for both
individual customization and collaborative use of macros in LibreOffice.

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


ANS:
Aspect Predefined Functions Macros

Definition Built-in formulas for specific Sets of instructions to automate


calculations. tasks.
Usage Entered directly in cells for Invoked to execute multiple
calculations. actions.
Scope Operate on data within the Can perform a wide range of tasks,
spreadsheet. including formatting and data
manipulation.
Syntax Follows specific syntax and Can include complex programming
requires parameters. constructs.
Complexity Generally simple and Can be complex, involving loops
straightforward. and conditions.
Automation Does not automate processes. Designed for automation and
efficiency.
Performance Optimized for quick calculations Performance may vary depending
on cell data. on complexity; can be slower for
large tasks.
Accessibility Easily accessible from the formula Requires knowledge of
bar and help menu. programming or macro recording
to create and manage.
Security Generally safe as they are built-in. May pose security risks if macros
are from untrusted sources.

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

1. Start with a Letter: Macro names should begin with a letter (A-Z or a-z), not a
number or special character.
2. Use Alphanumeric Characters: You can use letters (A-Z, a-z), numbers (0-9),
and underscores (_) in the name. Special characters (like @, #, $, etc.) and
spaces are not allowed.
3. Case Sensitivity: Macro names are case-sensitive, meaning "MyMacro" and
"mymacro" are considered different. Consistency in case usage is
recommended.
4. Limit Length: While there’s typically no strict limit, keeping names reasonably
short (but descriptive) is advisable for ease of use and readability.
5. No Leading Underscores: Some conventions suggest avoiding names that
begin with an underscore, as these may be reserved for system or internal
macros.
6. Use Unique Names: Ensure that each macro has a unique name within the
same library to avoid conflicts or confusion.

6. Give any one advantage of macros.


1. Automation of Repetitive Tasks: Macros can automate frequently performed
tasks, saving time and reducing the potential for human error.
2. Increased Efficiency: By executing complex sequences of actions with a single
command, macros streamline workflows and improve overall productivity.
3. Consistency(keep same formatting): Macros ensure that tasks are performed
uniformly every time, which is particularly important for data entry,
formatting, and reporting.
4. Time Savings: Automating tasks means less manual work, allowing users to
focus on more critical aspects of their projects or responsibilities.
5. Error Reduction: By minimizing manual input, macros help reduce the
likelihood of mistakes that can occur with repetitive actions.
6. Simplified Processes: Macros can simplify complex processes, making them
accessible to users who may not have advanced skills in programming or
software.
7. User-Friendly: Once created, macros can be easily executed by users without
requiring them to understand the underlying code or processes.

7. How Macros Work as Functions?

1. Definition: Just like a function in programming, a macro can take inputs


(arguments), perform operations, and produce outputs (results).
2. Reusable Code: Macros can be reused multiple times across different
spreadsheets or within the same sheet, similar to how you can call a function
whenever needed without rewriting the code.
3. Automation: When called, a macro performs a series of tasks automatically,
which can include calculations, formatting, data manipulation etc.
4. Customization: You can define a macro to perform specific tasks based on
your needs, similar to how you might create a custom function to handle
unique calculations.

Benefits of Using Macros as Functions

 Efficiency: Automating repetitive tasks saves time, allowing users to focus on


more important analysis or decision-making.
 Consistency: Macros ensure tasks are performed uniformly every time they
are executed.
 Ease of Use: Users can run a macro with a simple click or keyboard shortcut,
making it user-friendly, especially for non-technical users.
 Time-Saving: Automates repetitive tasks, significantly speeding up workflows.

Example

Imagine you often need to format a report by applying specific fonts, colors, and
borders. Instead of doing this manually every time, you could create a macro
that applies all these formats with a single command. When executed, the macro
acts like a function, carrying out all these formatting steps automatically.

You might also like