Notes-Calc-Class-X[1]
Notes-Calc-Class-X[1]
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.
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.
Step 4. Observe that the default function “Sum” is seen in the Function dropdown.
You will be able to see the list of functions 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
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 “Row labels”
and “Column labels” and “Link to source data” under Options. 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.
Subtotal
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.
Follow the following steps to apply Subtotal tool.
Step 1. The sheet where this is to be applied must have labels to the column
Step 2. Click on Data menu and choose Subtotals (Data>Subtotals).
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.
Step 4. Select the column by clicking the checkbox under Calculate subtotals for to
create subtotals for.
Step 5. Select the desired function by 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.
Observe that outline to the left of the row numbers 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.
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.
Follow the following steps to create scenarios:
Step 1. Select the cells which contains values in the 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.
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.
Follow above steps to create multiple scenarios with different name in same sheet.
Multiple Operations
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.
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.
Step 4. Click on Data>Multiple Operations will display the multiple operations dialog
window.
Step 5. Enter the cell address in the Formulas box from the sheet which contains the
formula.
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.
For 2 values changing in step 6 enter the cell address of the cell which is a variable and is
used in the formula in Row input cell box.
Goal Seek
Goal seek helps in finding out the input for the specific output by changing one variable in
formula.
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, the Formula cell box will have the correct
formula.
Step 5. Place the cursor on the Variable cell box and click on the cell that contains the value
to be changed.
Step 6. Enter the desired result in the Target value box.
Step 7. Click on OK button.
Macros
Macro is use 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. 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 macro recording”.
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, 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.
Macro as a Function
We can create user-defined function in macros. A function is capable of accepting
arguments or values. It can perform operations on the arguments, perform calculations and
return the result.
To use data from multiple sheets into 1 sheet for some analysis we can copy or retype data
but Linking spread sheet provides better and error free way to use data from 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.
Step 1. Select cell where you required data from other sheet.
Step 2. Click on the = icon next to the input line (or type = in cell), type complete address of
cell containing data. Press enter after including all cell address as an expression .
Any changes made to original data it 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 acell C4 of sheet named Data1 we will type:
$‛Data 1’.C4
Note: Single quotes (‘ ’) are used as there is a space between Data and 1 in the sheet
name.
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. Click on Edit Hyperlink..., the Hyperlink dialog box will be
displayed, where you can make changes to the hyperlink.
On clicking the Remove Hyperlink option, the link will be removed from the text and thus
it will not point to any other location.
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.
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 checkbox, “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 disable the shared mode
of a spreadsheet. 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, which was
disabled and not working in the shared spreadsheet.
Step 6. Now to record track changes, click on Edit > Track Changes > Record.
Step 7. Now change in spreadsheet. 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 changed cell.
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.
Formatting Comment
You can format the comment box, just like formatting the cell contents.
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.
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.
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.
Step 1. Open the spreadsheet file Test.ods. Click on Edit > Track Changes > Compare
Document.
Step 2. This will open the Compare to dialog window, which will allow to open the
spreadsheet to be compared. Select the first spreadsheet file and click on Open button.
Step 3. This will open the Manage Changes dialog window to accept/reject the
changes. Click on Accept.
Step 4. Finally click on Close button to close the Manage Changes dialog window.