0% found this document useful (0 votes)
10 views2 pages

Macros and Multiple Operations

The document explains macros, which are single instructions that execute a set of commands for repetitive tasks in LibreOffice. It details how to enable macro recording, the limitations of recorded actions, and provides steps for recording macros, naming conventions, and examples of macro functions. Additionally, it covers the What-if Analysis Tool, its definition, advantages, and how to access the Multiple Operations window.

Uploaded by

yuvan.inbox29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Macros and Multiple Operations

The document explains macros, which are single instructions that execute a set of commands for repetitive tasks in LibreOffice. It details how to enable macro recording, the limitations of recorded actions, and provides steps for recording macros, naming conventions, and examples of macro functions. Additionally, it covers the What-if Analysis Tool, its definition, advantages, and how to access the Multiple Operations window.

Uploaded by

yuvan.inbox29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MACROS

1) Define Macro and what is the use of Macros?


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.

2) How to enable Macro recording?


Tools > Options > LibreOffice > Advanced. Observe the Optional Features. There are two options which
are not check marked. Put the checkmark on the option “Enable macro recording” the Record Macro
option found under Tools

3) What are the actions that are not recorded in Macros?


The following actions are not recorded.
• Opening of windows
• Actions 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, customizing.
• Record Macro option after enabling macro • Selections are recorded only if they are done by using
the keyboard (cursor traveling), but not when the mouse is used.
• The macro recorder works only in Calc and Writer.

4) Write the steps to record a macro.


Step 1. Click on Tools > Macros and then click on the Record Macro option.
Step 2. Now start taking actions that will be recorded.
Step 3. Once you click on Record Macro option, recording of actions starts and a small alert will be
displayed
Step 4: Click on “Stop Recording” button to stop the recording.
Step 5. This will open the Basic Macros dialog window to save and run the created macro
Step 6. To save the macro, first select the object where you want the macro to be saved in the Save Macro
to list box.
Step 7. The name of the macro by default is Main and is saved in the Standard Library in Module1. You
can change the name of the macro.
Step 8. Click on Save button.

5) What is a Library?
A Library is a collection of modules which in turn is a collection of macros.

6) What are Rules for naming a Macro?


The name should :
• Begin with a letter
• Not contain spaces
• Not contain special characters except for _ (underscore)

7) What are the three names shown in the Macro library?


• LibreOffice Macros library is provided by LibreOffice and contains modules with pre-recorded macros
and should not be changed.
• My Macros contain macros that we write or add to LibreOffice.
• Untitled1 is the name of the worksheet we are working on. Since at this time we have not saved the
worksheet with another name it is showing Untitled1. You will see further that Untitled1 will be replaced
with the name of the spreadsheet.
8) Macro as a Function
A Macro function is used to perform calculations that are repetitive in nature. It can be applied to different
data in different sheets. It will save us the effort of remembering and typing the formulas. A function is
capable of accepting arguments or values.

9) Write a macro function to store and use a constant value.


function pi_val()
pi_val = 3.143
end function

10) Write a macro function to add two numbers


function tot(a,b)
tot= a+b
end function

11) Write a macro function to pick the smaller number


function smal(a,b)
if a<b then
smal=a
else if b<a then
smal=b
else
smal="Both numbers are equal"
end if
end if
end function

What-if Analysis Tool > Multiple Operations

1) What-if Analysis Tool Definition


What-if Analysis Tool > Multiple Operations and is a planning tool for what-if questions. The Multiple
Operations tools creates a formula array to display the list of results applying the formula on a list of
alternative values used in the formula. This tool uses two arrays of cells, one array contains the input
values and the second array uses the formula and display the result.

2) What-if Analysis Tool Advantages


It is useful to check in the beginning to understand from the output for the efficiency. What-if analysis
tool is very helpful when we want to know how much profit we earn for a particular product for a series
of selling units.

3) How do you open Multiple Operations window what are the components present in it?
Click on Data>Multiple Operations. It will display the multiple operations dialog window

Formula cell – Enter the cell address which contains the formula
Row input cell – Cell address of the cell which is a variable and is used in the formula in Column input cell
box.
Column input cell – Cell address of the cell which is a variable and is used in the formula in Column input
cell box.

You might also like