CH 2
CH 2
Spreadsheet
(Advanced) using
LibreOffice Calc
Introduction
In the modern digital world, one of the most important
thing is counting and calculations. Every profession,
household, institution and even our smart devices have
to deal with numbers. In computers we can do the
calculations on number of records spread over the long
sheet using the spreadsheet software that helps to work
with numbers efficiently. It resembles an accountant’s
ledger book wherein everything is recorded under
suitable headings. We have already learned in Class 9,
that how the spreadsheet software performs calculations
and present data in tabular format. It becomes easy
to visualise a huge grid of numbers when represented
using charts in electronic spreadsheet. Moving further,
in this unit you will learn advanced features of electronic
spreadsheet using LibreOffice Calc to perform analysis,
automate repeated tasks, link, share and review data. It
includes – analysing data to extract useful information
for making effective decisions. Macros, is the another
powerful feature of spreadsheet covered in this unit.
Macros are a set of stored functions used to automate
processes repeatedly. They are tools which can be used
2023-24
2023-24
4
Chapter
Scenarios and Goal Seek
Introduction
Analysing data is the process to extract useful information
for making effective decisions. The spreadsheet is one of
the best software used for data analysis. It is used to
retrieve, correlate, explore and visualise data to identify
patterns, trends and relationships. The spreadsheet
component in LibreOffice known as Calc includes several
tools used to manipulate the data in the spreadsheet.
You can analyse the data and interpret the results from
it. In this chapter, you will learn to analyse data using
LibreOffice Calc.
Consolidating Data
Consolidate is a function used to combine information
from multiple sheets of the spreadsheet into one place
to summarize the information. It is used to view and
compare variety of data in a single spreadsheet for
identifying trends and relationships.
You need to check the following before consolidating
data.
• Open each sheet in the spreadsheet and check
that the data types must match which you want
to consolidate.
• Match the labels from all the sheets which are
used for consolidating.
• Enter the first column as the primary column on
the basis of which the data is to be consolidated.
Steps to consolidate the data are as follows:
Step 1. Open the spreadsheet which has the data to be
consolidated.
Step 2. Create a new sheet where the data has to be
consolidated.
Step 3. Choose Data > Consolidate option that will open
Consolidate dialog as shown in Fig. 4.1.
2023-24
2023-24
Fig. 4.4: Data for ABC_Branch Fig. 4.5: Data for XYZ_Branch
2023-24
Fig. 4.7: Selecting the source data range from the sheet
Step 5. Click on the sheet XYZ_Branch and select the area to
be consolidated and then click on ADD will add the
next consolidation range (Fig. 4.8).
Step 6. Click on the ‘+’ sign next to Options in the Consolidate
dialog window to change the settings.
‘Consolidate by’ has two options Row labels and Column labels.
Check row label or column label or both if you want to consolidate
it by matching the label.
If Link to source data is checked, then it will keep on updating
the data of the Consolidate sheet automatically if there is any
change made in the selected ranges.
2023-24
2023-24
2023-24
2023-24
What-if Scenarios
What-if scenario is a set of values that can be used
within the calculations in the spreadsheet. A name
is given to the scenario and several scenarios can be
created on the same sheet.
It is used to explore and compare various alternatives
depending on changing conditions. It can be used in the
beginning of any project to optimise the output. This tool
is used to predict the output while changing the inputs
which reflects the output and thus one can choose the
best plan of action based on it.
Electronic Spreadsheet (Advanced) using LibreOffice Calc 93
2023-24
2023-24
2023-24
2023-24
2023-24
Goal Seek
It general we fill in the values in the cells and then
create formula on these values to get the required
result. To predict the output, we keep on changing all
the input values to obtain the desired output. Goal seek
2023-24
2023-24
2023-24
2023-24
2023-24
Lab Exercise
2023-24
Introduction
Many times, we have to perform repeated tasks such
as typing school name, address, contact numbers with
a specific formatting or apply the same formula at a
particular cell for different sheets in a workbook. How
easy would it be if we could get this done at the click
of a button? This will ensure that we maintain the
standardization in terms of font style without any typing
mistake. Can you think of any other advantage? In this
chapter, you will learn how to use a macro to automate
repeated tasks that are always performed in the same
way over and over again.
Recording a Macro
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.
It is important to know that by default
the macro recording feature is turned
off when LibreOffice is installed on your
computer. Hence, to record a Macro ensure
that the macro recording is enabled. Macro
recording can be enabled using the Tools
option on the main menu bar by selecting
Tools > Options > LibreOffice > Advanced.
Observe the Optional Features. There are
two options which are not check marked.
Put the checkmark on the option “Enable
Fig. 5.1: Enabling a Macro macro recording” as shown in Fig. 5.1.
2023-24
2023-24
Note : If all the macros will be given the same name then they
will overwrite the previous Macro created by that name.
2023-24
Running a Macro
Let us now run the macro for another sheet which
requires its heading in cell A1 to be given the same
format as recorded in the Formatheading macro. To run
a macro we need to perform the following steps.
Step 1. Type the heading in cell A1
Step 2. Use Tools > Macros > Run Macro to open the
Macro Selector dialog box as shown in Fig. 5.6.
2023-24
Warning – Do not make any changes to the code unless you are
aware of the language.
Note – The code of a macro begins with Sub followed by the
name of the macro and ends with End Sub .
2023-24
Fig. 5.8: Basic Macro dialog window Fig. 5.9: LibreOffice Basic Macro Organiser
2023-24
2023-24
Macro as a Function
Consider a situation wherein you need to perform
calculations that are repetitive in nature. Assume that
the same formula needs to be applied to different data in
different sheets and there is no predefined function for it.
In such a situation will it not be convenient if we could
create a macro that performs the calculations? It will save
us the effort of remembering and typing the formulas. It
is possible to do so if we use Macro as a function. Instead
of writing instructions in between Sub and End Sub, we
can write instructions in between Function and End
Function. A function is capable of accepting arguments
or values. It can perform operations on the arguments,
perform calculations and return the result.
Fig. 5.14: Sheet storing length and width of floor and tile
2023-24
2023-24
2023-24
Lab Exercises
2023-24
Source: https://data.gov.in/resources/seasonal-and-annual-minmax-
temp-series-india-1901-2017
Collect information about the population of the South
Asian countries form the Internet and store it in a Calc
sheet. Run the Macro created in (i) to display a chart for the
data stored.
Create Macro as a function to calculate Amount to be
paid after a 5% discount. A sample sheet for the same is
given below.
2023-24
Introduction
We have learned in Class IX to organise the data in a
spreadsheet. Let us take a situation where the marks
scored by each student of three terms in three terminal
examinations are stored in three different sheets
Term1, Term2, Term3. Now to generate final result in
single result sheet by finding the average marks of each
subject, what would be the ideal solution?
Retyping or copying the marks can be one solution
but it will be time consuming and also there are chances
of committing typing errors.
Instead, the ideal solution will be to find a way to
refer the marks stored in the sheets Term1, Term2 and
Term3. In this manner, there are nearly no chances of
errors and if the marks of a subject are changed, they
will be reflected and thus ensuring correctness while
performing calculations, such as calculating average.
In this chapter, we will learn how to create multiple
sheets, and also to link the data in multiple sheets. It
can be done in two ways, one is creating reference to
other sheets/documents by using keyboard and mouse,
and other is by linking external data.
2023-24
2023-24
2023-24
2023-24
2023-24
Fig. 6.9: Displaying the highest score in English using Max function
We had selected cell reference by clicking on the cells in the
separate spreadsheet and an alternative could be to type the
reference. First, we need to understand how referencing is
performed across different spreadsheet files.
To refer to a cell in a different spreadsheet we write in single
quotes the path of the file followed by #$ then the name of the
sheet followed by a . (dot) and then the cell address.
For example: ‘file:///C:/Users/ADMIN/Documents/X-A.ods’#
$Result.C4
Note : The path of a file has three forward slash ///. A filename
can have space within its name hence single quotes (‘ ‘) are used.
It is also possible to insert a sheet from another file. The From
file option of Insert Sheet Dialog box allows us to insert sheet
from another file as well (refer Fig. 6.10).
Insert a sheet from an existing file into the current document.
2023-24
2023-24
Creating Hyperlinks
It is possible to hyperlink a sheet of other spreadsheet
document in a spreadsheet. Suppose, you have to
hyperlink a Result sheet of “Result-X-A” spreadsheet
document in the “Result-X-B” spreadsheet document,
then follow the following steps:
Step 1. Open the Result-
X-B spreadsheet
document.
Step 2. From the main
menu, select and
click on Insert
> Hyperlink.
An Hyperlink
dialog box will
open as shown in
Fig. 6.13.
Fig. 6.13: Hyperlink dialog box
2023-24
2023-24
Let’s Practice
Create a Hyper link to
Result Analysis
spreadsheet.
Editing a Hyperlink
To edit an existing link, place the
cursor anywhere in the link and
right click the hyperlink. A context
menu will be displayed as shown in
Fig. 6.17.
Click on Edit Hyperlink...,
the Hyperlink dialog box will be
displayed, where you can make
changes to the hyperlink.
Fig. 6.17: Selecting Edit Hyperlink from context menu
on right clicking the Hyperlink
2023-24
2023-24
2023-24
2023-24
Lab Exercises
2023-24
7
Chapter
Spreadsheet
Introduction
In LibreOffice Calc, one spreadsheet can be used by
more than one user at a time by sharing it. A shared
spreadsheet is a same sheet that can be accessed by
more than one user and can allow them to make changes
simultaneously on it. It saves the trouble of keeping track
of multiple copies of the same spreadsheet. Sharing
allows working in collaboration so that everyone can
contribute, make changes and view it.
Sharing Spreadsheet
Sharing a spreadsheet is just like a
teamwork to work in collaboration with
other users. The following are the steps
to share the spreadsheet.
Step 1. Open a new spreadsheet and
save it with some name.
Step 2. Select and click on Tools >
Share Spreadsheet from main menu
bar. This will open the Share Document
dialog window as shown in Fig. 7.1
which can be used to enable or disable
sharing option.
Fig 7.1: Share Document dialog window
Step 3. Click on the checkbox “Share
this spreadsheet with other users” to
share the spreadsheet and click on OK
button. This will open the confirmation
dialog window as shown in Fig. 7.2 to
save the spreadsheet to activate the
Fig. 7.2: Confirmation dialog window for
sharing a spreadsheet shared mode.
2023-24
2023-24
2023-24
2023-24
Fig. 7.11: Entering text in Comment Fig. 7.12: Comment displayed with full description
dialog window
2023-24
2023-24
2023-24
2023-24
Fig. 7.22: Open the Test1.ods from Merge With dialog window
2023-24
Comparing Documents
Instead of merging two spreadsheets, one can
compare the two spreadsheets by comparing the
documents. Follow the following steps to compare
the documents. Let us compare the two earlier
created spreadsheets Test.ods and Test1.ods
Step 1. Open the spreadsheet file Test.ods. Click
on Edit > Track Changes > Compare
Document as shown in Fig. 7.25.
Step 2. This will open the Compare to dialog
Fig. 7.25: Selecting Compare
window, which will allow to open the Document option
spreadsheet to be compared. Select the
spreadsheet file Test1.ods and click on
Open button as shown in Fig. 7.26.
Step 3. This will open the Manage Changes
dialog window to accept/reject the
changes. Click on Accept as shown in
Fig. 7.27.
Step 4. Finally click on Close button to close the
Manage Changes dialog window as Fig. 7.26: Open Test1.ods from
shown in Fig. 7.28. Compare to dialog window
Fig. 7.27: Accepting Manage Changes Fig. 7.28: Closing Manage Changes dialog window
2023-24
2023-24
Lab Exercise
Anushka and Niyaz have been made the class representative.
Anushka has been asked to collect the class assignments for the
various subjects. Create a spreadsheet to store the roll number,
name of the students and subject names. Perform the following
operations so that Niyaz can access the file:
1. Enable Track changes
2. Add comment to show the date on which the assignment
has been submitted.
3. Share the document with the class teacher.
2023-24