Calc
Calc
License Information
Displays the Licensing and Legal information dialog.
LibreOffice Credits
Displays the CREDITS.odt document which lists the names of
individuals who have contributed to OpenOffice.org source code
(and whose contributions were imported into LibreOffice) or
LibreOffice since 2010-09-28.
About LibreOffice
Displays general program information such as version number and copyrights.
Lesson-3: Calc
26
Calc
LibreOffice Calc is a spreadsheet application that you can use to calculate, analyze, and manage your data. You
can also import and modify Microsoft Excel spreadsheets.
Calculations
LibreOffice Calc provides you with functions, including statistical and banking functions, that you can use to
create formulas to perform complex calculations on your data. You can also use the Function Wizard to help
you create your formulas.
What-If Calculations
An interesting feature is to be able to immediately view the results of changes made to one factor of
calculations that are composed of several factors. For instance, you can see how changing the time period in
a loan calculation affects the interest rates or repayment amounts. Furthermore, you can manage larger tables
by using different predefined scenarios.
Database Functions
Use spreadsheets to arrange, store, and filter your data. LibreOffice Calc lets you drag-and-drop tables from
databases, or lets you use a spreadsheet as a data source for creating form letters in LibreOffice Writer.
Arranging Data
With a few mouse-clicks, you can reorganize your spreadsheet to show or hide certain data ranges, or to
format ranges according to special conditions, or to quickly calculate subtotals and totals.
Dynamic Charts
LibreOffice Calc lets you present spreadsheet data in dynamic charts that update automatically when the data
changes.
Interface- Calc
LibreOffice Calc interface is look like a Microsoft Excel. All menu, toolbars and commands managed according
to Microsoft Excel. Command icons are also displays and arranged at toolbars. If you are familiar with
Microsoft Excel, you can easily operate and work in LibreOffice Calc.
27
Control Menu
Title Bar Menu Bar Standard Toolbar Formula Toolbar Formatting Toolbar
Name Box
Column Heading
Properties Toolbar
Row Heading
Status Bar
Horizontal Scroll Bar
Electronic worksheet is made up of combination of row and column. LibreOffice Calc has below limits for
number of rows, columns and cells that it can handle.
28
Menus
The window containing the document you want to work on must be selected in order to use the menu
commands. Similarly, you must select an object in the document to use the menu commands
associated with the object. The following menu commands are available for spreadsheets.
File
These commands apply to the current document, open a new document, or close the application.
Edit
This menu contains commands for editing the contents of the current document.
View
This menu contains commands for controlling the on-screen display of the document.
Insert
The Insert menu contains commands for inserting new elements, such as cells, rows, sheets and cell names
into the current sheet.
Format
The Format menu contains commands for formatting selected cells, objects, and cell contents in your
document.
Sheet
This menu contains commands to modify and manage a sheet and its elements.
Data
Use the Data menu commands to edit the data in the current sheet. You can define ranges, sort and filter the
data, calculate results, outline data, and create a pivot table.
Tools
The Tools menu contains commands to check spelling, to trace sheet references, to find mistakes and to define
scenarios.
Window
Contains commands for manipulating and displaying document windows.
Help
The Help menu allows you to start and control the LibreOffice Help system.
29
FILE MENU
These commands apply to the current document, open a new document, or close the application.
New
Creates a new LibreOffice document. You can use Shortcut key (Ctrl+N) to
create a new spreadsheet. If you are creating a new template, then use
Shortcut key (Ctrl+Shift+N).
Open
Opens a local or remote file, or imports one. You can use Shortcut key
(Ctrl+O) for this command.
Recent Documents
Lists the most recently opened files. To open a file in the list, click its
name.
Close
Closes the current document without exiting the program.
Wizards
Guides you through creating business and personal letters, faxes,
agendas, presentations, and more.
Templates
Lets you organize and edit your templates, as well as save the current file as
a template.
Reload
Replaces the current document with the last saved version.
Versions
Saves and organizes multiple versions of the current document in the same file. You can also open, delete and
compare previous versions.
Save
Saves the current document. You can use Shortcut key (Ctrl+S) for this command.
Save As
Saves the current document in a different location, or with a different file name or file type. You can use
Shortcut key (Ctrl+Shift+S) for this command.
Save All
30
Saves all modified LibreOffice documents.
Export
Saves the current document with a different name and format to a location that you specify.
Export as PDF
Saves the current file to Portable Document Format (PDF) version 1.4. A PDF file can be viewed and printed on
any platform with the original formatting intact, provided that supporting software is installed.
Send
Sends a copy of the current document to different applications.
Print Preview
Displays a preview of the printed page or closes the preview. You can use Shortcut key (Ctrl+Shift+O) for this
command.
Print
Prints the current document, selection, or the pages that you specify. You can also set the print options for
the current document. The printing options can vary according to the printer and the operating system that
you use. You can use Shortcut key (Ctrl+P) for this command.
Printer Settings
Select the default printer for the current document.
Document Properties
Displays the properties for the current file, including statistics such as word count and the date the file was
created.
Digital Signatures
Adds and removes digital signatures to your document. You can also use the dialog to view certificates.
Exit
Closes all LibreOffice programs and prompts you to save your changes. This command does not exist on macOS
systems. You can use Shortcut key (Ctrl+Q) for this command.
EDIT MENU
This menu contains commands for editing the contents of the current document.
Undo
31
Reverses the last command or the last entry you typed. To select the
command that you want to reverse, click the arrow next to the Undo
icon on the Standard bar. You can use Shortcut key (Ctrl+Z) for this
command.
Redo
Reverses the action of the last Undo command. To select the Undo step
that you want to reverse, click the arrow next to the Redo icon on the
Standard bar. ou can use Shortcut key (Ctrl+Y) for this command.
Repeat
Repeats the last command. This command is available in Writer and Calc.
ou can use Shortcut key (Ctrl+Shift+Y) for this command.
Cut
Removes and copies the selection to the clipboard. You can use
Shortcut key (Ctrl+X) for this command.
Copy
Copies the selection to the clipboard. You can use Shortcut key
(Ctrl+C) for this command.
Paste
Inserts the contents of the clipboard at the location of the cursor, and
replaces any selected text or objects. You can use Shortcut key (Ctrl+V) for this command.
Paste Special
Inserts the contents of the clipboard into the current file in a format that you can specify.
Select All
Selects the entire content of the current file, frame, or text object. You can use Shortcut key (Ctrl+Shift+Space)
for this command.
Find
Toggle the visibility of the Find toolbar to search for text or navigate a document by element. You can use
Shortcut key (Ctrl+F) for this command.
Track Changes
Lists the commands that are available for tracking changes in your file.
Links
32
Lets you edit the properties of each link in the current document, including the path to the source file. This
command is not available if the current document does not contain links to other files.
ImageMap
Allows you to attach URLs to specific areas, called hotspots, on a graphic or a group of graphics. An image map
is a group of one or more hotspots.
Object
Lets you edit a selected object in your file that you inserted with the Insert - Object command.
Edit File
Use the Edit File icon to activate or deactivate the edit mode. You can use Shortcut key (Ctrl+Shift+M) for this
command.
VIEW MENU
This menu contains commands for controlling the on-screen display of the document.
Normal
Displays the normal layout view of the sheet.
Page Break
This command is used to insert a page break in your worksheet.
Formula Bar
Shows or hides the Formula Bar, which is used for entering and
editing formulas. The Formula Bar is the most important tool when
working with spreadsheets.
View Headers
This command is used to Shows column headers and row
headers.
Status Bar
Shows or hides the Status bar at the bottom edge of the window.
Value Highlighting
Displays cell contents in different colors, depending on type. You can
use Shortcut key (Ctrl+F8) for this command.
Show Formula
33
Display the cell formula expression instead of the calculated result. You can use Ctrl key to show formula of
selected cell.
Split Window
Divides the current window at the top left corner of the active cell.
Sidebar
The Sidebar is a vertical graphical user interface that primarily provides contextual properties, style
management, document navigation, and media gallery features. You can use Shortcut key (Ctrl+F5) for this
command.
Styles
Use the Styles deck of the Sidebar to assign styles to cells and pages. You can apply, update, and modify existing
styles or create new styles. You can use function key (F11) for this command.
Gallery
Opens the Gallery deck of the Sidebar, where you can select images and audio clips to insert into your
document.
Navigator
Activates and deactivates the Navigator. The Navigator is a dockable window. You can use function key (F5)
for this command.
Function List
Opens the Function List deck of the Sidebar, which displays all functions that can be inserted into your
document.
Data Sources
Lists the databases that are registered in LibreOffice and lets you manage the contents of the databases. You
can use Shortcut key (Ctrl+Shift+F4) for this command.
Full Screen
Shows or hides the menus and toolbars in Writer or Calc. To exit the full screen mode, click the Full Screen
button or press the Esc key. You can use Shortcut key (Ctrl+Shift+J) for this command.
Zoom
34
Reduces or enlarges the screen display of LibreOffice.
INSERT MENU
The Insert menu contains commands for inserting new elements, such as cells, rows, sheets and cell names
into the current sheet.
Media
The submenu presents various sources that an image, audio or video can be
insert from. You can Inserts a video or audio file into your document.
Chart
This command is used to Inserts a chart in worksheet.
Object
Inserts an embedded object into your document, including formulas, 3D
models, charts and OLE objects.
Special Character
Allows a user to insert characters from the range of symbols found in the
installed fonts.
Formatting Mark
Opens a submenu to insert special formatting marks like non-breaking space,
soft hyphen, and optional break.
Hyperlink
Opens a dialog that enables you to create and edit hyperlinks. You can use Shortcut key (Ctrl+K) for this
command.
Function
Opens the Function Wizard, which helps you to interactively create formulas. You can use Shortcut key
(Ctrl+F2) for this command.
Comment
Inserts a comment around the selected text or at the current cursor position. You can use Shortcut key
(Ctrl+Alt+C) for this command.
Floating Frame
35
Inserts a floating frame into the current document. Floating frames are used in HTML documents to display
the contents of another file.
Cells
Allows you to specify a variety of formatting options and to apply attributes to the
selected cells.
Row
Sets the row height and hides or shows selected rows.
Column
Sets the column width and hides or shows selected columns.
Sheet
Sets the sheet name and hides or shows selected sheets.
Page
Opens a dialog where you can define the appearance of all pages in your document.
Print Ranges
Manages print ranges. Only cells within the print ranges will be printed.
Character
Changes the font and the font formatting for the selected characters.
Paragraph
Modifies the format of the current paragraph, such as indents and alignment.
Change Case
36
Changes the case of characters in the selection. If the cursor is within a word and no text is selected, then the
word is the selection.
AutoFormat
Use this command to apply an AutoFormat to a selected sheet area or to define your own AutoFormats.
Conditional Formatting
Choose Conditional Formatting to define format styles depending on certain conditions.
Anchor
Sets the anchoring options for the selected object.
Arrange
Changes the stacking order of the selected object(s).
Flip
Flips the selected object horizontally, or vertically.
Group
Groups keep together selected objects, so that they can be moved or formatted as a single object.
SHEET MENU
This menu contains commands to modify and manage a sheet and its elements.
Insert Rows
Insert rows above or below the active cell.
Insert Columns
Inserts columns to the left or to the right of the active cell.
Delete Cells
37
Completely deletes selected cells, columns or rows. The cells below or to the
right of the deleted cells will fill the space. Note that the selected delete
option is stored and reloaded when the dialog is next called. You can use
Shortcut key (Ctrl+-) for this command.
Fill
Automatically fills cells with content.
Deleting Contents
Specifies the contents to be deleted from the active cell or from a
selected cell range. If several sheets are selected, all selected sheets will be
affected.
Move or Copy Sheet
Moves or copies a sheet to a new location in the document or to a
different document.
Show Sheet
Displays sheets that were previously hidden with the Hide Sheets
command.
Delete Sheet
Deletes the current sheet after query confirmation.
Sheet Events
Assigns macros to program events. The assigned macro runs automatically every time the selected event
occurs.
DATA MENU
Use the Data menu commands to edit the data in the current sheet. You can define ranges, sort and filter the
data, calculate results, outline data, and create a pivot table.
Sort
Sorts the selected rows according to the conditions that you specify.
Filter
Shows commands to filter your data.
Define Range
38
Defines a database range based on the selected cells in your sheet.
Select Range
Selects a database range that you defined under Data - Define Range.
Refresh Range
Updates a data range that was inserted from an external database. The data
in the sheet is updated to match the data in the external database.
Pivot Table
A pivot table provides a summary of large amounts of data. You can then
rearrange the pivot table to view different summaries of the data.
Subtotals
Calculates subtotals for the columns that you select.
Validity
Defines what data is valid for a selected cell or cell range.
Multiple Operations
Applies the same formula to different cells, but with different parameter values.
Text to Columns
Opens the Text to Columns dialog, where you enter settings to expand the
contents of selected cells to multiple cells.
Consolidate
Combines data from one or more independent cell ranges and calculates a new range using the function that
you specify.
TOOLS MENU
The Tools menu contains commands to check spelling, to trace sheet references, to find mistakes and to define
scenarios. You can also create and assign macros and configure the look and feel of toolbars, menus, keyboard,
and set the default options for LibreOffice applications.
Spellcheck
Checks spelling manually. You can uses Function key (F7) for this command.
Language
39
Opens a submenu where you can choose language specific
commands.
AutoCorrect Options
Sets the options for automatically replacing text as you type.
Goal Seek
Opens a dialog where you can solve an equation with a
variable.
Solver
Opens the Solver dialog. A solver allows you to solve
equations with multiple unknown variables by goal-seeking
methods.
Detective
This command activates the Spreadsheet Detective. With the
Detective, you can trace the dependencies from the current formula
cell to the cells in the spreadsheet.
Scenarios
Defines a scenario for the selected sheet area.
Protect Document
The Protect Sheet or Protect Spreadsheet Structure commands prevent changes from being made to cells in
the sheets or to sheets in a document. As an option, you can define a password. If a password is defined,
removal of the protection is only possible if the user enters the correct password.
Macros
Lets you record or organize and edit macros.
Extension Manager
The Extension Manager adds, removes, disables, enables, and updates LibreOffice extensions. You can use
shortcut key (Ctrl+Alt+E) for this command.
Customize
Customizes LibreOffice menus, context menus, shortcut keys, toolbars, and macro assignments to events.
Options
40
This command opens a dialog for a customized program configuration. You can use shortcut key (Alt+F12) for
this command.
FUNCTIONS
In LibreOffice Calc program, you can get desired results of computation related work with the help of
formula and function. Different operators are used for calculation by formula. Besides this, some predefined
functions are given in Calc by using them desired result can be obtained.
Using Formulas
In LibreOffice Calc, you can use formula to analyze the data in the worksheet. With one formula you can add,
subtract, multiply, divide and use comparative operators to obtain desired result from data in the worksheet.
A formula is used in worksheet when you want to draw some result from the entered data. Formula in
LibreOffice Calc is always starts with (=) sign. Sign “=” shows that the data entered in the related cell is a
formula. You can apply any type of formula as given below:
=5+7+10
=5(25-10)/100
=A4+A5+A6+A7
Functions
In LibreOffice Calc these functions are pre-designed formulas which are used in the worksheet to operate on
the stored data. In LibreOffice Calc pre-defined functions are divided in the following parts:
• Database
• Date & Time
• Financial
• Information
• Logical
• Mathematical
• Array
• Statistical
• Spreadsheet
• Text
• Add-in
Database Functions
Database Functions deals with functions used with data organized as one row of data for one record.
DAVERAGE
41
DAVERAGE returns the average of the values of all cells (fields) in all rows (database records) that match the
specified search criteria.
DCOUNT
DCOUNT counts the number of rows (records) in a database that match the specified search criteria and
contain numerical values in the DatabaseField column.
=DCOUNT(Database; [DatabaseField]; SearchCriteria)
=DCOUNT(A1:E10;D1;A13:E14)
DCOUNTA
DCOUNTA counts the number of rows (records) in a database that match the specified search conditions, and
contain numeric or alphanumeric values.
=DCOUNTA(Database; [DatabaseField]; SearchCriteria)
=DCOUNTA(A1:E10;"Name";
DGET
DGET returns the contents of the referenced cell in a database which matches the specified search criteria. In
case of an error, the function returns either #VALUE! for no row found, or Err502 for more than one cell found.
=DGET(Database; DatabaseField; SearchCriteria)
=DGET(A1:E10;"Grade";A13:E14)
DMAX
DMAX returns the maximum content of a cell (field) in a database (all records) that matches the specified
search conditions.
=DMAX(Database; DatabaseField; SearchCriteria)
=DMAX(A1:E10;"Weight";A13:E14)
DMIN
DMIN returns the minimum content of a cell (field) in a database that matches the specified search criteria.
=DMIN(Database; DatabaseField; SearchCriteria)
=DMIN(A1:E10;"Distance to School";A13:E14)
DPRODUCT
DPRODUCT multiplies all cells of a data range where the cell contents match the search criteria.
=DPRODUCT(Database; DatabaseField; SearchCriteria)
DSTDEV
DSTDEV calculates the standard deviation of a population based on a sample, using the numbers in a database
column that match the given conditions. The records are treated as a sample of data. That means that the
children in the example represent a cross section of all children. Note that a representative result can not be
obtained from a sample of less than one thousand.
42
=DSTDEV(Database; DatabaseField; SearchCriteria)
=DSTDEV(A1:E10;"Weight";A13:E14)
DSTDEVP
DSTDEVP calculates the standard deviation of a population based on all cells of a data range which match the
search criteria. The records from the example are treated as the whole population.
=DSTDEVP(Database; DatabaseField; SearchCriteria)
=DSTDEVP(A1:E10;"Weight";A13:E14)
DSUM
DSUM returns the total of all cells in a database field in all rows (records) that match the specified search
criteria.
=DSUM(Database; DatabaseField; SearchCriteria)
=DSUM(A1:E10;"Distance to School";A13:E14)
DVAR
DVAR returns the variance of all cells of a database field in all records that match the specified search criteria.
The records from the example are treated as a sample of data. A representative result cannot be obtained
from a sample population of less than one thousand.
=DVAR(Database; DatabaseField; SearchCriteria)
=DVAR(A1:E10;"Weight";A13:E14)
DVARP
DVARP calculates the variance of all cell values in a database field in all records that match the specified search
criteria. The records are from the example are treated as an entire population.
=DVARP(Database; DatabaseField; SearchCriteria)
=DVARP(A1:E10;"Weight";A13:E14)
DATE
This function calculates a date specified by year, month, day and displays it in the cell's formatting. The default
format of a cell containing the DATE function is the date format, but you can format the cells with any other
number format.
=DATE(Year; Month; Day)
=DATE(00;1;31)
43
If the values for month and day are out of bounds, they are carried over to the next digit. If you enter
=DATE(00;12;31) the result will be 2000-12-31. If, on the other hand, you enter =DATE(00;13;31) the result
will be 2001-01-31.
TODAY
Returns the current computer system date. The value is updated when you reopen the document or modify
the values of the document. NOW is a function without arguments.
=TODAY()
YEAR
Returns the year as a number according to the internal calculation rules.
=YEAR(Number)
=YEAR(1) returns 1899
=YEAR(2) returns 1900
=YEAR(33333.33) returns 1991
NOW
Returns the computer system date and time. The value is updated when you recalculate the document or each
time a cell value is modified. NOW is a function without arguments.
=NOW()
MINUTE
Calculates the minute for an internal time value. The minute is returned as a number between 0 & 59.
=MINUTE(Number)
=MINUTE(8.999) returns 58
=MINUTE(8.9999) returns 59
MONTH
Returns the month for the given date value. The month is returned as an integer between 1 and 12.
=MONTH(Number)
=MONTH(NOW()) returns the current month.
DAY
Returns the day of given date value. The day is returned as an integer between 1 and 31. You can also enter a
negative date/time value.
=DAY(Number)
=DAY(1) returns 31 (since LibreOffice starts counting at zero from December 30, 1899) =DAY(NOW()) returns
the current day.
DAYS
Calculates the difference between two date values. The result returns the number of days between the two
days.
=DAYS(Date2; Date1)
=DAYS(NOW();"2010-01-01")) returns the number of days from January 1, 2010 until today.
44
=DAYS ("1990-10-10";"1980-10-10") returns 3652 days.
WEEKDAY
Returns the day of the week for the given date value. The day is returned as an integer between 1 (Sunday)
and 7 (Saturday) if no type or type=1 is specified. For other types, see the table below.
=WEEKDAY(Number; Type)
=WEEKDAY(NOW()) returns the number of the current day.
=WEEKDAY("2000-06-14") returns 4
=WEEKDAY("1996-07-24";2) returns 3 (the Type parameter is 2, therefore Monday is day number 1. July 24,
1996 was a Wednesday and therefore day number 3).
TIME
TIME returns the current time value from values for hours, minutes and seconds. This function can be used to
convert a time based on these three elements to a decimal time value.
=TIME(Hour; Minute; Second)
=TIME(0;0;0) returns 00:00:00
=TIME(4;20;4) returns 04:20:04
TIMEVALUE
TIMEVALUE returns the internal time number from a text enclosed by quotes and which may show a possible
time entry format.
=TIMEVALUE("Text")
=TIMEVALUE("4PM") returns 0.67. When formatting in time format HH:MM:SS, you then get 16:00:00
=TIMEVALUE("24:00") returns 0. If you use the HH:MM:SS time format, the value is 00:00:00.
Financial Functions
This category contains the mathematical finance functions of LibreOffice Calc.
ACCRINT
Calculates the accrued interest of a security in the case of periodic payments.
=ACCRINT(Issue; FirstInterest; Settlement; Rate; Par; Frequency; Basis)
45
1 Exact number of days in months, exact number of days in year
2 Exact number of days in month, year has 360 days
3 Exact number of days in month, year has 365 days
4 European method, 12 months of 30 days each
AMORDEGRC
Calculates the amount of depreciation for a settlement period as degressive amortization. Unlike AMORLINC,
a depreciation coefficient that is independent of the depreciable life is used here.
=AMORDEGRC(Cost; DatePurchased; FirstPeriod; Salvage; Period; Rate; Basis)
AMORLINC
Calculates the amount of depreciation for a settlement period as linear amortization. If the capital asset is
purchased during settlement period, the proportional amount of depreciation is considered.
=AMORLINC(Cost; DatePurchased; FirstPeriod; Salvage; Period; Rate; Basis)
DB
Returns the depreciation of an asset for a specified period using the fixed-declining balance method. This form
of depreciation is used if you want to get a higher depreciation value at the beginning of the depreciation (as
opposed to linear depreciation). The depreciation value is reduced with every depreciation period by the
depreciation already deducted from the initial cost.
=DB(Cost; Salvage; Life; Period; Month)
=DB(25000;1000;36;1;6) = 1,075.00 currency units
DDB
46
Returns the depreciation of an asset for a specified period using the arithmetic-declining method. Use this
form of depreciation if you require a higher initial depreciation value as opposed to linear depreciation. The
depreciation value gets less with each period and is usually used for assets whose value loss is higher shortly
after purchase (for example, vehicles, and computers). Please note that the book value will never reach zero
under this calculation type.
=DDB(Cost; Salvage; Life; Period; Factor) =DDB(75000;1;60;12;2) = 1,721.81 currency units.
Cost fixes the initial cost of an asset.
Salvage fixes the value of an asset at the end of its life.
Life is the number of periods (for example, years or months) defining how long the asset is to be used. Period
states the period for which the value is to be calculated.
Factor (optional) is the factor by which depreciation decreases. If a value is not entered, the default is factor
2.
DISC
Calculates the allowance (discount) of a security as a percentage.
=DISC("Settlement"; "Maturity"; Price; Redemption; Basis)
=DISC("2001-01-25";"2001-11-15";97;100;3) returns about 0.0372 or 3.72 per cent.
IRR
Calculates the internal rate of return for an investment. The values represent cash flow values at regular
intervals, at least one value must be negative (payments), and at least one value must be positive (income). If
the payments take place at irregular intervals, use the XIRR function. =IRR(Values; Guess)
Example
Under the assumption that cell contents are A1=-10000, A2=3500, A3=7600 and A4=1000, the formula
=IRR(A1:A4) gives a result of 11,33%.
ISPMT
Calculates the level of interest for unchanged amortization installments.
=ISPMT(Rate; Period; TotalPeriods; Invest)
Example
47
For a credit amount of 120,000 currency units with a two-year term and monthly installments, at a yearly
interest rate of 12% the level of interest after 1.5 years is required.
=ISPMT(1%;18;24;120000) = -300 currency units. The monthly interest after 1.5 years amounts to 300 currency
units.
PV
Returns the present value of an investment resulting from a series of regular payments. Use this function to
calculate the amount of money needed to be invested at a fixed rate today, to receive a specific amount, an
annuity, over a specified number of periods. You can also determine how much money is to remain after the
elapse of the period. Specify as well if the amount is to be paid out at the beginning or at the end of each
period.
Enter these values either as numbers, expressions or references. If, for example, interest is paid annually at
8%, but you want to use month as your period, enter 8%/12 under Rate and LibreOffice Calc with automatically
calculate the correct factor.
= PV(Rate; NPer; Pmt; FV; Type)
Example
What is the present value of an investment, if 500 currency units are paid out monthly and the annual interest
rate is 8%? The payment period is 48 months and 20,000 currency units are to remain at the end of the
payment period.
Information Functions
Information Functions contains the Information functions.
CELL
Returns information on address, formatting or contents of a cell.
= CELL("InfoType"; Reference)
=CELL("COL";D2)
=CELL("ROW";D2)
=CELL("Sheet";Sheet3.D2)
InfoType is the character string that specifies the type of information. The character string is always in English.
Upper or lower case is optional.
48
CURRENT
This function returns the result to date of evaluating the formula of which it is a part (in other words the result
as far as that evaluation has got). Its main use is together with the STYLE() function to apply selected styles to
a cell depending on the cell contents.
= CURRENT()
=1+2+CURRENT()
=A2+B2+STYLE(IF(CURRENT()>10;”Red”;”Default”))
The example returns 6. The formula is calculated from left to right as: 1 + 2 equals 3, giving the result to date
when CURRENT() is encountered; CURRENT() therefore yields 3, which is added to the original 3 to give 6.
IFERROR
Returns the value if the cell does not contains an error value, or the alternative value if it does.
=IFERROR(Value;Alternate_value)
=IFERROR(C8;C9) where cell C8 contains =1/0 returns the value of C9, because 1/0 is an error Value is the
value or expression to be returned if it is not equal or results in an error.
Alternate_value is the value or expression to be returned if the expression or value of Value is equal or results
in an error.
INFO
Returns specific information about the current working environment. The function receives a single text
argument and returns data depending on that parameter.
=INFO("Type")
=INFO(D5) with cell D5 containing a text string system returns the operation system type.
The following table lists the values for the text parameter Type and the return values of the INFO function.
ISBLANK
Returns TRUE if the reference to a cell is blank. This function is used to determine if the content of a cell is
empty. A cell with a formula inside is not empty. If an error occurs, the function returns a logical or numerical
value.
= ISBLANK(Value)
=ISBLANK(D2) returns FALSE as a result.
Value is the content to be tested.
ISERR
Tests for error conditions, except the #N/A error value, and returns TRUE or FALSE. If an error occurs, the
function returns a logical or numerical value.
= ISERR(Value)
=ISERR(C8) where cell C8 contains =1/0 returns TRUE, because 1/0 is an error.
=ISERR(C9) where cell C9 contains =NA() returns FALSE, because ISERR() ignores the #N/A error. Value is any
value or expression which is tested to see whether an error value other than #N/A is present.
ISERROR
49
Tests for error conditions, including the #N/A error value, and returns TRUE or FALSE. If an error occurs, the
function returns a logical or numerical value.
= ISERROR(Value)
=ISERROR(C8) where cell C8 contains =1/0 returns TRUE, because 1/0 is an error.
=ISERROR(C9) where cell C9 contains =NA() returns TRUE.
ISEVEN
Value is or refers to the value to be tested. ISERROR() returns TRUE if there is an error and FALSE if not.
ISLOGICAL
Tests for a logical value (TRUE or FALSE). If an error occurs, the function returns FALSE.
= ISLOGICAL(Value)
=ISLOGICAL(99) returns FALSE, because 99 is a number, not a logical value.
=ISLOGICAL(ISNA(D4)) returns TRUE whatever the contents of cell D4, because ISNA() returns a logical value.
ISODD
Returns TRUE if the value is odd, or FALSE if the number is even.
= ISODD(value)
=ISODD(33) returns TRUE
=ISODD(48) returns FALSE
=ISODD(3.999) returns TRUE
=ISODD(-3.1) returns TRUE
Value is the value to be checked. If Value is not an integer any digits after the decimal point are ignored. The
sign of Value is also ignored.
Logical Functions
This category contains the Logical functions.
AND
Returns TRUE if all arguments are TRUE. If one of the elements is FALSE, this function returns the FALSE value.
The arguments are either logical expressions themselves (TRUE, 1<5, 2+3=7, B8<10) that return logical values,
or arrays (A1:C3) containing logical values.
50
LogicalValue1; LogicalValue2 ...LogicalValue30 are conditions to be checked. All conditions can be either TRUE
or FALSE. If a range is entered as a parameter, the function uses all values of the range. The result is TRUE if
the logical value in all cells within the cell range is TRUE.
Example
The logical values of entries 12<13; 14>12, and 7<6 are to be checked:
FALSE
Returns the logical value FALSE. The FALSE() function does not require any arguments, and always returns the
logical value FALSE.
=FALSE()
=FALSE() returns FALSE
=NOT(FALSE()) returns TRUE
IF
Specifies a logical test to be performed.
= IF(Test; ThenValue; OtherwiseValue)
=IF(A1>5;100;"too small")
If the value in A1 is higher than 5, the value 100 is entered in the current cell; otherwise, the text “too small”
(without quotes) is entered.
NOT
Complements (inverts) a logical value.
= NOT(LogicalValue)
=NOT(A). If A=TRUE then NOT(A) will evaluate FALSE.
LogicalValue is any value to be complemented.
OR
Returns TRUE if at least one argument is TRUE. This function returns the value FALSE, if all the arguments have
the logical value FALSE.
The arguments are either logical expressions themselves (TRUE, 1<5, 2+3=7, B8<10) that return logical values,
or arrays (A1:C3) containing logical values. = OR(LogicalValue1; LogicalValue2 ...LogicalValue30)
Example
The logical values of entries 12<11; 13>22, and 45=45 are to be checked.
=OR(12<11;13>22;45=45) returns TRUE. =OR(FALSE;TRUE) returns
TRUE.
51
TRUE
The logical value is set to TRUE. The TRUE() function does not require any arguments, and always returns the
logical value TRUE.
= TRUE()
Example
If A=TRUE and B=FALSE the following examples appear:
=AND(A;B) returns FALSE
=OR(A;B) returns TRUE
=NOT(AND(A;B)) returns TRUE
XOR
Returns true if an odd number of arguments evaluates to TRUE.
The arguments are either logical expressions themselves (TRUE, 1<5, 2+3=7, B8<10) that return logical values,
or arrays (A1:C3) containing logical values.
= XOR(LogicalValue1; LogicalValue2 ...LogicalValue30)
Example
=XOR(TRUE;TRUE) returns FALSE
=XOR(TRUE;TRUE;TRUE) returns TRUE
=XOR(FALSE;TRUE) returns TRUE
Mathematical Functions
This category contains the Mathematical functions for Calc.
ABS
Returns the absolute value of a number.
= ABS(Number) =ABS(-56) returns 56.
=ABS(12) returns 12. =ABS(0) returns
0.
Number is the number whose absolute value is to be calculated. The absolute value of a number is its value
without the +/- sign.
ACOS
Returns the inverse trigonometric cosine of a number.
= ACOS(Number)
=ACOS(-1) returns 3.14159265358979 (PI radians)
=DEGREES(ACOS(0.5)) returns 60. The cosine of 60 degrees is 0.5.
This function returns the inverse trigonometric cosine of Number, that is the angle (in radians) whose cosine
is Number. The angle returned is between 0 and PI. To return the angle in degrees, use the DEGREES function.
52
ACOSH
Returns the inverse hyperbolic cosine of a number.
= ACOSH(Number)
=ACOSH(1) returns 0.
=ACOSH(COSH(4)) returns 4.
This function returns the inverse hyperbolic cosine of Number, that is the number whose hyperbolic cosine is
Number. Number must be greater than or equal to 1.
CEILING
Rounds a number up to the nearest multiple of Significance.
= CEILING(Number; Significance; Mode)
=CEILING(-11;-2) returns -10
=CEILING(-11;-2;0) returns -10
=CEILING(-11;-2;1) returns -12
COMBIN
Returns the number of combinations for elements without repetition. =
COMBIN(Count1; Count2) =COMBIN(3;2) returns 3.
COS
Returns the cosine of the given angle (in radians).
= COS(Number)
=COS(PI()*2) returns 1, the cosine of 2*PI radians.
=COS(RADIANS(60)) returns 0.5, the cosine of 60 degrees.
Returns the (trigonometric) cosine of Number, the angle in radians. To return
the cosine of an angle in degrees, use the RADIANS function.
COT
Returns the cotangent of the given angle (in radians).
=COT(Number)
53
=COT(PI()/4) returns 1, the cotangent of PI/4 radians.
=COT(RADIANS(45)) returns 1, the cotangent of 45 degrees.
Returns the (trigonometric) cotangent of Number, the angle in radians. To return
the cotangent of an angle in degrees, use the RADIANS function.
The cotangent of an angle is equivalent to 1 divided by the tangent of that angle.
CSC
Returns the cosecant of the given angle (in radians). The cosecant of an angle is equivalent to 1 divided by the
sine of that angle
= CSC(Number)
=CSC(PI()/4) returns approximately 1.4142135624, the inverse of the sine of PI/4 radians.
=CSC(RADIANS(30)) returns 2, the cosecant of 30 degrees.
DEGREES
Converts radians into degrees.
= DEGREES(Number)
=DEGREES(PI()) returns 180 degrees.
Number is the angle in radians to be converted to degrees.
EVEN
Rounds a positive number up to the next even integer and a negative number down to the next even integer.
=EVEN(Number) =EVEN(2.3) returns
4.
=EVEN(2) returns 2.
=EVEN(0) returns 0.
=EVEN(-0.5) returns -2.
Returns Number rounded to the next even integer up, away from zero.
EXP
Returns e raised to the power of a number. The constant e has a value of approximately 2.71828182845904.
= EXP(Number)
=EXP(1) returns 2.71828182845904, the mathematical constant e to Calc's accuracy. Number is the
power to which e is to be raised.
FACT
Returns the factorial of a number.
= FACT(Number)
=FACT(0) returns 1 by definition.
=FACT(3) returns 6.
=FACT(0) returns 1.
54
FLOOR
Rounds a number down to the nearest multiple of Significance.
= FLOOR(Number; Significance; Mode)
GCD
Returns the greatest common divisor of two or more integers. The greatest common divisor is the positive
largest integer which will divide, without remainder, each of the given integers.
= GCD(Integer1; Integer2; ...; Integer30)
=GCD(B1:B3) where cells B1, B2, B3 contain 9, 12, 9 gives 3.
INT
Rounds a number down to the nearest integer.
= INT(Number) =INT(5.7) returns
5.
=INT(-1.3) returns -2.
Returns Number rounded down to the nearest integer. Negative
numbers round down to the integer below.
LCM
Returns the least common multiple of one or more integers.
= LCM(Integer1; Integer2; ...; Integer30)
Integer1 to 30 are up to 30 integers whose lowest common multiple is to be calculated.
If you enter the numbers 512;1024 and 2000 in the Integer 1;2 and 3 text boxes, 128000 will be returned as
the result.
LN
Returns the natural logarithm based on the constant e of a number. The constant e has a value of
approximately 2.71828182845904.
= LN(Number)
=LN(3) returns the natural logarithm of 3 (approximately 1.0986). =LN(EXP(321)) returns
321.
LOG
Returns the logarithm of a number to the specified base.
= LOG(Number; Base)
55
=LOG(10;3) returns the logarithm to base 3 of 10 (approximately 2.0959). =LOG(7^4;7) returns
4.
MOD
Returns the remainder when one integer is divided by another.
= MOD(Dividend; Divisor)
=MOD(22;3) returns 1, the remainder when 22 is divided by 3. =MOD(11.25;2.5) returns
1.25.
For integer arguments this function returns Dividend modulo Divisor, that is the remainder when Dividend is
divided by Divisor.
ODD
Rounds a positive number up to the nearest odd integer and a negative number down to the nearest odd
integer.
= ODD(Number) =ODD(1.2) returns
3.
=ODD(1) returns 1.
=ODD(0) returns 1.
=ODD(-3.1) returns -5.
Returns Number rounded to the next odd integer up, away from zero.
PI
Returns 3.14159265358979, the value of the mathematical constant PI to 14 decimal places.
= PI()
=PI() returns 3.14159265358979.
POWER
Returns a number raised to another number.
= POWER(Base; Exponent)
=POWER(4;3) returns 64, which is 4 to the power of 3.
=4^3 also returns 4 to the power of 3.
PRODUCT
Multiplies all the numbers given as arguments and returns the product. =
PRODUCT(Number1; Number2; ...; Number30) =PRODUCT(2;3;4) returns 24.
RADIANS
Converts degrees to radians.
= RADIANS(Number)
56
=RADIANS(90) returns 1.5707963267949, which is PI/2 to Calc's accuracy. Number is the
angle in degrees to be converted to radians.
RAND
Returns a random number between 0 and 1.
= RAND()
=RAND() returns a random number between 0 and 1.
This function produces a new random number each time Calc recalculates. To force Calc to recalculate
manually press F9.
ROUND
Rounds a number to a certain number of decimal places.
=ROUND(Number; Count) =ROUND(2.348;2) returns
2.35 =ROUND(2.348;0) returns 2.
=ROUND(2.5) returns 3.
=ROUND(987.65;-2) returns 1000.
Returns Number rounded to Count decimal places. If Count is omitted or zero, the function rounds to the
nearest integer. If Count is negative, the function rounds to the nearest 10, 100, 1000, etc. This function
rounds to the nearest number. See ROUNDDOWN and ROUNDUP for alternatives.
SEC
Returns the secant of the given angle (in radians). The secant of an angle is equivalent to 1 divided by the
cosine of that angle
= SEC(Number)
=SEC(PI()/4) returns approximately 1.4142135624, the inverse of the cosine of PI/4 radians.
=SEC(RADIANS(60)) returns 2, the secant of 60 degrees.
Returns the (trigonometric) secant of Number, the angle in radians. To return
the secant of an angle in degrees, use the RADIANS function.
SIGN
Returns the sign of a number. Returns 1 if the number is positive, -1 if negative and 0 if zero.
= SIGN(Number) =SIGN(3.4) returns
1.
=SIGN(-4.5) returns -1.
SIN
Returns the sine of the given angle (in radians).
= SIN(Number)
=SIN(PI()/2) returns 1, the sine of PI/2 radians.
=SIN(RADIANS(30)) returns 0.5, the sine of 30 degrees.
57
To return the sine of an angle in degrees, use the RADIANS function.
SQRT
Returns the positive square root of a number.
= SQRT(Number)
=SQRT(16) returns 4.
=SQRT(-16) returns an invalid argument error
SUBTOTAL
Calculates subtotals. If a range already contains subtotals, these are not used for further calculations. Use this
function with the AutoFilters to take only the filtered records into account.
= SUBTOTAL(Function; Range) =SUBTOTAL(9;B2:B6) returns
50.
=SUBTOTAL(109;B2:B6) returns 40.
SUM
Adds all the numbers in a range of cells.
= SUM(Number1; Number2; ...; Number30)
=SUM(A1;A3;B5) calculates the sum of the three cells.
=SUM (A1:E10) calculates the sum of all cells in A1 to E10 cell range.
=SUM((A1:A40>=C1)*(A1:A40<C2)*B1:B40)
SUMIF
Adds the cells specified by a given criteria. This function is used to browse a range when you search for a
certain value.
= SUMIF(Range; Criteria; SumRange)
=SUMIF(A1:A10;"<0")
=SUMIF(A1:A10;">0";B1:10)
SumRange is the range from which values are summed. If this parameter has not been indicated, the values
found in the Range are summed.
Text Functions
Text Functions contains descriptions of the Text functions.
CHAR
58
Converts a number into a character according to the current code table. The number can be a twodigit or
three-digit integer number. Codes greater than 127 may depend on your system's character mapping (for
example iso-8859-1, iso-8859-2, Windows-1252, Windows-1250), and hence may not be portable.
= CHAR(Number)
=CHAR(100) returns the character d.
Number is a number between 1 and 255 representing the code value for the character.
CLEAN
All non-printing characters are removed from the string.
=CLEAN("Text")
Text refers to the text from which to remove all non-printable characters.
CONCATENATE
Combines several text strings into one string.
= CONCATENATE("Text1"; ...; "Text30")
=CONCATENATE("Good ";"Morning ";"Mrs. ";"Doe") returns: Good Morning Mrs. Doe.
Text 1; Text 2; ... represent up to 30 text passages which are to be combined into one string.
EXACT
Compares two text strings and returns TRUE if they are identical. This function is case-sensitive.
= EXACT("Text1"; "Text2")
=EXACT("microsystems";"Microsystems") returns FALSE.
Text1 refers to the first text to compare. Text2 is the
second text to compare.
LEFT
Returns the first character or characters of a text.
= LEFT("Text"; Number)
=LEFT("output";3) returns “out”.
Text is the text where the initial partial words are to be determined.
Number (optional) specifies the number of characters for the start text. If this parameter is not defined, one
character is returned.
LEN
Returns the length of a string including spaces.
= LEN("Text")
=LEN("Good Afternoon") returns 14.
=LEN(12345.67) returns 8.
Text is the text whose length is to be determined.
LOWER
59
Converts all uppercase letters in a text string to lowercase.
= LOWER("Text")
=LOWER("Sun") returns sun.
Text refers to the text to be converted.
PROPER
Capitalizes the first letter in all words of a text string.
= PROPER("Text")
=PROPER("open office") returns Open Office.
REPT
Repeats a character string by the given number of copies.
= REPT("Text"; Number)
=REPT("Good morning";2) returns Good morningGood morning.
Text is the text to be repeated. Number is the
number of repetitions.
The result can be a maximum of 255 characters.
TRIM
Removes spaces from a string, leaving only a single space character between words.
= TRIM("Text")
=TRIM(" hello world ") returns hello world without leading and trailing spaces and with single space between
words.
UNICHAR
Converts a code number into a Unicode character or letter.
= UNICHAR(number)
=UNICHAR(169) returns the Copyright character ©.
UNICODE
Returns the numeric code for the first Unicode character in a text string.
= UNICODE("Text")
=UNICODE("©") returns the Unicode number 169 for the Copyright character.
UPPER
Converts the string specified in the text field to uppercase.
= UPPER("Text") Text refers to the lower case letters you want to convert to upper case.
=UPPER("Good Morning") returns GOOD MORNING.
60