Download as pdf or txt
Download as pdf or txt
You are on page 1of 58

2 Electronic

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

Unit 2.indd 84 7/22/2022 3:01:26 PM


to perform most of the redundant tasks with relative Notes
ease. In the second chapter of this unit, you will learn
to create multiple sheets and link the data in multiple
sheets. It can be done in two ways, one is creating
reference to other sheets by using keyboard and mouse,
and other is by linking external data. LibreOffice Calc
also provides the sharing feature that allows to share
the spreadsheet for editing purpose. This saves to
keep track of multiple copies of the same spreadsheet
corrected by different users. Sharing allows the users to
work on the same spreadsheet in collaboration.

Electronic Spreadsheet (Advanced) using LibreOffice Calc 85

2023-24

Unit 2.indd 85 7/22/2022 3:01:26 PM


Analyse Data using

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

Unit 2.indd 86 7/22/2022 3:01:26 PM


Step 4. Observe that the default function
“Sum” is seen in the Function drop-
down. You will be able to see the
list of functions as shown in the
Fig. 4.2 by clicking on the Function
drop-down.
Step 5. Choose the required function from
the drop-down list.
Step 6. The sources data range list contains
existing named ranges to quickly
select from that. But if the source
range is undefined, then click and
select the range from the sheet Fig. 4.1: Consolidate dialog box
which is to be consolidated.
Step 7. Click on Add to add this range
under the ‘Consolidation ranges’ of
the Consolidation dialog.
Step 8. Repeat steps 6 and 7 to add more
sheets to be consolidated.
Step 9. Remember to check the target
range specified under Use ‘Copy
results to’. If it is not mentioned,
then click on the cell of sheet where
the final data has to be produced.
Step 10. Click on Options that will list two
checkbox under Consolidate by Fig. 4.2: Functions under consolidate
“Row labels” and “Column labels”
and “Link to source data” under
Options, as shown in Fig. 4.3. From
this you can select the additional
feature as per requirement. The
option consolidate by rows and
columns are checked to consolidate
data as per row labels and column
label. Link to source data is
checked to make the modification
automatically in the consolidated
(target) sheet while making any
changes in the source data.
Step 11. Finally click on OK button.
Let us illustrate this through following Fig. 4.3: Consolidate options
activity.

Electronic Spreadsheet (Advanced) using LibreOffice Calc 87

2023-24

Unit 2.indd 87 7/22/2022 3:01:26 PM


Notes
Practical Activity 4.1
Let us take an example that we have two branches of our
shop namely ABC and XYZ. We have the Sales records for the
month of January and February of both the branches in two
different sheets named ABC_Branch and XYZ_Branch. Now we
have to consolidate these two sheets to get the sum of both the
sheets monthly to get the insight about the sale as per product
and branch.
Now let us create the following sheets in a spreadsheet sales.

Fig. 4.4: Data for ABC_Branch Fig. 4.5: Data for XYZ_Branch

Now let us use the two sheets ‘ABC_Branch’ and ‘XYZ_Branch’


of a spreadsheet sales.ods which will be consolidated using the
following steps:
Step 1. Add a new sheet and rename it as Consolidate
Step 2. Click on Data > Consolidate or use the keyboard
shortcut key ALT+D, the Consolidate dialog window
will open as shown in Fig. 4.6.

Fig. 4.6: Consolidate dialog window


Step 3. In the Function box, choose Sum function from the drop
down as we want to add the data from all the sheets.
Step 4. Click in the Source data ranges box and then click
on the worksheet ABC_Branch and select the area to
be consolidated and then click on the Add button will
add the copy reference in the consolidation ranges
(Fig. 4.7).

88 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 88 7/22/2022 3:01:27 PM


Notes

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.

Fig. 4.8: Options for setting more properties

Step 7. Click on ‘Copy


results to’ and
then click on any
of the cell in the
Consolidate sheet
where you want to
copy the final result
after consolidation.
Step 8. Click on OK button.
Fig. 4.9 will display
the Consolidate
sheet with data after Fig. 4.9: Consolidated sheet
consolidation.

Electronic Spreadsheet (Advanced) using LibreOffice Calc 89

2023-24

Unit 2.indd 89 7/22/2022 3:01:27 PM


Notes The consolidated sheet will have all the consolidated data along
with the original data. You can view the original data of both the
sheets and by clicking on the ‘+’ sign in front of the consolidated
row. Fig. 4.10 shows the original data and consolidated data.

Fig. 4.10: Consolidated sheet details by clicking on


the + sign in front of rows

Practical Activity 4.2


Create two sheets Marks_Term1 and Marks_Term2 to store the
marks in Term1 and Term2 for a set of students taking the
following columns:
1. Name
2. Marks in English
3. Marks in Hindi
4. Marks in Maths
5. Marks in Science
6. Marks in Social Science
7. Total marks (using function Sum)
8. Percentage (using function Average)
Now, use the consolidate function to merge these two sheets.

Groups and Subtotals


Group and Outline in Calc is used to create an outline
of the selected data and can group rows and columns
together so that one can collapse (-) to hide it or expand
(+) it using a single click on it.
Select the data to be grouped, click on Data>Group
and Outline. Then choose Rows to group the data on
the basis of rows or columns to group it on the basis of
columns.
90 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 90 7/22/2022 3:01:27 PM


The Subtotal tool in Calc creates
the group automatically and applies
common functions like sum, average on
the grouped data. One can use any type
of summary function for each column as
per the requirement of data analysis.
It can group subtotals by using
category and sorts them in ascending or
descending order so that one need not to
use filters.
Follow the following steps to apply
Subtotal tool.
Step 1. The sheet where this is to be
applied must have labels to the
Fig. 4.11: Choosing subtotal option from
column Data menu
Step 2. Click on Data menu and choose
Subtotals (Data>Subtotals) as
shown in Fig. 4.11.
Step 3. Choose the column in the Group
by list in the subtotal dialog
which is to be used for grouping
the data in the sheet as shown in
Fig. 4.12.
Step 4. Select the column by clicking
the checkbox under Calculate
subtotals for to create subtotals
for.
Fig .4.12: Choose the column in the
Step 5. Select the desired function by Group by list
clicking the function under Use
function.
Step 6. You can use the 2nd Group and 3rd Group tabs
to group the data in further levels.
Step 7. Click on OK button.

Practical Activity 4.3


Let us take an example to store marks in various subjects by
students of Class X as shown in the table given in Fig. 4.13. To
take out the average of the subjects scored in each class, use the
subtotal tool which automatically group the data on a particular
column and perform the selected function on any of the column.

Electronic Spreadsheet (Advanced) using LibreOffice Calc 91

2023-24

Unit 2.indd 91 7/22/2022 3:01:27 PM


Notes To solve this, perform the following steps:
Step 1. Create a sheet as shown in the Fig. 4.13 to take the
marks for students in a term for a class.

Fig. 4.13: Spreadsheet with student marks in two class


Step 2. Now, to calculate the average marks scored by the
students of each class in each subject, i.e. class-wise
and subject analysis.
Step 3. To do so, click on Data > Subtotal, the subtotal dialog
as shown in Fig. 4.14 will open.

Fig. 4.14: Subtotal dialog window


Step 4. Choose the column i.e. Class under Group by in the 1st
Group on which we need to group the whole data. Also,
select the subjects i.e. English, Hindi, Maths, Science
and Social Science under Calculate subtotals for. For
each subject
click on the
Average under
Use function
individually
otherwise Sum
function will
be used by
default.
Step 5. Click OK and
the sheet will
look like as
shown in the
Fig. 4.15.
Fig. 4.15: Marks list after Subtotal

92 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 92 7/22/2022 3:01:27 PM


Observe that outline to the left of the row numbers Notes
which is inserted after performing the subtotal tool.
This outline shows the hierarchical structure which can
be used to show or hide different levels by clicking on
the group indicators ‘+’ sign to expand and ‘–’ sign to
collapse the data.
You can hide the low-level details and just look at
the final totals and grand totals.
If you want to remove the outline feature from
the sheet at any point of time then it is possible
by just clicking on Data > Group and Outline >
Remove Outline.

Practical Activity 4.4


Create a sheet as shown in Fig. 4.16 and then calculate the
average of marks subject wise on the basis of class and stream.
Also, try out another function Count to calculate the number of
students in each subject.

Fig. 4.16: Marksheet

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

Unit 2.indd 93 7/22/2022 3:01:28 PM


For example, a person who is taking car loan has to
decide on certain factors as given below:
• The number of years for which the car loan is
taken.
• The total amount of car loan
The above two factors, i.e. Principal amount and
Number of years can display the EMI to be paid monthly.
Follow the following steps to create scenario.
Fig. 4.17: Create Scenario Step 1. Select the cells which contains values in the
dialog window sheet that needs to be changed. To select
multiple cells, hold Ctrl key and click on the
cell to be selected.
Step 2. Choose Tools>Scenarios will open scenario
dialog window as shown in Fig. 4.17.
Step 3. Enter a name for the new scenario and leave
the other fields unchanged.
Step 4. Click on OK button.
Step 5. This will create a new scenario which is activated
automatically.

Practical Activity 4.5


Let us take an example to get the insight of the EMI, Total Amount
paid and Total Interest paid on the Loan Amount (Principal)
taken for a fixed Rate of Interest for a number of time period. So,
now we want to see what will be the EMI and how much is the
total interest paid for different loan amount and time period. To
do so, let us use the Scenario tool by using the following steps:
Step 1. Create the following sheet (Fig. 4.18) and remember to
put the formula to calculate EMI in B3 as
= ABS(PMT(B2/1200,E1*12,B1))
Total Amount in B4
= B3*E1*12
Total Interest in B8
= B4-B1

Fig. 4.18: Loan sheet

94 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 94 7/22/2022 3:01:28 PM


Step 2. Select the cells B1 and E1 using Ctrl + Click on these Notes
cells as these two are the variables in this situation
Step 3. Choose Tools > Scenario will display the Create
Scenario dialog window as shown in Fig. 4.19.

Fig. 4.19: Create Scenario dialog window


Step 4. Write the name of the Scenario and click on OK button
will add this in the scenario list.
Step 5. Let us create two more scenarios as LAmt_2 and
LAmt_3 with Loan Amount as 2500000, No. of years
as 12 and Loan Amount as 2500000, No. of years as
10 respectively. We can define different scenarios to do
so on the same sheet, each with some different values
in the defined cells. Click on Tools > Scenario, write
the name of the scenario and click on OK. The Loan
sheet will look like as shown in the Fig. 4.20

Fig. 4.20: Loan sheet with scenarios

Step 6. Click on the navigator icon in the toolbar and then


click on scenarios. Click on the scenario name will
display all the details as per that scenario.

Practical Activity 4.6


Calculate the income tax by entering the salary using different
scenarios for two variables income tax slab and tax rate. The
sheet should look as shown in Fig. 4.21.
The different scenarios to be taken as given below:
Income Slab Tax rate
7.5 to 10 lakhs 15%
10 to 12.5 lakhs 20%

Electronic Spreadsheet (Advanced) using LibreOffice Calc 95

2023-24

Unit 2.indd 95 7/22/2022 3:01:28 PM


Notes 12.5 to 15 lakhs 25%
>15 lakhs 30%

Fig. 4.21: Income tax sheet

What-if Analysis Tool


What-if tool uses Data > Multiple Operations and
is a planning tool for what-if questions. In this, the
output is not shown in the same cells, whereas it uses a
drop-down list to display the output depending upon the
input. The Multiple Operations tool 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.
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.
Following steps are used for what-if analysis tool:
Let us calculate with one formula and one variable:
Step 1. Enter the data in the cells and then enter a
formula to calculate a result from values in
other cells.
Step 2. Create an array of input values on the basis of
which the output is to be generated using the
formula.
Step 3. Select the cell range of input array and output
array.
96 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 96 7/22/2022 3:01:28 PM


Step 4. Click on Data>Multiple
Operations will display the
multiple operations dialog window
as shown in Fig. 4.22.
Step 5. Enter the cell address in the
Formulas box from the sheet which
contains the formula
Fig. 4.22: Multiple operation dialog window
Step 6. Now, enter the cell address of the
cell which is a variable and is used
in the formula in Column input cell box.
Step 7. Click on OK will generate all the possible
outputs based on the formula.

Practical Activity 4.7


Let us take an example to calculate the profit on annual series of
sale depending on the Selling Price, Cost Price and Fixed Cost
expenses.
Step 1. Create the sheet as given below in Fig. 4.23

Fig. 4.23: Sale_incentive sheet


Step 2. In Cell B5 enter the formula = B4 * ( B1 – B2) – B3
Step 3. Select the cell range from D2:E11
Step 4. Click on Data > Multiple Operations will display
the Multiple operations dialog window as shown in
Fig. 4.24.

Fig. 4.24: Performing Multiple Operations

Electronic Spreadsheet (Advanced) using LibreOffice Calc 97

2023-24

Unit 2.indd 97 7/22/2022 3:01:28 PM


Notes Step 5. We have formula in cell B5, as we want to use the
same cell address to be copied therefore, we have used
absolute cell referencing and written it as $B$5.
Step 6. In this example, we have another variable as number
of items sold which is in the cell $B$4
Step 7. Click on OK will generate a sheet as shown in
Fig. 4.25.

Fig. 4.25: Result for multiple operations

Practical Activity 4.8


Create the following sheet (Fig. 4.26) to calculate the profit and
then decide how many books are to be published based on
the profit.

Fig. 4.26: Practical exercise

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

98 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 98 7/22/2022 3:01:28 PM


helps in finding out the input for the specific output.
For example, if you want to know the number of units
produced to get the desired output then use Goal seek
analysis tool. Follow the following steps to use Goal
seek tool.
Step 1. Enter the values in the worksheet.
Step 2. Write the formula in the cell where the
calculation has to be used.
Step 3. Place the cursor in the formula cell, choose
Tools > Goal Seek.
Step 4. The Goal seek dialog window will appear as
shown in Fig. 4.27, the Formula cell box will
have the correct formula.
Step 5. Place the cursor on the Variable cell box and Fig. 4.27: Goal seek
click on the cell that contains the value to be dialog window
changed.
Step 6. Enter the desired result in the Target value box.
Step 7. Click on OK button.

Practical Activity 4.9


Let us take a very simple example to perform the backward
calculation to find out an input depending upon the specific
output. A student has received marks in 4 subjects and has to
appear for the 5th subject and plans an aggregate as 70. So, he
can use goal seek tool to check how many marks he has to score
in the 5th subject to get the required percentage. Follow the
following steps to perform this task.
Step 1. Create the marksheet as shown below in the
Fig. 4.28. Enter the average function in cell B7 as =
Average(B2:B6)

Fig. 4.28: Marksheet

Electronic Spreadsheet (Advanced) using LibreOffice Calc 99

2023-24

Unit 2.indd 99 7/22/2022 3:01:28 PM


Notes Step 2. Click on Tools > Goal Seek will display the Goal seek
dialog window as shown in Fig. 4.29.

Fig. 4.29: Goal seek dialog window


Step 4. Write the cell address of the formula, i.e. B7 in the
Formula cell box.
Step 5. Write the cell address of the cell which is to be
generated by the system in the Variable cell box. In
this example, it is cell B6 which we want to be filled as
per the average marks needed.
Step 6. Enter the result in the Target value box. As per our
question, we have to get minimum 70 aggregate so we
will write 70 in the target value.
Step 7. Clicking on OK will display an error as LibreOffice
Calc will not accept the Variable cell to be empty. So,
this error dialog window will prompt to add 0 value in
the variable cell as shown in Fig. 4.30.

Fig. 4.30: Goal Seek failed alert


Step 8. Click on Yes and then repeat the step 2 will display the
dialog window and prompts whether to change the cell
with the calculated value as shown in Fig. 4.31.

Fig. 4.31: Goal Seek succeeded


Step 9. Click on Yes will change the value with the calculated
one in the sheet as shown in the Fig. 4.32.

Fig. 4.32: Marksheet after applying Goal seek

100 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 100 7/22/2022 3:01:28 PM


Notes
Practical Activity 4.10
Create the following spreadsheet (Fig. 4.33) to find out the quantity
to be sold for the item Talc so as to get the total amount of 50000.

Fig. 4.33: Practical Exercise

Check Your Progress


A. Multiple choice questions

1. Which of the following feature is not used for data analysis


in spreadsheet?
(b) Consolidating data
(c) Goal Seek
(d) Subtotal
(e) Page layout
2. Which of the following office tool is known for data
analysis?
(a) Writer
(b) Calc
(c) Impress
(d) Draw
3. Which of the following operations cannot be performed
using LibreOffice Calc?
(a) Store and manipulate data
(b) Create graphical representation of data
(c) Analysis of data
(d) Mail merge
4. What is the extension of spreadsheet file in Calc?
(a) .odb
(b) .odt
(c) .odg
(d) .ods
5. The default function while using Consolidate is
____________.
(a) Average
(b) Sum
(c) Max
(d) Count
6. Group by is used in _____________ tool to apply summary
functions on columns.
(a) Consolidate function
(b) Group and Outline
(c) What-if scenario
(d) Subtotal tool

Electronic Spreadsheet (Advanced) using LibreOffice Calc 101

2023-24

Unit 2.indd 101 7/22/2022 3:01:28 PM


Notes 7. Which tool is used to predict the output while changing
the input?
(a) Consolidate function
(b) What-if scenario
(c) Goal seek
(d) Fine and Replace
5. Which of the following is an example for absolute cell
referencing?
(a) C5
(b) $C$5
(c) $C
(d) #C
5. _____________ analysis tool works in reverse order, finding
input based on the output.
(a) Consolidate function
(b) Goal seek
(c) What-if analysis
(d) Scenario

B. State whether the following statements are True or False

1. Consolidate function is used to combine information from


two or more sheets into one.
2. Consolidate function cannot be used to view and compare
data.
3. Link to source data is checked updates the target sheet if
any changes made in the source data.
4. Using subtotal in Calc needs to use filter data for sorting.
5. Subtotal tool can use only one type of summary function
for all columns.
6. Only one scenario can be created for one sheet.
7. What-if analysis tool uses one array of cells.
8. Goal seek analysis tool is used while calculating the output
depending on the input.
9. The output of What-if tool is displayed in the same cell

C. Fill in the blanks

1. Consolidate function is used to combine information from


multiple sheets to _______________________ the information.
2. Data can be viewed and compared in a single sheet for
identifying trends and relationships using ______________
function.
3. ________________ under Data menu can be used to
combine information from multiple sheets into one sheet
to compare data.
4. The _________________ tool in Calc creates the group
automatically and applies functions on the grouped data.

102 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 102 7/22/2022 3:01:29 PM


5. _______________ scenario is used to explore and compare Notes
various alternatives depending on changing conditions.
6. ______________ is a planning tool for what-if questions.
7. What-if analysis tool uses ____________ array of cells,
one array contains input values and the second uses the
_____________.
8. _____________ helps in finding out the input for the specific
output.

D. Answer the following questions

1. Define the terms


(a) Consolidate function
(b) What-if analysis
(c) Goal seek
2. Give one point of difference between
(a) Subtotal and What-if
(b) What-if scenario and What-if tool
3. Give any two advantages of data analysis tools.
4. Name any two tools for data analysis.
5. What are the criteria for consolidating sheets?
6. Which tool is used to create an outline for the selected
data?

Lab Exercise

1. Mr Gurdeep has to take a loan of Rs. 10 lakhs to buy a


house. After assessing his situation, he has realized that
he can pay the loan in 15 years by paying out an EMI
of 20,000.
(a) Use Goal seek to find out the interest rate at which he
can borrow the loan.
(b) Use What If Scenario to depict payment of loan in 25
years by paying out an EMI of 10,000.
(c) Use Scenario manager to find the best case.
2. Power Motors has 3 branches all over Bhopal. Each
branch maintains monthly sales of different models of
electric scooter and at the end of month mails it to the
State Head. Prepare a consolidated sheet that shows
total and average sales made for each model of the
electric scooter with respect to the spreadsheet sent
by the branches to the head office. You are required to
identify the column headings for the various branches,
enter data in three different spreadsheets indicating
different branches and consolidate data to find total
sales and average sales for each model.

Electronic Spreadsheet (Advanced) using LibreOffice Calc 103

2023-24

Unit 2.indd 103 7/22/2022 3:01:29 PM


5
Chapter
Using Macros in Spreadsheet

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

Unit 2.indd 104 7/22/2022 3:01:29 PM


Observe in Fig. 5.2, that the Record
Macro option found under Tools > Macros
is visible now.
The Macro records all the keyboard and
mouse actions but 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,
Fig. 5.2: Record Macro option after enabling macro
changes made in the Options dialog,
macro organizer, customizing.
• 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.
Follow the steps given below 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 as shown in Fig. 5.3. Fig. 5.3: Stop Recording button
Clicking on “Stop Recording” button will
stop the recording of actions.
Step 4. This will open the Basic Macros dialog
window to save and run the created macro,
as shown in Fig. 5.4.
Step 5. To save the macro, first select the object
where you want the macro to be saved in
the Save Macro to list box.
Step 6. 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.
Fig. 5.4: Basic Macros dialog
Step 7. Click on Save button. window

Electronic Spreadsheet (Advanced) using LibreOffice Calc 105

2023-24

Unit 2.indd 105 7/22/2022 3:01:29 PM


Notes A Library is a collection of modules which in turn is a
collection of macros.

Practical Activity 5.1


Record a macro to apply the following style to the Heading “Data
Analysis” in the cell A1.
The font style should be “Times New Roman”
The font size should be “14”
The font colour should be “Blue”
Cells from A1 to G1 should be merged and centred
Procedure
Step 1. Create the spreadsheet. Write the heading “Data
Analysis” in cell A1.
Step 2. Choose Tools > Macros > Record Macro. Perform the
actions mentioned above in Practical Activity 5.1 in
the spreadsheet.
Step 3. Click Stop Recording to stop the Macro Recorder.
Step 4. The Basic Macro dialog appears as shown in Fig. 5.4,
in which you can save and run the macro.
Step 5. A Standard library is present by default when a
spreadsheet is created and saved.
Step 6. To save the macro, first select the object where you
want to save the macro in the Save macro in list
box. Fig. 5.5 shows that the Main macro is saved by
default in the Standard Library in Module1. You can
change the name of the macro. Here, we have named
the macro as FormatHeading.

Fig. 5.5: Naming a Macro

Note : If all the macros will be given the same name then they
will overwrite the previous Macro created by that name.

106 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 106 7/22/2022 3:01:29 PM


Rules for naming a Macro, Module or a Library: Notes
While naming a Macro, Module or a Library the name
should :
• Begin with a letter
• Not contain spaces
• Not contain special characters except for _
(underscore)

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.

Fig. 5.6: Selecting and runnig a Macro

Fig. 5.6 shows three names in the library. Out of which


• 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

Electronic Spreadsheet (Advanced) using LibreOffice Calc 107

2023-24

Unit 2.indd 107 7/22/2022 3:01:29 PM


Notes the worksheet with another name it is showing
Untitled1. You will see further that Untitled1 will
be replaced with the name of the spreadsheet.
Step 3. Select the library and module in the Library
list.
Step 4. Select the macro in the Macro name list.
Step 5. Click Run to run the macro.

Practical Activity 5.2


Run a previously created Macro Formatheading.
Step 1. Type the heading in cell A1.
Step 2. Open the Macro selector dialog box by clicking Tools
-> Macros-> Run Macro
Step 3. Click on MyMacros > Standard > Module1. Then
select Formatheading from the Macro Name box and
click Run as shown in Fig. 5.6.
You will observe that the Heading in Cell A1 is formatted.
The action recorded by a macro is recorded as instructions in a
programming language called BASIC. It is also possible to view
and thus edit the code of a macro. But remember, it is advised to
edit a macro only if you have knowledge of the language in which
the macro is written which is BASIC in case of CALC. You can
view the code generated for the macros by going to Tools >
Macros > Edit Macros.
Choose the macro name from the Object Catalog and the
associated code will be visible as shown in Fig. 5.7.

Fig. 5.7: Code generated for macro in IDE

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 .

108 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 108 7/22/2022 3:01:29 PM


Creating and Organising a Simple Macro
Till now we have learned to record, store and run the
macro. The recorded macro is internally stored as
instructions written in a programming language that
are executed when the macro is executed or run.
We selected a library or module to store our recorded
macro, similarly while creating a macro, either create a
new library/module or edit an existing module stored in
a library. Use the following steps to organize the macro.
Step 1. Click on Tools > Macros > Organize Macros >
LibreOffice Basic to open the LibreOffice Basic
Macro dialog window as shown in Fig. 5.8.
Step 2. Click Organizer to open the Basic Macro
Organizer dialog as shown in Fig. 5.9.

Fig. 5.8: Basic Macro dialog window Fig. 5.9: LibreOffice Basic Macro Organiser

Create a library to store a macro


To create a new library containing modules, click on
Library > New.
Use the following steps to create a module to store
a macro.
Choose the Modules Tab and select a Module. Click
on New to create a new Module.

Electronic Spreadsheet (Advanced) using LibreOffice Calc 109

2023-24

Unit 2.indd 109 7/22/2022 3:01:29 PM


Notes
Practical Activity 5.3
Create a simple Macro using BASIC programming instructions
that will display Hello in a dialog box stored in the Standard
module as shown in Fig. 5.10 when executed.

Fig. 5.10: A Dialog Displaying Hello using macro

Step 1. Open the LibreOffice Basic Macro dialog box using


Tools > Macros > Organize Macros > LibreOffice
Basic.
Step 2. From the Basic Macros dialog box select Organizer
Step 3. From Modules tab, select My Macros folder and click
on New button as shown in Fig. 5.11.

Fig. 5.11: Creating a Module with name Hello


Step 4. Give a name to the New Module say ‘Hello’ and click
Ok. You will see Hello under Standard Library in My
Macros Library.

Fig. 5.12: Module Hello in Basic Macro Organizer Dialog


Step 5. Select Hello and click Edit (Fig. 5.12) to open the
Integrated Development Environment (IDE). It is a
text editor that allows you to create and edit macros.
Type Print “Hello” between Sub Main and End Sub as
shown in Fig. 5.13.

110 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 110 7/22/2022 3:01:29 PM


Notes

Fig. 5.13: Code of Hello Macro


The created module can be executed as explained in the previous
section. Besides, the module can be executed from the IDE by
either clicking the Run button or pressing F5.

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.

Practical Activity 5.4


Calculate the number of tiles required for flooring of a room
using macro as a function. The length and width of the room and
the length and width of a tile is entered in the sheet as shown
in Fig. 5.14.

Fig. 5.14: Sheet storing length and width of floor and tile

Electronic Spreadsheet (Advanced) using LibreOffice Calc 111

2023-24

Unit 2.indd 111 7/22/2022 3:01:30 PM


Notes Step 1. Enter data in a sheet and save it with the name as
Calculatetiles.ods
Step 2. Select Tools > Macros > Organize Macros >
LibreOffice Basic to open the LibreOffice Basic
Macros dialog.
Step 3. Choose Calculatetiles.ods. Click on New and type
a name. We have named it as Calctiles as shown in
Fig. 5.15 and press OK.

Fig. 5.15: Creating a New Module to define function


Step 4. Write a function to calculate the number of tiles. A
function starts with Function followed by the name
of the function and then the statements to calculate
area of the floor, tiles and number of tiles and store
the final result in the name of the function as shown
in Fig. 5.16. Press the Save button on the toolbar or
press Ctrl+S.

Fig. 5.16: IDE showing function definition to calculate number of tiles

Note: The text in grey is preceded by ‘ (single quote) indicating it


is a comment. A comment is written to write descriptive text to
support the code.
Step 5. Use the function in the sheet as shown in Fig. 5.17.

Fig. 5.17: Sheet using Macro as a function

112 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 112 7/22/2022 3:01:30 PM


Step 6. Use fill handle to drag the function for other cells. The Notes
final sheet is shown in Fig. 5.18.

Fig. 5.18: Displaying Number of tiles using Macro as a function

Check Your Progress


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 an invalid Macro Name?
(a) 1formatword
(b) format word
(c) format*word
(d) Format_word.
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.
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

Electronic Spreadsheet (Advanced) using LibreOffice Calc 113

2023-24

Unit 2.indd 113 7/22/2022 3:01:30 PM


Notes B. Fill in the blanks

1. ________ library is automatically loaded when the document


is opened.
2. IDE stands for _______________________________.
3. Macro as a function is capable of accepting ___________
and returning a ____________.
4. Macro ________________ allows us to add, delete a module.
5. The code of macro begins with __________ followed by the
name of the macro and ends with __________.
6. By default a macro is saved in the _____________ .

C. State whether the following statements are True or False

1. Macro is a group of instructions executing a single


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

D. Answer the following questions

1. What is a Macro? List any two real life situations where


they can be used.
2. List the actions that are not recorded by a macro.
3. How is LibreOffice Macros Library different from my
Macros?
4. Differentiate between predefined function in Calc and
Macros as a function
5. List the rules that should be kept in mind while naming
a macro.
6. Give any one advantage of macros.

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 barchart
for the following data showing Minimum and Maximum
temperature from 2010-2017.

114 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 114 7/22/2022 3:01:30 PM


Notes

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.

Fig. 5.19: Lab Exercise 5


4. Anuja has to create a Marks list for every term. The format
is as follows :

Fig. 5.20: Sample Sheet for Marks Entry

(a) Record two macros to create the format given in


Fig. 5.20.
(b) To enter names of students in the list so that she
doesn’t need to retype or copy the names
Run the above created macros for a new sheet.
5. Use Macro as a function to calculate Mileage of a vehicle.
Mileage (in km/L) is calculated as Distance Travelled
(in km)/ Fuel filled (in Litre). Create a sheet with three
columns Distance Travelled (in Km), Fuel filled (in L) and
Mileage (in km/L).

Electronic Spreadsheet (Advanced) using LibreOffice Calc 115

2023-24

Unit 2.indd 115 7/22/2022 3:01:30 PM


6
Chapter
Linking Spreadsheet Data

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.

Setting up Multiple Sheets


Let us consider a worksheet
storing marks of the first term in
a sheet named Term1 as shown in
Fig. 6.1.
To add a new sheet in the
spreadsheet, click on the Add Sheet
by clicking on the (+) sign located
Fig. 6.1: Marks scored by students in Term1 in the left bottom of the spreadsheet.

2023-24

Unit 2.indd 116 7/22/2022 3:01:30 PM


Alternatively, you can right click anywhere on the sheet
tab and select Insert sheet option from the drop-down
list displayed as shown in Fig. 6.2. It gives us a choice
to put the new sheet, assign the name of the sheets,
delete a sheet and so on.
Note: Insert Sheet dialog box can be invoked from the
menu option Sheet > Insert Sheet

Practical Activity 6.1


Add a new sheet to store data for Term2 in the spreadsheet by Fig. 6.2: Inserting a new sheet
using the Insert Sheet Dialog box. using context menu displayed
Step 1. Open the Insert Sheet Dialog and add a sheet after after right click option
the current sheet by selecting After Current Sheet
option. The current sheet is our active sheet which in
this case is Term1 as shown in Fig. 6.1.
Step 2. Name the Sheet as Term2 as shown in Fig. 6.3.

Fig. 6.3: Insert sheet dialog


Step 3. Enter the marks obtained by the students in second
term in Term2 sheet as shown in Fig. 6.4.
Step 4. Insert a new sheet and name it as “Result”.

Fig. 6.4: Marks scored by students in Term2


Note: You can use the macro created by you in the previous
chapter to create the format of the result sheet and populate the
name of the student column to save time.

Electronic Spreadsheet (Advanced) using LibreOffice Calc 117

2023-24

Unit 2.indd 117 7/22/2022 3:01:31 PM


Notes Creating Reference to Other Sheets by Using
Keyboard and Mouse
We have been using cell references for applying functions
and formulas in class IX. In this section we will learn
how to reference cells in other sheets using mouse and
keyboard.
To calculate the final result, it is required to store the
final marks for each subject in the sheet named “Result”
inserted in Activity 6.1 by applying the formula (Marks
obtained in Term1 + Marks obtained in Term2)/2. As
we know that marks obtained in Term1 and Term2
are stored in different sheets named Term1 and Term2
respectively.
To calculate the final marks for English in in the
cell C4 of Result sheet, as shown in Fig. 6.5, follow the
following steps.
Step 1. First copy the Roll No and Name of the
Student from Term1 sheet to Result sheet,
copy all headings of and give the name as
Final Result.
Step 2. Click on the = icon next to the input line (or
type = in cell C4), type Sum() and click between
the brackets.
Step 3. Now click on the Term1 sheet and click the
English Marks for the first student and add (,)
comma for the next value
Step 4. Next click on the Term 2 sheet and click the
English Marks for the first student.
Step 5. To calculate average type /2 after the sum(+) as
shown in Fig. 6.5 to calculate average.
Step 6. Press Enter key, the average is displayed in cell
C4 of Result sheet. Then use fill handle to fill
the cells up to the last student’s data.
Step 7. The result sheet gives the average marks
scored by each student in English as shown in
Fig. 6.5.
Step 8. You can copy the same formula for other
subjects.

118 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 118 7/22/2022 3:01:31 PM


Notes

Fig. 6.5: Result sheet after referencing the data from


Term1 and Term2 sheets

Any changes made to marks in Term1 and Term2


sheet will be reflected in the result sheet as well. That
is how the sheets are linked together.
We had selected cell reference by clicking on the
cells. An alternative could be to type the reference. First,
we need to understand how referencing is performed
across sheets in the same spreadsheet document.
Hence, to refer to a cell in another sheet precede the
cell reference with a ‘$’ sign. It is then followed by the
name of the sheet in ‘ ‘ ’ (single quotes) followed by a .
(dot) and then the cell address. For example, to refer a
cell C4 of sheet named Term1 we will type:
$‛Term 1’.C4
Note: Single quotes (‘ ’) are used as there is a space
between Term and 1 in the sheet name.
Let’s Practice– Calculate Final marks for all the subjects by
referencing with Keyboard for one of the columns and mouse for
other columns.

Creating Reference to Other Documents


by Using Keyboard and Mouse
In the previous section we had0 created references to
other sheets in a spreadsheet. Sometimes we may intend
to reference sheets stored in another spreadsheet file.
Let us consider a situation where it is required to
create a Summary report consisting of the average of
result sheets for each section of a class. To do so, we
need to insert sheets that are stored in different files.
Fig. 6.6 shows the final result of class X-A and Fig. 6.7
shows Final Result of class X-B.

Electronic Spreadsheet (Advanced) using LibreOffice Calc 119

2023-24

Unit 2.indd 119 7/22/2022 3:01:31 PM


Fig. 6.6: Result of class X-A stored in Fig. 6.7: Result of class X-B stored in
Result-X-A spreadsheet Result-X-B spreadsheet

Practical Activity 6.2


Create Summary of result in a spreadsheet document named
Result Analysis of class X-A and X-B as shown in Fig. 6.8.

Fig. 6.8: Result Analysis spreadsheet

Since the marks of both the classes are stored in separate


spreadsheet file and Result Analysis itself is a separate
spreadsheet, therefore we need to create reference to other
spreadsheets.
Step 1. Open the spreadsheets namely Result-X-A, Result-X-B
and Result Analysis.
Step 2. Click on cell B4 of Result Analysis spreadsheet and
type =MAX(), as shown in Fig. 6.9.
Step 3. Click between the brackets of MAX() and then click on
the cell range containing marks of English in Result
sheet of Result-X-A spreadsheet.
Step 4. Type (,) comma and click on the cell containing
marks of English in the Result sheet of Result-X-B
spreadsheet.
Step 5. Press Enter, Maximum of the marks will be displayed
in cell B4 as shown in Fig. 6.9.

120 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 120 7/22/2022 3:01:31 PM


Notes

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.

Practical Activity 6.3


Step 1. To insert the sheet “Result” from Result-X-A spreadsheet
in the Result Analysis spreadsheet, open the Result
Analysis spreadsheet.
Step 2. Select Sheet > Insert Sheet > From File as shown in
Fig. 6.10.
Step 3. Click on Browse button, which will open a file selection
dialog box.
Step 4. Select the file from
which you want to
import the sheets.
After selecting the file,
the sheets contained
in it are displayed in
the list box, as shown
in Fig. 6.10. The file
path is displayed
below this box.
Select the sheet to
be inserted from the Fig. 6.10: Inserting Result sheet of
list box. Result-X-A spreadsheet into Result
Analysis spreadsheet

Electronic Spreadsheet (Advanced) using LibreOffice Calc 121

2023-24

Unit 2.indd 121 7/22/2022 3:01:31 PM


Notes Step 5. Click on the required “Result” sheet from the file “Result-
X-A.ods” as shown in Fig. 6.10.
Step 6. Check the Link checkbox to ensure that the changes
made in the selected sheet “Result” are reflected.
Step 7. Press OK. You will find the Result sheet added to the
sheet tab as shown in Fig. 6.11.

Fig. 6.11: Result sheet added to the sheet Tab of ResultAnalysis


You could have also copied and pasted data but linking a sheet
allows us to always have access to “live” data from another
spreadsheet. A “live” data means that the data is always the
same as in the original file.
The links can be updated by selecting Tools > Options >
LibreOffice Calc > General > Updating, as shown in Fig. 6.12,
whenever the file is opened to ensure that you have access to the
updated data always.

Fig. 6.12: Selecting online update option

122 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 122 7/22/2022 3:01:31 PM


Hyperlinks to the Sheet
Sometimes it is required to jump to a document stored
at a different location from within a document. It can be
done by creating a hyperlink. It is possible to jump from
a sheet in the same spreadsheet, different spreadsheet
or a website by creating a hyperlink.

Relative and Absolute Hyperlinks


A hyperlink can be either absolute or relative. An
absolute hyperlink stores the complete location where
the file is stored. So, if the file is removed from the
location, absolute hyperlink will not work. For example:
C:\Users\ADMIN\Downloads\try.ods is an absolute
link as it defines the complete path of the file.
A relative hyperlink stores the location with respect to
the current location. For example: Admin\Downloads\
try.ods is a relative hyperlink as it is dependent on the
current location and thus the folder admin is searched
where the active spreadsheet is being stored. If the
complete folder containing the active spreadsheet is
moved the relative link will still be accessible as it is
bound to the source folder where the active spreadsheet
is stored.

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

Electronic Spreadsheet (Advanced) using LibreOffice Calc 123

2023-24

Unit 2.indd 123 7/22/2022 3:01:32 PM


Step 3. To insert the spreadsheet document, click on
the Document on the left pan of dialog box,
then to select the spreadsheet document, click
on the button located after the Path. Select the
required document. In our case we select the
spreadsheet document “Result-X-A”.
Step 4. Then click on the Target button to choose the
sheet which is to be hyperlinked. Target in
Document helps to specifically choose a target
in the document such as sheet, tables, frames,
images, headings and so on. Here in our case
we will select the sheet Result as shown in
Fig. 6.13.
Step 5. Click on Apply and Close button to exit the
Target Document window.
Step 6. Enter the text in the Text box to assign the
hyperlink to that text. In our case we have
entered the text as “Result-X-A” as shown in
Fig. 6.14. So the hyperlink will be assigned to
the text “Result-X-A”.

Fig. 6.14: Specifying Target and Text for inserting a Hyperlink

Step 7. Click on Apply and Close button to confirm the


changes and exit the Hyperlink dialog box.
Step 8. Observe that the hyperlink is assigned to the
word “Result-X-A” as shown in Fig. 6.15.

124 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 124 7/22/2022 3:01:32 PM


Fig. 6.15: Hyperlink inserted in the spreadsheet

Step 9. To open the hyperlinked sheet, press the Ctrl


key and click on the hyperlinked word “Result-
X-A”, the sheet will be opened in the new
window as shown in Fig. 6.16.

Let’s Practice
Create a Hyper link to
Result Analysis
spreadsheet.

Fig. 6.16: Hyperlinked sheet open in new window

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

Electronic Spreadsheet (Advanced) using LibreOffice Calc 125

2023-24

Unit 2.indd 125 7/22/2022 3:01:32 PM


On clicking the Remove Hyperlink option, the link
will be removed from the text and thus it will not point
to any other location.

Linking to External Data


Internet is a rich source of information, which is stored
in the form of web pages. The web pages are written in
HTML documents. Data on a web page can be stored in
the form of tables.
The versatility of a spreadsheet allows us to insert
tables from HTML documents into Calc. To insert the
tables from a HTML document, we can use the External
Data Dialog box. The steps for the same are given below.
Step 1. Open the spreadsheet where external data is to
be inserted.
Step 2. Select the cell to store the first cell of the table
in the external data.
Step 3. Select Sheet > Link to External Data.
Step 4. The External Data dialog box is displayed as
shown in Fig. 6.18. Type the URL of the source
document or select it from the drop-down list if
it is listed and press enter.
Step 5. A dialog box is displayed to select the language
for import as shown in Fig. 6.18. Selecting
Automatic shows data in the same language as
in the webpage.
Fig. 6.18: Slecting language to Let us Practice
import for the webpage
Create a Hyper link to Result Analysis spreadsheet.
From the Available Tables/Ranges list, choose the
desired table. If you choose HTML_all option, then the
entire HTML document is selected. Here in our example
suppose we select HTML_10 table to insert as shown in
Fig. 6.19.

Fig. 6.19: Inserting a table from a webpage


126 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 126 7/22/2022 3:01:32 PM


The table is inserted in the spreadsheet as shown in
Fig. 6.20.

Fig. 6.20: HTML_10 table inserted from the webpage https://en.wikipedia.org/


wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System#Planets

Linking to Registered Data Sources


LibreOffice Calc allows us to link spreadsheet documents
with databases and other data sources. The data source
needs to be registered with LibreOffice. Registration is
a means to inform LibreOffice about the type of data
source and the location of the file. We will restrict
our discussion to LibreOffice Base. The extension of
LibreOffice Base is .odb. You will learn about LibreOffice
Base in detail in Unit 3. You can access a variety of
databases and other data sources and link them to Calc
documents. To register a data source
that is in *.odb format, follow the steps
given below.
Step 1. Select Tools > Options >
LibreOffice Base > Databases.
The Options - LibreOffice
Base-Databases dialog box
appears.
Step 2. Click the New button to
open the Create Database
Link dialog box as shown in
Fig. 6.21. Fig. 6.21: Registering databases

Electronic Spreadsheet (Advanced) using LibreOffice Calc 127

2023-24

Unit 2.indd 127 7/22/2022 3:01:32 PM


Notes Step 3. Enter the location of the database file, or click
Browse to open a file browser and select the
database file.
Step 4. Type a name to use as the registered name for
the database and click OK. The database is
added to the list of registered databases.
Note – The OK button is enabled only when both fields
are filled in.

Check Your Progress


A. Multiple choice questions

1. Insert Sheet dialog can be invoked from _______________.


(a) sheet
(b) insert
(c) tools
(d) Windows
2. ______________ refers to cell G5 of sheet named My Sheet.
(a) $My Sheet.’G5’
(b) $My Sheet_’G5’
(c) $ ‘MySheet’.G5
(d) $ ‘MySheet’_G5
3. The path of a file has ____________ forward slashes.
(a) four
(b) three
(c) two
(d) one
4. Which of the following feature is used to jump to a different
spreadsheet from the current spreadsheet in LibreOffice
Calc?
(a) Macro
(b) Hyperlink
(c) connect
(d) Copy

B. Fill in the blanks

1. A relative hyperlink stores the location with respect to the


___________ location.
2. While inserting tables from a webpage _____________
selects the entire HTML document.
3. The extension of LibreOffice base is ______________.
4. __________ are used to enclose sheet names as there might
be a space within sheet names.
5. The From file option of ___________ Dialog box allows to
insert sheet from another file.

128 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 128 7/22/2022 3:01:32 PM


C. State whether the following statements are True or False Notes
1. A sheet can only be added before the current sheet.
2. If ‘sales’ sheet has a reference to ‘cost’ sheet then any
changes made to ‘cost’ sheet will be reflected in the sales
sheet as well.
3. It is not possible to link a sheet as a reference in another
sheet.
4. We can insert data from a table created on a web page into
a spreadsheet.
5. A hyperlink once created on a sheet cannot be deleted.

D. Answer the following questions

1. Name the two ways to link the sheets in a LibreOffice Calc.


2. Differentiate between Relative and Absolute Hyperlink.
3. Write steps to extract a table from a web page in a
spreadsheet.
4. Write steps to register a data source that is in *.odb format.
5. State advantages of extracting data from a web page into
spreadsheet.

Lab Exercises

1. Create three sheets named Jan, Feb and March. In each


sheet store the attendance of employees for a month. Apply
count function to count the number of days the employees
were present by counting P.
2. Add another sheet named ‘Consolidated Attendance’ that
stores total attendance of three months and calculates the
percentage.
3. Create a spreadsheet containing the list of Prime ministers
of India with their tenure from the website https://
knowindia.gov.in/general-information/prime-ministers-
of-india.php. Perform steps to extract the table from the
website into a Calc Sheet and display the count of Prime
Ministers of India till date.

Electronic Spreadsheet (Advanced) using LibreOffice Calc 129

2023-24

Unit 2.indd 129 7/22/2022 3:01:33 PM


Share and Review a

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

Unit 2.indd 130 7/22/2022 3:01:33 PM


Step 4. Click on Yes to continue. Notes
Step 5. Once the spreadsheet is saved, the name of the
spreadsheet in the title bar will display (shared)
along with the name of the spreadsheet.

Practical Activity 7.1


Create a spreadsheet and save it with the name Test_1.ods
Step 1. Create the spreadsheet with the data and save it with
Test.ods, as shown in Fig. 7.3.

Fig. 7.3: Contents of spreadsheet Test.ods


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. Put the check-
mark on the check box, “Share this spreadsheet with
other users”, as shown in the Fig. 7.1.
Step 3. Click on the checkbox and then on OK button. It will
display the Confirmation dialog window to activate
the sharing mode as shown in Fig. 7.2. Click Yes to
continue.
Step 4. Observe that shared is added with the name of the
document in the title bar as shown in Fig. 7.4.

Fig. 7.4: Title bar showing the spreadsheet changed to shared

Electronic Spreadsheet (Advanced) using LibreOffice Calc 131

2023-24

Unit 2.indd 131 7/22/2022 3:01:33 PM


Opening and Saving a Shared Spreadsheet
Opening a Spreadsheet
To open a shared spreadsheet, follow the
following steps.
Step 1. While opening a spreadsheet which is
a shared spreadsheet, a message will appear
as shown in Fig. 7.5 that the spreadsheet is
Fig. 7.5: Message box while opening in shared mode and some of the features are
shared spreadsheet
not available to use in this spreadsheet.
Step 2. Click on OK button to open the spreadsheet in
shared mode.
Step 3. If you don’t want this warning option to be
displayed again, then check the mark in the
checkbox ‘Do not show warning again’.
Step 4. Once the spreadsheet is saved in shared mode,
some of the features will become unavailable
for used.
Step 5. Observe the Edit menu on the main menu
bar as shown in Fig. 7.6, that shows Undo,
Redo, Repeat, Paste, Links to External files,
ImageMap, Object are not available for use.
Fig. 7.6: Edit menu of shared
spreadsheet Saving a Shared Spreadsheet
Follow the steps given below to save a shared
spreadsheet:
Step 1. After making the changes in the shared
spreadsheet, you need to save it before closing
the spreadsheet.
Step 2. If two or more users are working at the same
time and the changes do not conflict, then the
message will appear stating that the spreadsheet
has been updated with changes saved by other
users.
Step 3. If there is any conflict for the changes, then
resolve conflict dialog window will appear.
Step 4. No other user can save the shared spreadsheet
when you are resolving the conflicts.
Step 5. If another user is trying to save the shared
document and resolve conflicts, then you will be
notified with a message that the file is locked.
Now, you cannot save it.

132 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 132 7/22/2022 3:01:33 PM


Recording Changes
This feature of LibreOffice Calc provides different ways
to record the changes made by one or other users in
the spreadsheet. While recording the changes, the
spreadsheet will turn off its shared feature. Follow the
following steps for recording changes:
Step 1. To enable the Record changes, first disable the
shared mode of spreadsheet.
Step 2. To disable the shared mode, open the
spreadsheet “Test.ods”.
Step 3. Select and click on Tools > Share Spreadsheet
from main menu bar. This will open the
Share Document dialog window. Remove the
check-mark on the check
box, “Share this spreadsheet
with other users”, and click
on OK button. It will display
the Confirmation dialog
window to disable the sharing
mode. It will give warning to Fig. 7.7: Confirmation dialog window to disable sharing
mode of spreadsheet
disable the shared mode of a
spreadsheet as shown in Fig.
7.7. Click Yes to continue.
Step 4. Observe that (shared) word from
the name of the spreadsheet has
disappeared from the title bar of the
spreadsheet.
Step 5. The feature of Track Changes >
Record under Edit menu is turned
ON as shown in Fig. 7.8, which was
disabled and not working in the shared Fig. 7.8: Recording Track
spreadsheet. changes under Edit
menu enabled
Step 6. Now to record track changes, click on
Edit > Track Changes > Record as
shown in Fig. 7.8.
Step 7. Now change name Sia to Sita in cell
B5 as shown in Fig. 7.9. Observe that
the border colour of the cell in which
data has been changed turns to red.
Also, the changed cell will display the
description if the cursor moves to the
Fig. 7.9: Displaying the information of
changed cell. changes recorded under track changes

Electronic Spreadsheet (Advanced) using LibreOffice Calc 133

2023-24

Unit 2.indd 133 7/22/2022 3:01:33 PM


Step 8. Thus, by looking at the spreadsheet, other
users can easily know the changes made in the
cell and the changes made by whom.

Practical Activity 7.2


Assume that you are captain of your school cricket team. Prepare
the budget in the spreadsheet for the current academic year.
Turn ON the feature Track Changes > Record and ask other
team members to make necessary changes in the spreadsheet.

Add, Edit and Format the Comments


In Calc, the comments are automatically added.
Also, the author or reviewer can add their own
comments as well. Follow the following steps to
add your comments:
Step 1. Select from main menu bar and click
on Edit > Track Changes > Comment
as shown in Fig. 7.10, to add your own
comments.
Step 2. This will open the Add comment window.
Enter your comments. Fig. 7.11 shows
the comments entered.
Fig. 7.10: Selecting Comment under Step 3. Now to view the entered comment, click
Track Changes on the cell B6 as shown in Fig. 7.12. It
shows the complete description of the
comments entered.

Fig. 7.11: Entering text in Comment Fig. 7.12: Comment displayed with full description
dialog window

134 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 134 7/22/2022 3:01:33 PM


Step 4. You can also insert comments to a
cell. Click on the cell where you
want to insert comments. Then
select from main menu Insert >
Comment as shown in Fig. 7.13.
Step 5. This type of comments is known
as notes or suggestions in the
spreadsheet. The box will appear
to write the comment as shown
in Fig. 7.14. The comment box
shows the comments entered as
Fig. 7.13: Insert Comment
“Contains only alphabets”. Once
this text is typed in the text box,
you can observe a coloured dot in
the upper-hand corner of the cell
where the comment is added using
insert comment.
Step 6. Once the comment is added, you
can display, edit or delete it. To
perform these operations, right
click on the cell where you have
inserted the comments as shown
in Fig. 7.15. Observe the options
under popup menu.
Step 7. Select the “Edit Comment” option
Fig. 7.14: Comments inserted in comment box
to edit the comments. It will take
you again to the comment textbox
to make any changes.
Step 8. Select “Delete Comment” option to
delete the comment.
Step 9. Select the “Show Comment” to
view the comment. By selecting
this option, the comments will be
displayed. Again when you right
click on the cell, you will observe
that “Hide Comment” option will
be activated in place of “Show
Comment”. This is because when Fig. 7.15: Right click menu options after
inserting comments
you are displaying the comments it
is already in show mode, which has
to be hide.

Electronic Spreadsheet (Advanced) using LibreOffice Calc 135

2023-24

Unit 2.indd 135 7/22/2022 3:01:33 PM


Formatting Comment
You can format the comment box,
just like formatting the cell contents.
It means changing the background
colour, border style, and transparency
of a comment. Follow the following
steps to format the comment.
Step 1. Right click on the cell where
the comment is added.
Step 2. Select the option “Format
cell”, which will display the Format
Cells dialogue box as shown in
Fig. 7.16.
Fig. 7.16: Format Cells dialogue box Step 3. You can apply the various
formatting features from its tab such
as Font, font Effects, Alignment, Borders,
Background and Cell Protection. Change
the font, text colour, fill colour, line colour
for the comment box as desired and click on
OK button to apply the changes. Observe the
desired formatting features applied to the
comment box.

Let’s Practice — Save the spreadsheet with some other name.


Turn off the shared feature. Now, make some changes in the
spreadsheet. Also, add comments into the changed cells. Try
editing comments and format it with different colours.

Reviewing Changes – View,


Accept or Reject Changes
Once the spreadsheet is edited by all the
members of the team. It is the final stage
before submitting the spreadsheet. In this
stage, we will go through the changes
to accept or reject to prepare the final
spreadsheet after looking at all the changes
made by the team members. Follow the
following steps to review changes.
Step 1. Select and click on Edit >
Fig. 7.17: Show Changes Dialog window
Track Changes > Show. It will open the
Show Changes dialog window as shown in
Fig. 7.17.

136 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 136 7/22/2022 3:01:34 PM


Step 2. This is used to plan what all
changes are to be displayed
while reviewing the spreadsheet.
Step 3. Click on Edit > Track Changes
> Manage to accept or reject
the changes. It will display the
Manage Changes dialog window
as shown in Fig. 7.18.
Step 3. In this dialog window, click on
the line and click on Accept or
Accept All or Reject All button Fig. 7.18: Manage Changes dialog window to
to review the changes. accept or reject changes

Step 4. Click on Close button once the review is done.

Let’s Practice — As the changes done by other team members


in the Practical Exercise 7.4 has been recorded by the feature in
Calc, now you just review those changes and accept or reject the
necessary changes done by other team members.

Merging and Comparing


If the same spreadsheet is reviewed by different team
members and you have two different versions of the
same spreadsheet file. Follow the following steps to
merge document.

Practical Activity 7.3


Merge two files
To work on our earlier created spreadsheet Test.ods, save the
file Test.ods with another name say Test1.ods and make some
changes in the spreadsheet Test1.ods. Now, we have two files
that are to be merged.
Step 1. Open the spreadsheet file Test.ods. Note the contents of
spreadsheet Test.ods in Fig. 7.19. Also note the contents
of spreadsheet Test1.ods before merging in Fig. 7.20.

Fig. 7.19: Contents of Test. Fig. 7.20: Contents of


ods before merging Test1.ods before merging

Electronic Spreadsheet (Advanced) using LibreOffice Calc 137

2023-24

Unit 2.indd 137 7/22/2022 3:01:34 PM


Notes Step 2. Click on Edit > Track Changes > Merge Document
as shown in Fig. 7.21.

Fig. 7.21: Selecting Merge Document option

Step 3. Select the spreadsheet file Test1.ods from the Merge


0With dialog window to open the spreadsheet Test1.
ods to merge with Test.ods and Click on Open button
as shown in Fig. 7.22.

Fig. 7.22: Open the Test1.ods from Merge With dialog window

Step 4. This will open Manage Changes dialog window as


shown in Fig. 7.23.

Fig. 7.23: Manage Changes dialog window

Step 5. Click on Accept All as shown in Fig. 7.23. to accept all


the changes which is done in the Test1.ods spreadsheet
to the Test.ods.

138 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 138 7/22/2022 3:01:34 PM


Step 6. Now open the first
spreadsheet Test.ods
after merging and observe
its contents as shown
in Fig. 7.24. Observe
that Fig. 7.24 shows the
contents of Test.ods and
Test1.ods merged.

Fig. 7.24: Contents of Test.


ods after merging

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

Electronic Spreadsheet (Advanced) using LibreOffice Calc 139

2023-24

Unit 2.indd 139 7/22/2022 3:01:34 PM


Notes Check Your Progress
A. Multiple choice questions

1. Sharing allows to edit the spredshheet by


(a) single user
(b) different users simultaneously
(c) one by one users
(d) one after other users
2. Sharing spredsheet feature allows to save the changes in
(a) multiple sheets
(b) user’s sheet
(c) in a same sheet
(d) in different sheet
3. The Recording Changes feature of LibreOffice Calc provides
different ways to record the changes made by ____________
in the spreadsheet.
(a) one user
(b) other user
(c) the user
(d) one or other users
4. In Calc, the comments are added
(a) automatically
(b) by author
(c) by reviewer
(d) all of above
5. The changes by team members in the spreadsheet can be
accepted or rejected by
(a) the team members
(b) any of the user
(c) owner
(d) other users

B. State whether the following statements are True or False

1. Spreadsheet cannot be shared to work with more than one


user?
2. Some of the features becomes unavailable when the
spreadsheet is in shared mode.
3. You can record changes in the spreadsheet when the
spreadsheet is opened in shared mode.
4. File menu is used to Record changes for the spreadsheet.
5. You can add a note or suggestion in the spreadsheet using
Insert Comment.
6. Formatting comment can be used to change the font
colour of the comment.

140 Domestic Data Entry Operator – Class X

2023-24

Unit 2.indd 140 7/22/2022 3:01:34 PM


C. Fill in the blanks Notes
1. The title bar of the document shows __________________
along with the filename for the shared mode of the
spreadsheet.
2. The shared mode spreadsheet allows __________ users to
access and edit the spreadsheet at the same time.
3. Recording changes automatically ____________ the shared
mode of a spreadsheet.
4. Click on Edit menu, Track Changes and then select
____________ to record the changes in the spreadsheet.
5. The border color of the changed cell will be ______________.
6. ____________ is used to add notes or suggestions to a cell
in a spreadsheet.
7. The comment box can be formatted just like formatting
the __________ (cell contents).

D. Answer the following questions


1. Define the terms
(a) Sharing Spreadsheet
(b) Record changes
2. Write the commands to perform
(a) Sharing Spreadsheet
(b) Record changes
3. Which menu is used to perform the functions
(a) Track Changes
(b) Saving Spreadsheet
4. What do you understand by reviewing the changes in the
spreadsheet?
5. Differentiate between Merging and Comparing Spreadsheet.

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.

Electronic Spreadsheet (Advanced) using LibreOffice Calc 141

2023-24

Unit 2.indd 141 7/22/2022 3:01:34 PM

You might also like