Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
417 views

LibreOffice - Calc Guide

LIbreOffice - is the Linux Office similar and fully compatible with Microsoft Office. LibreOffice is intuitive and easy to use, and many people who work with it every day have never looked at a manual - including migrating Microsoft Office users, who usually find all the features they need are in logical, easy-to-guess places.

Uploaded by

ncezar2000
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
417 views

LibreOffice - Calc Guide

LIbreOffice - is the Linux Office similar and fully compatible with Microsoft Office. LibreOffice is intuitive and easy to use, and many people who work with it every day have never looked at a manual - including migrating Microsoft Office users, who usually find all the features they need are in logical, easy-to-guess places.

Uploaded by

ncezar2000
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 446

LibreOffice 4.

1 Calc Guide
Using Spreadsheets in LibreOffice

Copyright
This document is Copyright 2013 by the LibreOffice Documentation Team. Its contributors are listed belo . !ou may distribute it or modify it under the terms of either the "#$ "eneral %ublic License &http'(( .gnu.org(licenses(gpl.html)* +ersion 3 or later* or the Creati+e Commons ,ttribution License &http'((creati+ecommons.org(licenses(by(3.0()* +ersion 3.0 or later. #ote that Chapter -* Using the DataPilot* is licensed under the Creati+e Commons ,ttribution./hare ,li0e License* +ersion 3.0. ,ll trademar0s ithin this guide belong to their legitimate o ners.

Contributors
1ohn , /mith ,ndre %itonya0 7arbara Duprey 4ar0 4orin %hilippe Cl9ment 4artin /affron Cover art: Dre 1ensen 1ean 2ollis 3eber 1ean 2ollis 3eber /imon 7rydon %eter /chofield Christian Chenal %ierre.!+es /amyn 8laus.1:rgen 3eghorn Christoph #oac0 4artin 1 5o6 "abriel "odoy 8ieran %ec0ett Laurent 7alland.%oirier /helagh 4anton %reston 4anning 7ernstein 8laus.1:rgen 3eghorn

Feedback
%lease direct any comments or suggestions about this document to' documentation;global.libreoffice.org

Acknowledgments
This boo0 is adapted and updated from Getting Started with OpenOffice.org 3.3. The contributors to that boo0 are listed on page 12.

Publication date and software version


%ublished < December 2013. 7ased on LibreOffice =.1.

Documentation for LibreOffice is available at http: www.libreoffice.org get!help documentation

Contents
Copyright..................................................................................................................................... 2

Preface..................................................................................................................................7
3ho is this boo0 for>................................................................................................................... 3hat?s in this boo0>..................................................................................................................... 3here to get more help............................................................................................................... 3hat you see may be different....................................................................................................< $sing LibreOffice on a 4ac........................................................................................................10 3hat are all these things called>...............................................................................................10 3ho rote this boo0>.................................................................................................................11 ,c0no ledgements.................................................................................................................... 12 5re@uently as0ed @uestions.......................................................................................................12 3hat?s ne in LibreOffice Calc =.0>..........................................................................................13 3hat?s ne in LibreOffice Calc =.1>..........................................................................................1=

Chapter 1 ntroducing Calc...............................................................................................1!


3hat is Calc>............................................................................................................................. 1A /preadsheets* sheets* and cells................................................................................................1A Calc main dialog........................................................................................................................ 1A Creating* opening and sa+ing spreadsheets..............................................................................21 %ass ord protection.................................................................................................................. 2B #a+igating ithin spreadsheets.................................................................................................2B /electing items in a sheet or spreadsheet.................................................................................23or0ing ith columns and ro s.................................................................................................31 3or0ing ith sheets................................................................................................................... 32 Cie ing Calc.............................................................................................................................. 3= $sing the #a+igator................................................................................................................... 3A $sing document properties........................................................................................................3-

Chapter " #ntering$ #diting$ and Formatting %ata.........................................................&1


Introduction................................................................................................................................ =2 $sing the 0eyboard.................................................................................................................... =2 /peeding up data entry.............................................................................................................. =A 4erging and splitting cells.......................................................................................................... =< /haring content bet een sheets................................................................................................B0 Calidating cell contents.............................................................................................................. B0 Dditing data................................................................................................................................ B3 5ormatting data.......................................................................................................................... BE ,uto5ormat of cells and sheets..................................................................................................A3 $sing themes............................................................................................................................. A= Calue highlighting....................................................................................................................... AB $sing conditional formatting.......................................................................................................AB 2iding and sho ing data............................................................................................................ A< /orting records.......................................................................................................................... EB 5ind and replace........................................................................................................................ EE
LibreOffice ".# $alc Guide 3

Chapter ' Creating Charts and (raphs...........................................................................)1


Introduction................................................................................................................................ -2 Chart 3iFard.............................................................................................................................. -2 Dditing charts and graphs.......................................................................................................... -E 5ormatting charts and graphs....................................................................................................<B ,dding dra ing obGects to charts.............................................................................................10B HesiFing and mo+ing the chart.................................................................................................10B D6porting charts....................................................................................................................... 10"allery of chart types............................................................................................................... 10-

Chapter & *sing +tyles and ,emplates in Calc.............................................................1"1


3hat is a template>................................................................................................................. 122 3hat are styles>...................................................................................................................... 122 /tyles....................................................................................................................................... 122 Templates................................................................................................................................ 13E

Chapter ! *sing (raphics in Calc..................................................................................1&'


"raphics in Calc...................................................................................................................... 1== ,dding graphics &images)........................................................................................................ 1== 4odifying images..................................................................................................................... 1=< %ositioning* resiFing and arranging images..............................................................................1BB Calc dra ing tools................................................................................................................... 1A0 ,dditional tools........................................................................................................................ 1A3 Image maps............................................................................................................................. 1AB

Chapter - Printing$ #.porting$ and #/mailing...............................................................171


Iuic0 printing........................................................................................................................... 1E2 Controlling printing................................................................................................................... 1E2 $sing print ranges.................................................................................................................... 1EB %age brea0s............................................................................................................................. 1E< %rinting options setup in page styles........................................................................................1-0 2eaders and footers................................................................................................................ 1-1 D6porting to %D5..................................................................................................................... 1-= D6porting to other formats........................................................................................................1-< D.mailing spreadsheets........................................................................................................... 1-< Digital signing of documents....................................................................................................1<0 Hemo+ing personal data.......................................................................................................... 1<0

Chapter 7 *sing Formulas and Functions....................................................................101


Introduction.............................................................................................................................. 1<2 /etting up a spreadsheet......................................................................................................... 1<2 Creating formulas.................................................................................................................... 1<3 $nderstanding functions.......................................................................................................... 20E /trategies for creating formulas and functions.........................................................................212 5inding and fi6ing errors.......................................................................................................... 21= D6amples of functions.............................................................................................................. 21$sing regular e6pressions in functions.....................................................................................222 ,d+anced functions.................................................................................................................. 22=
LibreOffice ".# $alc Guide "

Chapter ) *sing Pivot ,ables.........................................................................................""!


Introduction.............................................................................................................................. 22A The %i+ot Table dialog.............................................................................................................. 223or0ing ith the results of the %i+ot Table...............................................................................23A $sing %i+ot Table results else here.........................................................................................2=B

Chapter 0 %ata Analysis.................................................................................................."&0


Introduction.............................................................................................................................. 2B0 Consolidating data................................................................................................................... 2B0 Creating subtotals.................................................................................................................... 2B2 $sing J hat ifK scenarios.......................................................................................................... 2BA $sing other J hat ifK tools........................................................................................................ 2A0 3or0ing bac0 ards using "oal /ee0.......................................................................................2AB $sing the /ol+er...................................................................................................................... 2AA

Chapter 11 2inking Calc %ata........................................................................................."-0


3hy use multiple sheets>........................................................................................................2E0 /etting up multiple sheets........................................................................................................2E0 Heferencing other sheets.........................................................................................................2E3 Heferencing other documents..................................................................................................2EB 2yperlin0s and $HLs............................................................................................................... 2EA Lin0ing to e6ternal data............................................................................................................ 2E< Lin0ing to registered data sources...........................................................................................2-= Dmbedding spreadsheets........................................................................................................ 2-E

Chapter 11 +haring and 3eviewing %ocuments..........................................................."0'


Introduction.............................................................................................................................. 2<= /haring documents &collaboration)..........................................................................................2<= Hecording changes.................................................................................................................. 2<A ,dding comments to changes..................................................................................................2<,dding other comments........................................................................................................... 2<< He+ie ing changes.................................................................................................................. 301 4erging documents................................................................................................................. 303 Comparing documents............................................................................................................. 303 /a+ing +ersions....................................................................................................................... 30=

Chapter 1" Calc 4acros..................................................................................................'17


Introduction.............................................................................................................................. 30$sing the macro recorder........................................................................................................ 303rite your o n functions.......................................................................................................... 311 ,ccessing cells directly............................................................................................................ 31E /orting..................................................................................................................................... 31< Conclusion............................................................................................................................... 320

Chapter 1' Calc as a +imple %atabase..........................................................................'"1


Introduction.............................................................................................................................. 322 ,ssociating a range ith a name.............................................................................................323 /orting..................................................................................................................................... 325ilters....................................................................................................................................... 32<
LibreOffice ".# $alc Guide %

Calc functions similar to database functions............................................................................33A Database.specific functions.....................................................................................................3== Conclusion............................................................................................................................... 3=B

Chapter 1& +etting up and Customi5ing Calc...............................................................'&7


Introduction.............................................................................................................................. 3=LibreOffice options................................................................................................................... 3=Loading and sa+ing documents...............................................................................................3B3 Calc options............................................................................................................................. 3BA Default colors for charts........................................................................................................... 3AE ,utoCorrect functions.............................................................................................................. 3AE CustomiFing the user interface.................................................................................................3A,dding functionality ith e6tensions........................................................................................3EB

Appendi. A 6eyboard +hortcuts....................................................................................'77


Introduction.............................................................................................................................. 3E#ote for 4ac users................................................................................................................... 3E#a+igation and selection shortcuts..........................................................................................3E5unction 0ey shortcuts............................................................................................................. 3-0 ,rro 0ey shortcuts................................................................................................................. 3-1 Cell formatting shortcuts.......................................................................................................... 3-1 %i+ot table shortcuts................................................................................................................. 3-2 Chart shortcuts........................................................................................................................ 3-3

Appendi. 7 %escription of Functions...........................................................................')!


5unctions a+ailable in Calc......................................................................................................3-A 4athematical functions............................................................................................................ 3-E 5inancial analysis functions.....................................................................................................3<2 /tatistical analysis functions....................................................................................................=03 Date and time functions........................................................................................................... =12 Logical functions...................................................................................................................... =1B Information functions................................................................................................................ =1A Database functions.................................................................................................................. =1,rray functions......................................................................................................................... =20 /preadsheet functions............................................................................................................. =22 Te6t functions........................................................................................................................... =2E ,dd.in functions....................................................................................................................... =31

Appendi. C Calc #rror Codes.........................................................................................&'!


Introduction to Calc error codes...............................................................................................=3A Drror codes displayed ithin cells............................................................................................=3E "eneral error codes................................................................................................................. =3-

nde...................................................................................................................................&&1

LibreOffice ".# $alc Guide

&

Preface

8ho is this book for9


This boo0 is for beginners to ad+anced user of Calc* the spreadsheet component of LibreOffice. !ou may be ne to spreadsheet soft are* or you may be familiar ith another program. If you ha+e ne+er used LibreOffice before* or you ant an introduction to all of its components* you might li0e to read Getting Started with LibreOffice first. If you ha+e ne+er used spreadsheets before* you might also li0e to read a boo0 or find some tutorials about the use of spreadsheets.

8hat:s in this book9


This boo0 introduces the features and functions of LibreOffice Calc. It is not a tutorial on using spreadsheets. /ome chapters assume familiarity ith basic spreadsheet usage hen describing ho to use Calc. !ou can enter data &usually numerical) in a spreadsheet and then manipulate this data to produce certain results. ,lternati+ely* you can enter data and then use Calc in a L3hat if...M manner by changing some of the data and obser+ing the results ithout ha+ing to retype all of the data. 5unctions can be used to create formulas to perform comple6 calculations on data. /ome of the other features pro+ided by Calc include'

Database functions* to arrange* store* and filter data. Dynamic charts' a ide range of 2D and 3D charts. 4acros* for recording and e6ecuting repetiti+e tas0sN scripting languages supported include
LibreOffice 7asic* %ython* 7ean/hell* and 1a+a/cript.

,bility to open* edit* and sa+e 4icrosoftO D6celO and other spreadsheets. Import of spreadsheets from multiple formats* including 2T4L* C/C* and %ost/cript. D6port of spreadsheets into multiple formats* including 2T4L* C/C* and %D5.

8here to get more help


This guide* the other LibreOffice user guides* the built.in 2elp system* and user support systems assume that you are familiar ith your computer and basic functions such as starting a program* opening and sa+ing files.

;elp system
LibreOffice comes ith an e6tensi+e 2elp system. This is your first line of support for using LibreOffice Calc. To display the full 2elp system* press '# or go to ;elp < 2ibre=ffice ;elp on the main menu bar. In addition* you can choose hether to acti+ate (ips* )*tended tips* and the +elp ,gent by going to ,ools < =ptions < 2ibre=ffice < (eneral on the main menu bar. If (ips are enabled* place the mouse pointer o+er any of the icons to see a small bo6 &tooltip) ith a brief e6planation of the icon function. 5or a more detailed e6planation* select ;elp < 8hat:s ,his9 On the main menu bar and hold the pointer o+er the icon.

Free online support


The LibreOffice community not only de+elops soft are* but pro+ides free* +olunteer.based support. /ee Table 1 and this eb page' http'(( .libreoffice.org(get.help(

Preface

$sers can get comprehensi+e online support from the community through mailing lists and the ,s0 LibreOffice ebsite* http'((as0.libreoffice.org(en(@uestions(. Other ebsites run by users also offer free tips and tutorials. This forum pro+ides community support for LibreOffice' http'((en.libreofficeforum.org( This site pro+ides support for LibreOffice* among other programs' http'((forum.openoffice.org(en(forum( (able #: 'ree support for LibreOffice users Free LibreOffice support
,s0 LibreOffice Documentation 5,Is 4ailing lists Iuestions and ans ers from the LibreOffice community http'((as0.libreoffice.org(en(@uestions( $ser guides* ho .tos* and other documentation http'(( .libreoffice.org(get.help(documentation( https'(( i0i.documentfoundation.org(Documentation(%ublications ,ns ers to fre@uently as0ed @uestions http'(( i0i.documentfoundation.org(5a@ 5ree community support is pro+ided by a net or0 of e6perienced users http'(( .libreoffice.org(get.help(mailing.lists( The LibreOffice ebsite in your language http'(( .libreoffice.org(international.sites( International mailing lists http'(( i0i.documentfoundation.org(LocalP4ailingPLists Information about a+ailable accessibility options http'(( .libreoffice.org(get.help(accessibility(

International support

,ccessibility options

Paid support and training


,lternati+ely* you can pay for support ser+ices. /er+ice contracts can be purchased from a +endor or consulting firm specialiFing in LibreOffice.

8hat you see may be different


llustrations
LibreOffice runs on 3indo s* Linu6* and 4ac O/ Q operating systems* each of hich has se+eral +ersions and can be customiFed by users &fonts* colors* themes* indo managers). The illustrations in this guide ere ta0en from a +ariety of computers and operating systems. Therefore* some illustrations ill not loo0 e6actly li0e hat you see on your computer display. ,lso* some of the dialogs may be different because of the settings selected in LibreOffice. !ou can either use dialogs from your computer system &default) or dialogs pro+ided by LibreOffice. To change to using LibreOffice dialogs' 1) On Linu6 and 3indo s operating systems* go to ,ools < =ptions < 2ibre=ffice < (eneral on the main menu bar to open the dialog for general options. On a 4ac operating system* go to 2ibre=ffice < Preferences < (eneral on the main menu bar to open the dialog for general options.

Preface

2) /elect Use LibreOffice dialogs in Open Save dialogs and* in Linu6 and 4ac O/ Q operating systems only* in Print dialogs to display the LibreOffice dialogs on your computer display. 3) Clic0 =6 to sa+e your settings and close the dialog.

cons
The icons used to illustrate some of the many tools a+ailable in LibreOffice may differ from the ones used in this guide. The icons in this guide ha+e been ta0en from a LibreOffice installation that has been set to display the "ala6y set of icons. If you ish* you can change your LibreOffice soft are pac0age to display "ala6y icons as follo s' 1) On Linu6 and 3indo s operating systems* go to ,ools < =ptions < 2ibre=ffice < >iew on the main menu bar to open the dialog for +ie options. On a 4ac operating system* go to 2ibre=ffice < Preferences < >iew on the main menu bar to open the dialog for +ie options. 2) In User interface / 0con si1e and st2le select Gala*2 from the options a+ailable in the drop. do n list. 3) Clic0 =6 to sa+e your settings and close the dialog.
/ome Linu6 operating systems* for e6ample $buntu* include LibreOffice as part of the installation and may not include the "ala6y set of icons. !ou should be able to do nload the "ala6y icon set from the soft are repository for your Linu6 operating system.

?ote

*sing 2ibre=ffice on a 4ac


/ome 0eystro0es and menu items are different on a 4ac from those used in 3indo s and Linu6. The table belo gi+es some common substitutions for the instructions in this chapter. 5or a more detailed list* see the application 2elp. Windows or Linux
,ools < =ptions menu selection 3ight!clic4 $trl 6$ontrol7 '% '##

Mac equivalent
2ibre=ffice < Preferences $ontrol5clic4 or right!clic4 depending on computer setup

Effect
,ccess setup options Open a conte6t menu $sed ith other 0eys Open the #a+igator Open the /tyles and 5ormatting indo

6$ommand7
ShiftRR'%

R(

8hat are all these things called9


The terms used in LibreOffice for most parts of the user interface &the parts of the program you see and use* in contrast to the behind.the.scenes code that actually ma0es it or0) are the same as for most other programs. , dialog is a special type of indo . Its purpose is to inform you of something* or re@uest input from you* or both. It pro+ides controls for you to use to specify ho to carry out an action. The technical names for common controls are sho n in 5igure 1. In most cases e do not use the

Preface

#8

technical terms in this boo0* but it is useful to 0no them because the 2elp and other sources of information often use them.

'igure #: Dialog showing common controls 1) 2) 3) =) Tabbed page &not strictly spea0ing a control). Hadio buttons &only one can be selected at a time). Chec0bo6 &more than one can be selected at a time). /pin bo6 &clic0 the up and do n arro s to change the number sho n in the te6t bo6 ne6t to it* or type in the te6t bo6). B) Thumbnail or pre+ie . A) Drop.do n list from hich to select an item. E) %ush buttons. In most cases* you can interact only ith the dialog &not the document itself) as long as the dialog remains open. 3hen you close the dialog after use &usually* clic0ing =6 or another button sa+es your changes and closes the dialog)* then you can again or0 ith your document. /ome dialogs can be left open as you or0* so you can s itch bac0 and forth bet een the dialog and your document. ,n e6ample of this type is the 5ind S Heplace dialog.

8ho wrote this book9


This boo0 as ritten by +olunteers from the LibreOffice community. %rofits from sales of the printed edition ill be used to benefit the community.

Preface

##

Acknowledgements
This boo0 is adapted from OpenOffice.org 3.3 $alc Guide. The contributors to that boo0 are' Hic0 7arnes %eter 8upfer 4artin 5o6 1ames ,ndre 8rishna ,radhi ,ndy 7ro n /tephen 7uc0 7ruce 7yfield #icole Cairns T. 1. 5raFier /tigant 5yr itful Ingrid 2alama /pencer D. 2arpe Hegina 2enschel %eter 2illier.7roo0 1ohn 8ane 8ir0 ,bbott Dmma 8irsopp 1ared 8obos /igrid 8ronenberger /helagh 4anton ,le6andre 4artins 8ashmira %atel ,nthony %etrillo ,ndre %itonya0 Iain Hoberts 2aFel Hussman "ary /chnabl Hob /cott 1acob /tarr /o bhagya /undaresan #i0ita Telang 7arbara 4 Tobias 1ohn CiestenF 1ean 2ollis 3eber /tefan 3eigel /haron 3histon Claire 3ood Linda 3orthington 4ichele Tarri 4agnus ,dielsson /andeep /amuel 4edi0onda

Fre@uently asked @uestions


;ow is 2ibre=ffice licensed9 LibreOffice is distributed under the Open /ource Initiati+e &O/I) appro+ed Lesser "eneral %ublic License &L"%L). The L"%L license is a+ailable from the LibreOffice ebsite' http'(( .libreoffice.org(do nload(license( 4ay distribute 2ibre=ffice to anyone9 !es. ;ow many computers may install it on9 ,s many as you li0e. 4ay sell it9 !es. 4ay use 2ibre=ffice in my business9 !es. s 2ibre=ffice available in my language9 LibreOffice has been translated &localiFed) into o+er =0 languages* so your language probably is supported. ,dditionally* there are o+er E0 spelling* h2phenation* and thesaurus dictionaries a+ailable for languages and dialects that do not ha+e a localiFed program interface. The dictionaries are a+ailable from the LibreOffice ebsite at .libreoffice.org. ;ow can contribute to 2ibre=ffice9 !ou can help ith the de+elopment and user support of LibreOffice in many ays* and you do not need to be a programmer. 5or e6ample* you can help ith producing and maintaining ritten user documentation* producing +ideo tutorials* and other user support ser+ices. To start* see http'(( .documentfoundation.org(contribution( !ou can also contribute by donating money* either hen do nloading the program or at any other time. /ee http'((donate.libreoffice.org(

Preface

#9

4ay distribute the P%F of this book$ or print and sell copies9 !es* as long as you meet the re@uirements of one of the licenses in the copyright statement at the beginning of this boo0. !ou do not ha+e to re@uest special permission. In addition* e re@uest that you share ith the proGect some of the profits you ma0e from sales of boo0s* in consideration of all the or0 e ha+e put into producing them.

8hat:s new in 2ibre=ffice Calc &.19


(eneral
Impro+ed performance of OD/ &OpenDocument /preadsheet) document import. 3hen opening OD/ and QL/Q files* the +alues of formulas can optionally be sho n as
they ere sa+ed in the files ithout recalculating the formula. This option is found in ,ools < =ptions < 2ibre=ffice Calc < Formula < 3ecalculation on file load. This ma0es opening of larger files faster* and sho ing the +alues as they ere last edited may be an ad+antage hen opening spreadsheets sa+ed in D6cel.

,utomatically rotate chart a6is labels if they are o+erlapping. This fi6 also impro+es
detection of o+erlap hile rotating labels

/a+e settings of Te6t Import Dialog for Te6t to Columns and %aste $nformatted Te6t from
Clipboard &in addition to Te6t 5ile Import).

D6port color scales and data bars to QL/Q &also supports D6cel 2010R e6tensions for
databars).

Increased siFe limit on &uncompressed) OD5 documents from 2"b to ="b. /upport Utype.aheadU search in the autofilter popup. It is no possible to search for specific
entry using 0ey input.

Dnhanced chart +isualisation' better @uality rendering for printing and %D5 e6port of charts. #e conditional formats' date formats* top(bottom rules* string rules. Impro+ed conditional format dialogs. O+erlapping conditional formats. D6porting a single chart as an image &%#"* 1%"). Q4L /ource dialog to @uic0ly import arbitrary Q4L content.

Formula engine
#e configuration option to toggle handling of empty strings hen used in arithmetic
e6pressions.

#e pricing add.In containing spreadsheet functions for option pricing* in particular barrier
&O%TP7,HHIDH&...)) and touch &O%TPTO$C2&...)) options.

#e spreadsheet functions QOH* ,CDH,"DI5* /$4I5/* ,CDH,"DI5/ and CO$#TI5/ as


defined in OD5 Open5ormula.

He.implemented H,#D&) function ith better random number generation algorithm. #e spreadsheet functions I5DHHOH and I5#, as defined in OD5 Open5ormula.

Pivot table
/upport for multiple selections in the page field of a pi+ot table.

Preface

#3

8hat:s new in 2ibre=ffice Calc &.19


(eneral
Dmbedding fonts in a Calc spreadsheet. ,dded a stepped lines type to Line and Q! &/catter) graphs. Counting the number of selected cells.

Formula engine

#e spreadsheet function #$47DHC,L$D as defined in OD5 Open5ormula. #e spreadsheet function /8D3% as defined in OD5 Open5ormula. Import(e6port functions ne in D6cel 2013 for OD5 Open5ormula compatibility. The follo ing functions are handled* name specialties are gi+en as &in parentheses the Calc en.$/ $I name) Vin brac0ets the OD55 nameW ,COT* ,COT2* ,H,7IC* 7,/D* 7I#O4.DI/T.H,#"D &7) V7I#O4.DI/T.H,#"DW* 7IT,#D* 7ITL/2I5T* 7ITOH* 7ITH/2I5T* 7ITQOH* CO47I#,* COT* COT2* C/C* C/C2* D,!/* DDCI4,L* 5OH4$L,TDQT &5OH4$L,) V5OH4$L,W* ",44,* ",$//* I5#,* I4CO/2* I4COT* I4C/C* I4C/C2* I4/DC* I4/DC2* I4/I#2* I4T,#* I/5OH4$L,* 4$#IT* #$47DHC,L$D* %D$H,TIO# &D$H,TIO#) V%D$H,TIO#W* %DH4$T,TIO#,* %2I* HHI* /DC* /DC2* /2DDT* /2DDT/* /8D3.% &/8D3%) V/8D3%W* $#IC2,H* $#ICODD* QOH

Preface

#"

$hapter # 0ntroducing $alc


Using Spreadsheets in LibreOffice

8hat is Calc9
Calc is the spreadsheet component of LibreOffice. !ou can enter data &usually numerical) in a spreadsheet and then manipulate this data to produce certain results. ,lternati+ely* you can enter data and then use Calc in a L3hat if...M manner by changing some of the data and obser+ing the results ithout ha+ing to retype the entire spreadsheet or sheet. Other features pro+ided by Calc include'

5unctions*

hich can be used to create formulas to perform comple6 calculations on data.

Database functions to arrange* store* and filter data. Dynamic charts gi+ing a ide range of 2D and 3D charts. 4acros for recording and e6ecuting repetiti+e tas0sN scripting languages supported include LibreOffice 7asic* %ython* 7ean/hell* and 1a+a/cript.

,bility to open* edit* and sa+e 4icrosoft D6cel spreadsheets. Import and e6port of spreadsheets in multiple formats* including 2T4L* C/C* %D5* and
%ost/cript.
If you ant to use macros ritten in 4icrosoft D6cel using the C7, macro code in LibreOffice* you must first edit the code in the LibreOffice 7asic IDD editor. 5or more information* see $hapter #9 $alc :acros in this guide or Getting Started Guide $hapter #3 Getting Started with :acros.

?ote

+preadsheets$ sheets$ and cells


Calc or0s ith elements called spreadsheets. /preadsheets consist of a number of indi+idual sheets* each sheet containing cells arranged in ro s and columns. , particular cell is identified by its ro number and column letter. Cells hold the indi+idual elements X te6t* numbers* formulas* and so on X that ma0e up the data to display and manipulate. Dach spreadsheet can ha+e many sheets* and each sheet can ha+e many indi+idual cells. In Calc* each sheet can ha+e a ma6imum of 1*0=-*BEA ro s and a ma6imum of 102= columns.

Calc main dialog


3hen Calc is started* the main indo opens and the +arious parts of this dialog are e6plained belo &5igure 2).
If any part of the Calc indo in 5igure 2 is not sho n* you can display it using the Cie menu. 5or e6ample* >iew < +tatus 7ar on the main menu bar ill toggle &sho or hide) the /tatus 7ar. It is not al ays necessary to display all the parts* as sho nN you can sho or hide any of them as desired.

?ote

,itle bar
The Title bar* located at the top* sho s the name of the current spreadsheet. 3hen the spreadsheet is ne ly created* its name is Untitled ;* here ; is a number. 3hen you sa+e a spreadsheet for the first time* you are prompted to enter a name of your choice.

$hapter # 0ntroducing $alc

#&

'igure 9: $alc main dialog

4enu bar
$nder the Title bar is the 4enu bar. 3hen you choose one of the menus* a sub.menu appears ith other options. !ou can also modify 4enu bar* see $hapter #" Setting Up and $ustomi1ing $alc in this guide and Getting Started Guide $hapter #" $ustomi1ing LibreOffice for more information.

File X contains commands that apply to the entire documentN for e6ample Open* Save*
<i1ards* )*port as PD'* Print= Digital Signatures and so on.

#dit X contains commands for editing the documentN for e6ample Undo* $op2* $hanges*
'ill* Plug!in and so on.

>iew A contains commands for modifying ho the Calc user interface loo0sN for e6ample
(oolbars* $olumn > 3ow +eaders* 'ull Screen* ?oom and so on.

nsert X contains commands for inserting elements into a spreadsheetN for e6ample $ells* 3ows* $olumns* Sheets* Picture and so on. Page* St2les and 'ormatting* ,lignment and so on.

Format X contains commands for modifying the layout of a spreadsheetN for e6ample $ells* ,ools X contains +arious functions to help you chec0 and customiFe your spreadsheet* for
e6ample Spelling* Share Document* Galler2* :acros and so on.

%ata X contains commands for manipulating data in your spreadsheetN for e6ample Define
3ange* Sort* $onsolidate and so on.

8indow X contains commands for the display indo N for e6ample @ew <indow* Split and
so on.

;elp X contains lin0s to the help system included ith the soft are and other
miscellaneous functionsN for e6ample +elp* License 0nformation* $hec4 for Updates and so on.

$hapter # 0ntroducing $alc

#A

,oolbars
The default setting hen Calc opens is for the /tandard and 5ormatting toolbars to be doc0ed at the top of the or0space &5igure 2). Calc toolbars can be either doc0ed and fi6ed in place* or floating allo ing you to mo+e a toolbar into a more con+enient position on your or0space. Doc0ed toolbars can be undoc0ed and mo+ed to different doc0ed position on the or0space or undoc0ed to become a floating toolbar. Toolbars that are floating hen opened can be doc0ed into a fi6ed position on your or0space. To display* hide* mo+e* create floating toolbars and for more information on toolbars* see the Getting Started Guide $hapter # 0ntroducing LibreOffice. The default set of icons &sometimes called buttons) on toolbars pro+ide a ide range of common commands and functions. !ou can also remo+e or add icons to toolbars* see the $hapter #"= Setting Up and $ustomi1ing $alc in this guide and the Getting Started Guide $hapter #" $ustomi1ing LibreOffice for more information. %lacing the mouse cursor o+er any of the icons displays a small bo6 called a tooltip. It gi+es a brief e6planation of the icon function. 5or a more detailed e6planation* go to ;elp < 8hats ,his9 on the main menu bar and ho+er the mouse pointer o+er the icon. To close a tooltip* clic0 once a ay from the icon or press the )sc 0ey. Tips and e6tended tips can be turned on or off from ,ools < =ptions < 2ibre=ffice < (eneral on the main menu bar.

Formula 7ar
The 5ormula 7ar is located at the top of the sheet in your Calc or0space. The 5ormula 7ar is permanently doc0ed in this position and cannot be used as a floating toolbar. If the 5ormula 7ar is not +isible* go to >iew < Formula 7ar on the main menu bar.

'igure 3: 'ormula Bar "oing from left to right and referring to 5igure 3* the 5ormula 7ar consists of the follo ing'

?ame 7o. X gi+es the cell reference using a combination of a letter and number* for
e6ample ,1. The letter indicates the column and the number indicates the ro of the selected cell.

Function 8i5ard

X opens a dialog from hich you can search through a list of a+ailable functions. This can be +ery useful because it also sho s ho the functions are formatted. X clic0ing on the /um icon totals the numbers in the cells abo+e the selected cell and then places the total in the selected cell. If there are no numbers abo+e the selected cell* then the cells to the left are totaled. X clic0ing on the 5unction icon inserts an e@uals &Y) sign into the selected cell and the nput line allo ing a formula to be entered. nput line X displays the contents of the selected cell &data* formula* or function) and allo s you to edit the cell contents. To edit inside the Input line area* clic0 in the area* then type your changes. To edit ithin the current cell* Gust double.clic0 in the cell. cell. 3hen you enter ne data into a cell* the /um and 5unction icons change to Cancel and Accept icons .

+um

Function

!ou can also edit the contents of a cell directly in the cell itself by double.clic0ing on the

$hapter # 0ntroducing $alc

#-

?ote

In a spreadsheet the term function co+ers much more than Gust mathematical functions. /ee $hapter A Using 'ormulas and 'unctions in this guide for more information.

+preadsheet layout
ndividual cells
The main section of the screen displays the cells in the form of a grid* ith each cell being at the intersection of a column and a ro . ,t the top of the columns and the left end of the ro s are a series of header bo6es containing letters and numbers. The column headers use an alpha character starting at , and go on to the right. The ro headers use a numerical character starting at 1 and go do n. These column and ro headers form the cell references that appear in the #ame 7o6 on the 5ormula 7ar &5igure 3). If the headers are not +isible on your spreadsheet* go to >iew < Column B 3ow ;eaders on the main menu bar.

!"eet tabs
In Calc you can ha+e more than one sheet in a spreadsheet. ,t the bottom of the grid of cells in a spreadsheet are sheet tabs indicating ho many sheets there are in your spreadsheet. Clic0ing on a tab enables access to each indi+idual sheet and displays that sheet. ,n acti+e sheet is indicated ith a hite tab &default Calc setup). !ou can also select multiple sheet by holding do n the $trl 0ey hile you clic0 on the sheet tabs. To change the default name for a sheet &/heet1* /heet2* and so on)' 1) Hight.clic0 on the sheet tab and select 3ename +heet from the conte6t menu. , dialog opens allo ing you to type in a ne name for the sheet. 2) Clic0 =6 hen finished to close the dialog. To change the color of a sheet tab' 1) Hight.clic0 on the sheet tab and select ,ab Color from the conte6t menu to open the Tab Color dialog &5igure =). 2) /elect your color and clic0 =6 hen finished to close the dialog.

'igure ": (ab $olor dialog

$hapter # 0ntroducing $alc

#.

3) To add ne colors to this color palette* see the Getting Started Guide $hapter #" $ustomi1ing LibreOffice for more information.

!tatus bar
The Calc status bar &5igure B) pro+ides information about the spreadsheet and con+enient ays to @uic0ly change some of its features. 4ost of the fields are similar to those in other components of LibreOfficeN see $hapter # 0ntroducing LibreOffice in this guide and the $alc Guide $hapter # 0ntroducing $alc for more information.

'igure %: $alc status bar The +arious fields on the /tatus 7ar* from left to right* are as follo s. +heet se@uence number /ho s the se@uence number of the current sheet and the total number of sheets in the spreadsheet. The se@uence number may not be the same as the name on the sheet tab if sheets ha+e been mo+ed. Double.clic0 on this Fone to open the #a+igator. Page style /ho s the page style of the current sheet. To edit the page style* double.clic0 on this field and the %age /tyle dialog opens. nsert mode /ho s the type of insert mode the program is in. %ress the 0ns 0ey to change modes. This field is blan0 if the program is in insert mode and Overwrite sho s hen in o+er rite mode. +election mode Clic0 to open a conte6t menu and toggle bet een Standard selection* )*tended selection* ,dding selection or Bloc4 selection. The icon does not change hen different selection modes are selected* but the tooltip sho s the current status.

Standard selection X clic0 in te6t or cell here you ant to position the cursor and ma0e the
cell acti+e. ,ny other selection is then deselected.

)*tend selection X clic0ing in the te6t either e6tends or crops the current selection. ,dding selection X a ne selection is added to an e6isting selection. The result is a multiple
selection.

Bloc4 selection X a bloc0 of te6t can be selected.


*nsaved changes This icon indicates if there are any unsa+ed changes that ha+e not been sa+ed. Double.clic0 this icon or use File < +ave to sa+e the spreadsheet. %igital signature If the document has been digitally signed* an icon sho s here. !ou can double.clic0 the icon to +ie the certificate. /ee $hapter & Printing= )*porting= and )!mailing in this guide for more information about digital signatures. , document can only be digitally signed after it has been sa+ed.
$hapter # 0ntroducing $alc 98

Cell or obCect information Displays information rele+ant to the position of the cursor or the selected element of the spreadsheet. 3hen a group of cells is selected* the sum of the contents is displayed by default. Hight.clic0 on this field and select other functions* such as the a+erage +alue* ma6imum +alue* minimum +alue* or count &number of items selected). Doom slider Drag the Foom slider* or clic0 the E and A signs to change the +ie magnification. Doom percentage Indicates the magnification le+el of the document. Hight.clic0 on the percentage figure to open a list of magnification +alues from hich to choose. Double.clic0ing on this percentage figure opens the Doom B >iew 2ayout dialog.

Creating$ opening and saving spreadsheets


Creating and opening
Creating and opening spreadsheets is identical to creating and opening documents to the other modules ithin LibreOffice. 5or more information on creating and opening spreadsheets* see the Getting Started Guide $hapter # 0ntroducing LibreOffice.

*sing templates
Calc documents can also be created from templates. 5or information on ho to create and use templates* see the Getting Started Guide $hapter 3 Using St2les and (emplates and $hapter " Using St2les and (emplates in $alc in this guide.

=pening C+> files


Comma.separated.+alues &C/C) files are spreadsheet files in a te6t format here cell contents are separated by a character* for e6ample comma* semi.colon* and so on. Dach line in a C/C te6t file represents a ro in a spreadsheet. Te6t is entered bet een @uotation mar0sN numbers are entered ithout @uotation mar0s. To open a C/C file in Calc' 1) Choose File < =pen on the main menu bar and locate the C/C file that you ant to open. 2) /elect the file and clic0 =pen. 7y default* a C/C file has the e6tension .csv. 2o e+er* some C/C files may ha+e a .txt e6tension. 3) The ,e.t mport dialog &5igure A) opens allo ing you to select the +arious options a+ailable hen importing a C/C file into a Calc spreadsheet. =) Clic0 =6 to open and import the file. The +arious options for importing C/C files into a Calc spreadsheet are as follo s'

mport

$haracter Set X specifies the character set to be used in the imported file. Language X determines ho the number strings are imported. If Language is set to Default for C/C import* Calc ill use the globally set language. If Language is set to a specific language* that language ill be used hen importing numbers. 'rom 3ow X specifies the ro here you ant to start the import. The ro s are +isible in the pre+ie indo at the bottom of the dialog.

$hapter # 0ntroducing $alc

9#

'igure &: (e*t 0mport dialog

+eparator =ptions X specifies hether your data uses separators or fi6ed idths as
delimiters.

'i*ed width X separates fi6ed. idth data &e@ual number of characters) into columns. Clic0 on the ruler in the pre+ie indo to set the idth. Separated b2 X select the separator used in your data to delimit the data into columns. 3hen you select Other* you specify the character used to separate data into columns. This custom separator must also be contained in your data. :erge delimiters X combines consecuti+e delimiters and remo+es blan0 data fields. (e*t delimiter X select a character to delimit te6t data.

=ther options Cuoted fields as te*t X hen this option is enabled* fields or cells hose +alues are
@uoted in their entirety &the first and last characters of the +alue e@ual the te6t delimiter) are imported as te6t.

Detect special numbers X hen this option is enabled* Calc ill automatically detect all number formats* including special number formats such as dates* time* and scientific notation. The selected language also influences ho such special numbers are detected* since different languages and regions many ha+e different con+entions for such special numbers. 3hen this option is disabled* Calc ill detect and con+ert only decimal numbers. The rest* including numbers formatted in scientific notation* ill be imported as te6t. , decimal number string can ha+e digits 0.<* thousands separators* and a decimal separator. Thousands separators and decimal separators may +ary ith the selected language and region.
99

$hapter # 0ntroducing $alc

Fields X sho s ho your data ill loo0 hen it is separated into columns. $olumn t2pe X select a column in the pre+ie indo and select the data type to be
applied to the imported data.

Standard X Calc determines the type of data. (e*t X imported data are treated as te6t. US )nglish X numbers formatted in $/ Dnglish are searched for and included regardless of the system language. , number format is not applied. If there are no $/ Dnglish entries* the Standard format is applied. +ide X the data in the column are not imported.

+aving spreadsheets
5or information on ho to sa+e files manually or automatically* see the Getting Started Guide $hapter # 0ntroducing LibreOffice. Calc can sa+e spreadsheets in a range of formats and also e6port spreadsheets to %D5* 2T4L and Q2T4L file formatsN see $hapter & Printing= )*porting= and )!mailing in this guide for more information.

+aving in other formats


If you need to e6change files ith users ho are unable to recei+e spreadsheet files in Open Document 5ormat &OD5) &*.ods)* hich Calc uses as default format* you can sa+e a spreadsheet in another format. 1) /a+e your spreadsheet in Calc spreadsheet file format &*.ods).

'igure A. Save dialog


$hapter # 0ntroducing $alc 93

2) /elect File < +ave As on the main menu bar to open the +ave dialog &5igure E). 3) In #ame* if you ish* enter a ne file name for the spreadsheet and select the folder here you ant to sa+e the file. =) In drop.do n menu belo the file bro ser indo * select the type of spreadsheet format you ant to use and clic0 +ave. B) Dach time you clic0 +ave hen you are sa+ing in a format other than OD5 format* the Confirm File Format dialog opens &5igure -). Clic0 *se F...G Format to continue sa+ing in your selected spreadsheet format or clic0 *se =%F Format to sa+e the spreadsheet in Calc OD/ format. A) If you select ,e.t C+> format &*.csv) for your spreadsheet* the #.port ,e.t File dialog &5igure <) opens allo ing you to select the character set* field delimiter* te6t delimiter and so on to be used for your C/C file.
Once you ha+e sa+ed a spreadsheet in another format* all changes you ma0e to the spreadsheet ill no occur only in the format you are using because you ha+e changed the name and file type of your document. If you ant to go bac0 to or0ing ith an Z.ods +ersion* you must open the spreadsheet again.

?ote

'igure -. $onfirm 'ile 'ormat dialog

'igure .. )*port (e*t 'ile dialog


To ha+e Calc sa+e documents by default in a 4icrosoft D6cel file format* go to ,ools < =ptions < 2oadH+ave < (eneral. In the section named Default file format and OD' settings* under Document t2pe* select +preadsheet* then under ,lwa2s save as* select your preferred file format.

,ip

$hapter # 0ntroducing $alc

9"

Password protection
To protect a spreadsheet and restrict ho can open* read* and ma0e changes to a spreadsheet* you ha+e to use pass ord protection. %ass ord protection is common to all modules ithin LibreOffice and more information can be found in the Getting Started Guide $hapter # 0ntroducing LibreOffice.

?avigating within spreadsheets


Calc pro+ides many ays to na+igate ithin a spreadsheet from cell to cell and sheet to sheet. !ou can generally use the method you prefer.

Cell navigation
3hen a cell is selected or in focus* the cell borders are emphasiFed. 3hen a group of cells is selected* the cell area is colored. The color of the cell border emphasis and the color of a group of selected cells depends on the operating system being used and ho you ha+e set up LibreOffice.

*sing the mouse X place the mouse pointer o+er the cell and clic0 the left mouse button.
To mo+e the focus to another cell using the mouse* simply mo+e the mouse pointer to the cell here you ant the focus to be and clic0 the left mouse button.

*sing a cell reference X highlight or delete the e6isting cell reference in the #ame 7o6 on
the 5ormula 7ar &5igure 3 on page 1-). Type the ne cell reference of the cell you ant to mo+e to and press )nter 0ey. Cell references are case insensiti+e' for e6ample* typing a3 or ,3 ill mo+e the focus to cell ,3.

*sing the ?avigator X clic0 on the ?avigator icon

on the /tandard toolbar or press the '% 0ey to open the ?avigator dialog &5igure 10). Type the cell reference into the Column and Ho fields and press the )nter 0ey.

'igure #8: @avigator dialog in $alc

*sing the #nter key X pressing )nter mo+es the cell focus do n in a column to the ne6t
ro . %ressing Shift5)nter mo+es the focus up in a column to the ne6t ro .

*sing the ,ab key X pressing (ab mo+es the cell focus right in a ro to the ne6t column.
%ressing Shift5(ab mo+es the focus to the left in a ro to the ne6t column.
$hapter # 0ntroducing $alc 9%

*sing the arrow keys X pressing the arro 0eys on the 0eyboard mo+es the cell focus in
the direction of the arro pressed.

*sing ;ome$ #nd$ Page *p and Page %own +ome mo+es the cell focus to the start of a ro . )nd mo+es the cell focus to the last cell on the right in the ro that contains data. Page Down mo+es the cell focus do n one complete screen display. Page Up mo+es the cell focus up one complete screen display.

+heet navigation
Dach sheet in a spreadsheet is independent of the other sheets* though references can be lin0ed from one sheet to another. There are three ays to na+igate bet een different sheets in a spreadsheet.

*sing the ?avigator X hen the #a+igator is open &5igure 10)* double.clic0ing on any of
the listed sheets selects the sheet.

*sing the keyboard X using 0ey combinations $trl5Page Down mo+es one sheet to the
right and $trl5Page Up mo+es one sheet to the left.

*sing the mouse X clic0ing on one of the sheet tabs at the bottom of the spreadsheet
selects that sheet. If there are a lot of sheets in your spreadsheet* then some of the sheet tabs may be hidden behind the horiFontal scroll bar at the bottom of the screen. If this is the case* using the four buttons to the left of the sheet tabs can mo+e the tabs into +ie &5igure 11).

'igure ##. @avigating sheet tabs

?ote

The sheet tab arro s that appear in 5igure 11 are only acti+e if there are sheet tabs that cannot be seen. 3hen you insert a ne sheet into your spreadsheet* Calc automatically uses the ne6t number in the numeric se@uence as a name. Depending on hich sheet is open hen you insert a ne sheet* your ne sheet may not be in numerical order. It is recommended to rename sheets in your spreadsheet to ma0e them more recogniFable.

?ote

$hapter # 0ntroducing $alc

9&

6eyboard navigation
%ressing a 0ey or a combination of 0eys allo s you to na+igate a spreadsheet using the 0eyboard. , 0ey combination is here you press more than one 0ey together* for e6ample $trl5+ome 0ey combination to mo+e to cell ,1. Table 2 lists the 0eys and 0ey combinations you can use for spreadsheet na+igation in Calc. (able 9: De2board cell navigation #e$board s"ortcut
$trl5

Cell navi%ation
4o+es cell focus right one cell 4o+es cell focus left one cell 4o+es cell focus up one cell 4o+es cell focus do n one cell 4o+es cell focus to the first column on the right containing data in that ro if cell focus is on a blan0 cell. 4o+es cell focus to the last column on the right containing data in that ro if cell focus is on a cell containing data. 4o+es cell focus to the last column on the right in the spreadsheet if there are no more cells containing data.

$trl5

4o+es cell focus to the last column on the left containing data in that ro if cell focus is on a blan0 cell. 4o+es cell focus to the first column on the left containing data in the spreadsheet if cell focus is on a cell containing data. 4o+es cell focus to the first column in that ro if there are no more cells containing data.

$trl5

4o+es cell focus from a blan0 cell to the first cell abo+e containing data in the same column. 4o+es cell focus from a cell containing data to the cell in Ho 1 in the same column.

$trl5

4o+es cell focus from a blan0 cell to the first cell belo containing data in the same column. 4o+es cell focus from a cell containing data to the last cell containing data in the same column. 4o+es cell focus from the last cell containing data to the cell in the same column in the last ro of the spreadsheet.

$trl5+ome $trl5)nd

4o+es cell focus from any here on the spreadsheet to Cell ,1 on the same sheet. 4o+es cell focus from any here on the spreadsheet to the last cell in the lo er right.hand corner of the rectangular area of cells containing data on the same sheet. 4o+es cell focus one screen to the right &if possible). 4o+es cell focus one screen to the left &if possible). 4o+es cell focus to the same cell on the ne6t sheet to the right in sheet tabs if the spreadsheet has more than on sheet.

,lt5Page Down ,lt5Page Up $trl5Page Down

$hapter # 0ntroducing $alc

9A

#e$board s"ortcut
$trl5Page Up (ab Shift5(ab )nter Shift5)nter

Cell navi%ation
4o+es cell focus to the same cell on the ne6t sheet to the left in sheet tabs if the spreadsheet has more than on sheet. 4o+es cell focus to the ne6t cell on the right 4o+es cell focus to the ne6t cell on the left Do n one cell &unless changed by user) $p one cell &unless changed by user)

Customi5ing the #nter key


!ou can choose the direction in hich the )nter 0ey mo+es the cell focus by going to ,ools < =ptions < 2ibre=ffice Calc < (eneral. /elect the direction cell focus mo+es from the drop.do n list. Depending on the file being used or the type of data being entered* setting a different direction can be useful. The )nter 0ey can also be used to s itch into and out of editing mode. $se the first t o options under 0nput settings in 5igure 12 to change the )nter 0ey settings.

'igure #9: $ustomi1ing the )nter 4e2

+electing items in a sheet or spreadsheet


+electing cells
!in%le cell
Left.clic0 in the cell. !ou can +erify your selection by loo0ing in the #ame 7o6 on the 5ormula 7ar &5igure 3 on page 1-).

&an%e of conti%uous cells


, range of cells can be selected using the 0eyboard or the mouse. To select a range of cells by dragging the mouse cursor' 1) Clic0 in a cell. 2) %ress and hold do n the left mouse button. 3) 4o+e the mouse around the screen. =) Once the desired bloc0 of cells is highlighted* release the left mouse button.

$hapter # 0ntroducing $alc

9-

To select a range of cells ithout dragging the mouse' 1) Clic0 in the cell hich is to be one corner of the range of cells. 2) 4o+e the mouse to the opposite corner of the range of cells. 3) 2old do n the Shift 0ey and clic0.
!ou can also select a contiguous range of cells by first clic0ing in the +election mode field on the /tatus 7ar &5igure B on page 20) and selecting #.tending selection before clic0ing in the opposite corner of the range of cells. 4a0e sure to change bac0 to +tandard selection or you may find yourself e6tending a cell selection unintentionally.

,ip

To select a range of cells ithout using the mouse' 1) /elect the cell that ill be one of the corners in the range of cells. 2) 3hile holding do n the Shift 0ey* use the cursor arro s to select the rest of the range.
!ou can also directly select a range of cells using the #ame 7o6. Clic0 into the #ame 7o6 on the 5ormula 7ar &5igure 3 on page 1-). To select a range of cells* enter the cell reference for the upper left.hand cell* follo ed by a colon &')* and then the lo er right.hand cell reference. 5or e6ample* to select the range that ould go from ,3 to CA* you ould enter ,3:$&.

,ip

&an%e of non'conti%uous cells


1) /elect the cell or range of cells using one of the methods abo+e. 2) 4o+e the mouse pointer to the start of the ne6t range or single cell. 3) 2old do n the Ctrl 0ey and clic0 or clic0.and.drag to select another range of cells to add to the first range. =) Hepeat as necessary.

+electing columns and rows


!in%le colu(n or row
To select a single column* clic0 on the column header &5igure 2 on page 1E). To select a single ro * clic0 on the ro header.

Multiple colu(ns or rows


To select multiple columns or ro s that are contiguous' 1) Clic0 on the first column or ro in the group. 2) 2old do n the Shift 0ey. 3) Clic0 the last column or ro in the group. To select multiple columns or ro s that are not contiguous' 1) Clic0 on the first column or ro in the group. 2) 2old do n the $trl 0ey. 3) Clic0 on all of the subse@uent columns or ro s hile holding do n the Ctrl 0ey.

$hapter # 0ntroducing $alc

9.

Entire s"eet
To select the entire sheet* clic0 on the small bo6 bet een the column headers and the ro headers &5igure 13)* or use the 0ey combination $trl5, to select the entire sheet* or go to #dit on the main menu bar and select +elect All.

'igure #3. Select ,ll bo*

+electing sheets
!ou can select either one or multiple sheets in Calc. It can be ad+antageous to select multiple sheets* especially hen you ant to ma0e changes to many sheets at once.

!in%le s"eet
Clic0 on the sheet tab for the sheet you ant to select. The tab for the selected sheet becomes hite &default Calc setup).

Multiple conti%uous s"eets


To select multiple contiguous sheets' 1) Clic0 on the sheet tab for the first desired sheet. 2) 4o+e the mouse pointer o+er the sheet tab for the last desired sheet. 3) 2old do n the Shift 0ey and clic0 on the sheet tab. =) ,ll tabs bet een these t o selections ill turn hite &default Calc setup). ,ny actions that you perform ill no affect all highlighted sheets.

Multiple non'conti%uous s"eets


To select multiple non.contiguous sheets' 1) Clic0 on the sheet tab for the first desired sheet. 2) 4o+e the mouse pointer o+er the sheet tab for the second desired sheet. 3) 2old do n the $trl 0ey and clic0 on the sheet tab. =) Hepeat as necessary. B) The selected tabs ill turn hite &default Calc setup). ,ny actions that you perform affect all highlighted sheets.

ill no

)ll s"eets
Hight.clic0 a sheet tab and choose +elect All +heets from the conte6t menu.

$hapter # 0ntroducing $alc

38

8orking with columns and rows


nserting columns and rows
3hen you insert a column* it is inserted to the left of the highlighted column. 3hen you insert a ro * it is inserted above the highlighted ro . 3hen you insert columns or ro s* the cells ta0e the formatting of the corresponding cells in the ne6t column to left or the ro abo+e.

?ote

!in%le colu(n or row


$sing the nsert menu' 1) /elect a cell* column* or ro here you ant the ne column or ro inserted. 2) "o to nsert on the main menu bar and select either nsert < Columns or nsert < 3ows. $sing the mouse' 1) /elect a column or ro here you ant the ne column or ro inserted. 2) Hight.clic0 the column or ro header. 3) /elect nsert Columns 2eft or nsert 3ows Above from the conte6t menu.

Multiple colu(ns or rows


4ultiple columns or ro s can be inserted at once rather than inserting them one at a time. 1) 2ighlight the re@uired number of columns or ro s by holding do n the left mouse button on the first one and then dragging across the re@uired number of identifiers. 2) %roceed as for inserting a single column or ro abo+e.

%eleting columns and rows


!in%le colu(n or row
To delete a single column or ro ' 1) /elect a cell in the column or ro you ant to delete*. 2) "o to #dit on the main menu bar and select %elete Cells or right.clic0 and select %elete from the conte6t menu. 3) /elect the option you re@uire from the %elete Cells dialog &5igure 1=).

'igure #": Delete $ells dialog ,lternati+ely' 1) Clic0 in the column or header to select the column or ro . 2) "o to #dit on the main menu bar and select %elete Cells or right.clic0 and select %elete +elected Columns or %elete +elected 3ows from the conte6t menu.
$hapter # 0ntroducing $alc 3#

Multiple colu(ns or rows


To delete multiple columns or ro s' 1) /elect the columns or ro s* see J4ultiple columns or ro sK on page 2< for more information. 2) "o to #dit on the main menu bar and select %elete Cells* or right.clic0 and select %elete from the conte6t menu* or right.clic0 in the column or ro header and select %elete +elected Columns or %elete +elected 3ows from the conte6t menu.

8orking with sheets


nserting new sheets
Clic0 on the Add +heet icon . This inserts a ne sheet after the last sheet in the spreadsheet ithout opening the nsert +heet dialog. The follo ing methods open the nsert +heet dialog &5igure 1B) here you can position the ne sheet* create more than one sheet* name the ne sheet* or select a sheet from a file.

/elect the sheet here you ant to insert a ne sheet* then go to nsert < +heet on the
main menu bar.

Hight.clic0 on the sheet tab here you ant to insert a ne sheet and select nsert +heet
from the conte6t menu.

Clic0 in the empty space at the end of the sheet tabs. Hight.clic0 in the empty space at the end of the sheet tabs and select nsert +heet from
the conte6t menu.

'igure #%: 0nsert Sheet dialog

4oving and copying sheets


!ou can mo+e or copy sheets ithin the same spreadsheet by dragging and dropping or using the 4oveHCopy +heet dialog &5igure 1A). To mo+e or copy a sheet into a different spreadsheetN you ha+e to use the 4oveHCopy +heet dialog.

$hapter # 0ntroducing $alc

39

*ra%%in% and droppin%


To mo+e a sheet to a different position ithin the same spreadsheet* clic0 on the sheet tab and drag it to its ne position before releasing the mouse button. To copy a sheet ithin the same spreadsheet* hold do n the $trl 0ey &Option 0ey on 4ac) then clic0 on the sheet tab and drag it to its ne position before releasing the mouse button. The mouse pointer may change to include a plus sign depending on the setup of your operating system.

'igure #&: :ove $op2 Sheet dialog

+sin% Move,Cop$ !"eet dialo%


The 4oveHCopy +heet dialog allo s you to specify e6actly hether you ant the sheet in the same or a different spreadsheet* its position ithin the spreadsheet* the sheet name hen you mo+e or copy the sheet. 1) In the current document* right.clic0 on the sheet tab you ish to mo+e or copy and select 4oveHCopy +heet from the conte6t menu or go to #dit < +heet < 4oveHCopy on the main menu bar. 2) /elect 4ove to mo+e the sheet or Copy to copy the sheet. 3) /elect the spreadsheet here you ant the sheet to be placed from the drop.do n list in ,o document. This can be the same spreadsheet* another spreadsheet already open* or you can create a ne spreadsheet. =) /elect the position in nsert before here you ant to place the sheet. B) Type a name in the ?ew name te6t bo6 if you ant to rename the sheet hen it is mo+ed or copied. If you do not enter a name* Calc creates a default name &/heet 1* /heet 2* and so on). A) Clic0 =6 to confirm the mo+e or copy and close the dialog.

?ote

3hen you mo+e or copy to another spreadsheet or a ne spreadsheet* a conflict may occur ith formulas lin0ed to other sheets in the pre+ious location.

$hapter # 0ntroducing $alc

33

%eleting sheets
To delete a single sheet* right.clic0 on the sheet tab you ant to delete and select %elete +heet from the conte6t menu* or go to #dit < +heet < %elete on the main menu bar. Clic0 Ies to confirm the deletion. To delete multiple sheets* select the sheets &see J/electing sheetsK on page 30)* then right.clic0 one of the sheet tabs and select %elete +heet from the conte6t menu* or go to #dit < +heet < %elete on the main menu bar. Clic0 Ies to confirm the deletion.

3enaming sheets
7y default* the name for each ne sheet added is Sheet;* here ; is the number of the ne6t sheet to be added. 3hile this or0s for a small spreadsheet ith only a fe sheets* it can become difficult to identify sheets hen a spreadsheet contains many sheets.. !ou can rename a sheet using one of the follo ing methods'

Dnter the name in the ?ame te6t bo6 hen you create the sheet using the Insert /heet
dialog &5igure 1B on page 32).

Hight.clic0 on a sheet tab and select 3ename +heet from the conte6t menu to replace the
e6isting name ith a different one.

Double.clic0 on a sheet tab to open the 3ename +heet dialog.


/heet names must start ith either a letter or a numberN other characters including spaces are not allo ed. ,part from the first character of the sheet name* permitted characters are letters* numbers* spaces* and the underscore character. ,ttempting to rename a sheet ith an in+alid name ill produce an error message.

?ote

>iewing Calc
Changing document view
$se the Foom function to sho more or fe er cells in the indo hen you are or0ing on a spreadsheet. 5or more about Foom* see the Getting Started Guide $hapter # 0ntroducing LibreOffice.

Free5ing rows and columns


5reeFing loc0s a number of ro s at the top of a spreadsheet or a number of columns on the left of a spreadsheet or both ro s and columns. Then* hen mo+ing around ithin a sheet* the cells in froFen ro s and columns al ays remain in +ie . 5igure 1E sho s some froFen ro s and columns. The hea+ier horiFontal line bet een ro s 3 and 23 and the hea+ier +ertical line bet een columns 5 and I indicate that ro s 1 to 3 and columns , to 5 are froFen. The ro s bet een 3 and 23 and the columns bet een 5 and I ha+e been scrolled off the page. 1) Clic0 on the ro header belo the ro s you ant the freeFe or clic0 on the column header to the right of the columns here you ant the freeFe. 2) "o to 8indow on the main menu bar and select Free5e. , hea+ier line appears bet een the ro s or columns indicating here the freeFe has been placed.

$hapter # 0ntroducing $alc

3"

'igure #A. 'ro1en rows and columns

*nfree5ing
To unfreeFe ro s or columns* go to 8indow on the main menu bar and unchec0 Free5e. The hea+ier lines indicating freeFing ill disappear.

+plitting the screen


,nother ay to change the +ie is by splitting the screen your spreadsheet is displayed in &also 0no n as splitting the indo ). The screen can be split horiFontally* +ertically* or both* gi+ing you up to four portions of the spreadsheet in +ie at any one time. ,n e6ample of splitting the screen is sho n in 5igure 1- here a split is indicated by a blac0 line. 3hy ould you ant to do this> 5or e6ample* a large spreadsheet in hich one cell has a number in it that is used by three formulas in other cells. $sing the split.screen techni@ue* you can position the cell containing the number in one section and each of the cells ith formulas in the other sections. This allo s you to change the number in one cell and atch ho it affects each of the formulas.

'igure #-. Split screen e*ample

!plittin% "ori-ontall$ or verticall$


1) Clic0 on the ro header belo the ro s here you ant to split the screen horiFontally or clic0 on the column header to the right of the columns here you ant to split the screen +ertically. 2) "o to 8indow on the main menu bar and select +plit. , thic0 line appears bet een the ro s or columns indicating here the split has been placed. ,n e6ample of a split line is sho n belo Ho 2 in 5igure 1-. 3) ,lternati+ely for a horiFontal split* clic0 on the thic0 blac0 line at the top of the +ertical scroll bar &5igure 1<) and drag the split line belo the ro here you ant the horiFontal split positioned. =) ,lternati+ely for a +ertical split* clic0 on the thic0 blac0 line at the right of the horiFontal scroll bar &5igure 1<) and drag the split line to the right of the column here you ant the +ertical split positioned.

$hapter # 0ntroducing $alc

3%

'igure #.. Split screen bars

!plittin% "ori-ontall$ and verticall$


1) Clic0 into the cell that is immediately belo the ro s here you ant to split the screen horiFontally and immediately to the right of the columns here you ant to split the screen +ertically. 2) "o to 8indow on the main menu bar and select +plit. , thic0 line appears bet een the ro s or columns indicating here the split has been placed. ,n e6ample of a split line is sho n belo Ho 2 in 5igure 1-.

&e(ovin% split views


To remo+e a split +ie * do any of the follo ing'

Double.clic0 on each split line. Clic0 on and drag the split lines bac0 to their places at the ends of the scroll bars. "o to 8indow on the main menu bar and unchec0 +plit.

*sing the ?avigator


The #a+igator &5igure 20)* that is a+ailable in all LibreOffice modules* pro+ides tools and methods to mo+e @uic0ly through a spreadsheet and find specific items. The #a+igator categoriFes and groups spreadsheet obGects hich you can clic0 on to mo+e @uic0ly to that obGect. If an indicator &plus sign or triangle* dependent on computer setup) appears ne6t to a category* at least one obGect in this category e6ists. To open a category and see the list of items* clic0 on the indicator.

'igure 98: @avigator dialog in $alc

$hapter # 0ntroducing $alc

3&

3hen a category is sho ing the list of obGects in it* double.clic0 on an obGect to Gump
directly to that obGect location in the spreadsheet.

ObGects are much easier to find if you ha+e gi+en them recogniFable names hen creating
them* instead of using the LibreOffice default names* such as /heet1* Table1* Table2* and so on. #ote that the default names may not correspond to the actual position of the obGect in the spreadsheet.

The #a+igator in each of the indi+idual LibreOffice modules has a different range of
functions and these functions are further e6plained in the appropriate user guides for each LibreOffice module. To open the #a+igator* do one of the follo ing'

Clic0 the #a+igator icon %ress the '% 0ey.

on the /tandard toolbar.

"o to >iew < ?avigator on the main menu bar. Double.clic0 the sheet number at the left end of the /tatus 7ar.

!ou can doc0 the #a+igator into the main Calc indo or lea+e it as a floating dialog. To doc0 or float the #a+igator* hold do n the $trl 0ey and double.clic0 in an empty area near the icons at the top of the dialog. The controls and tools a+ailable in the #a+igator are as follo s'

Column X enter the column letter and press the )nter 0ey to reposition the cell cursor to
the specified column in the same ro .

3ow X enter a ro number and press the )nter 0ey to reposition the cell cursor to the
specified ro in the same column.

%ata 3ange
cursor.

X specifies the current data range denoted by the position of the cell

+tart #nd

X mo+es to the cell at the beginning of the current data range* hich you can highlight using the Data Hange icon. X mo+es to the cell at the end of the current data range* using the Data Hange icon. X allo s you to sho or hide the contents. hich you can highlight

Contents ,oggle

X toggles the content +ie . Only the selected #a+igator element and its subelements are displayed. Clic0 the icon again to restore all elements for +ie ing. X displays all a+ailable scenarios. Double.clic0 a name to apply that scenario and the result is sho n in the sheet. If the #a+igator displays scenarios* you can access the follo ing commands hen you right.clic0 a scenario entry' Delete X deletes the selected scenario. Properties X opens the Ddit scenario dialog* here you can edit the scenario properties.

+cenarios

%rag 4ode

X opens a submenu for selecting the drag mode. !ou decide hich action is performed hen dragging and dropping an obGect from the #a+igator into a document. Depending on the mode you select* the icon indicates hether a hyperlin0* lin0 or a copy is created. 0nsert as +2perlin4 X inserts a hyperlin0 hen you drag.and.drop an obGect from the #a+igator into a document. !ou can later clic0 the created hyperlin0 to set the cursor and the +ie to the respecti+e obGect. If you insert a hyperlin0 that lin0s to an open document* you need to sa+e the document before you can use the hyperlin0.
3A

$hapter # 0ntroducing $alc

0nsert as Lin4 X creates a lin0 hen you drag.and.drop an obGect from the #a+igator into a document. 0nsert as $op2 X generates a copy hen you drag.and.drop an obGect from the #a+igator into a document.
Hanges* scenarios* pictures* and other obGects are much easier to find if you ha+e gi+en them informati+e names hen creating them* instead of 0eeping the default Calc names* for e6ample "raphics 1* "raphics 2* ObGect 1* and so on. These default names may not correspond to the position of the obGect in the document.

,ip

*sing document properties


To open the %roperties dialog for a document* go to File < Properties on the main menu bar. The %roperties dialog allo s you to set some of the properties of a spreadsheet and the dialog has si6 tabs and these are described as follo s.

(eneral
Contains basic information about the current file.

The te6t bo6 at the top of the dialog displays the file name. Change Password X opens a dialog here you can change the pass ord and is only
acti+e if a pass ord has been set for the file.

,ype X displays the file type for the current document. 2ocation X displays the path and the name of the directory here the file is stored. +i5e X displays the siFe of the current document in bytes. Created X displays the date and time and author hen the file 4odified X displays the date and time and author hen the file LibreOffice file format. the name of the author ho signed the document. as first sa+ed. as last sa+ed in a

%igitally signed X displays the date and the time hen the file as last signed as ell as %igital +ignature X opens the Digital /ignatures dialog here you can manage digital
signatures for the current document.

2ast printed X displays the date and time and user name hen the file as last printed. ,otal editing time X displays the amount of time that the file has been open for editing
since the file as created. The editing time is updated hen you sa+e the file.

3evision number X displays the number of times that the file has been sa+ed. Apply user data X sa+es the full name of the user ith the file. !ou can edit the name by
going to ,ools < =ptions < 2ibre=ffice < *ser %ata on the main menu bar.

3eset X resets the editing time to Fero* the creation date to the current date and time* and
the +ersion number to 1. The modification and printing dates are also deleted.

,emplate X displays the template that as used to create the file.

$hapter # 0ntroducing $alc

3-

%escription
Contains descripti+e information about the spreadsheet.

,itle X enter a title for the document. +ubCect X enter a subGect for the document. !ou can use a subGect to group documents
ith similar contents.

6eywords X enter the ords that you ant to use to inde6 the content of your document.
8ey ords must be separated by commas. , 0ey ord can contain hite space characters or semicolons.

Comments X enter comments to help identify the document.

Custom Properties
,llo s you to assign custom information fields to your document. !ou can change the name type and contents of each ro . The information in the fields ill e6ported as metadata to other file formats. Clic0 Add to add a ne no to the custom properties. Clic0 3eset to delete any additional ro s and reset the default ro s.

+ecurity
/ets the pass ord options for the current document.

=pen file read/only X select to allo this document to be opened in read.only mode only.
This file sharing option protects the document against accidental changes. It is still possible to edit a copy of the document and sa+e that copy ith the same name as the original.

3ecord changes X select to enable recording changes. This is the same as #dit <
Changes < 3ecord on the main menu bar. To protect the recording state ith a pass ord* clic0 Protect and enter a pass ord. Other users of this document can apply their changes* but they cannot disable change recording ithout 0no ing the pass ord.

Protect or *nprotect X protects the change recording state ith a pass ord. If change
recording is protected for the current document* the button is named *nprotect. Clic0 *nprotect and type the correct pass ord to disable the protection.

Font
3hen #mbed fonts in the document is selected* any fonts used in the document ill be embedded into the document. This maybe useful if you are creating a %D5 of your spreadsheet and ant to control ho your spreadsheet ill loo0 on other computer systems.

+tatistics
Displays statistics for the current file.

?umber of sheets X number of sheets in the file. This statistic does not include tables that
ere inserted as OLD obGects.

?umber of cells X number of cells ith content in the file. ?umber of pages X number of pages in the file.

$hapter # 0ntroducing $alc

3.

$hapter 9 )ntering= )diting= and 'ormatting Data

ntroduction
!ou can enter data into Calc in se+eral ays' using the 0eyboard* dragging and dropping using the mouse* the 5ill tool* and selection lists. Calc also pro+ides the ability to enter information into multiple sheets of the same spreadsheet at the same time. ,fter entering data* you can format and display it in +arious ays.

*sing the keyboard


4ost data entry in Calc can be accomplished using the 0eyboard.

?umbers
Clic0 in the cell and type the number using the number 0eys on either the main 0eyboard or the numeric 0eypad.

.e%ative nu(bers
To enter a negati+e number* either type a minus &X) sign in front of the number or enclose the number in parentheses &)* for e6ample &123=). The result for both methods of entry ill be the same* for e6ample .123=.

Leadin% -eroes
To retain a minimum number of characters in a cell hen entering numbers and retain the number format* for e6ample 123= and 0012* leading Feroes ha+e to be added as follo s' 1) 3ith the cell selected* right.clic0 on the cell and select Format Cells from the conte6t menu* or go to Format < Cells on the menu bar* or use the 0eyboard shortcut $trl5# to open the Format Cells dialog &5igure 21).

'igure 9#: 'ormat $ells dialog E @umbers page 2) 4a0e sure the ?umbers page is selected* then select @umber in the $ategor2 list.

$hapter 9 )ntering= )diting= and 'ormatting Data

"9

3) In Options / Leading ?eroes* enter the minimum number of characters re@uired. 5or e6ample* for four characters* enter =. ,ny number less than four characters ill ha+e leading Feroes added* for e6ample 12 becomes 0012. =) Clic0 =6. The number entered retains its number format and any formula used in the spreadsheet ill treat the entry as a number in formula functions. If a number is entered ith leading Feroes* for e6ample 01=-1* by default Calc ill automatically drop the leading 0. To preser+e leading Feroes in a number' 1) Type an apostrophe &?) before the number* for e6ample ?01=-1. 2) 4o+e the cell focus to another cell. The apostrophe is automatically remo+ed* the leading Feroes are retained and the number is con+erted to left.aligned te6t.

.u(bers as text
#umbers can also be con+erted to te6t as follo s' 1) 3ith the cell selected* right.clic0 on the cell and select Format Cells from the conte6t menu* or go to Format < Cells on the menu bar* or use the 0eyboard shortcut $trl5# to open the Format Cells dialog &5igure 21). 2) 4a0e sure the ?umbers page is selected* then select (e*t from the $ategor2 list. 3) Clic0 =6. The number is con+erted to te6t and* by default* is left.aligned. !ou can change the formatting and alignment of any te6t numbers Gust as you ould ith normal te6t.
,ny numbers that ha+e been formatted as te6t in a spreadsheet ill be treated as a Fero by any formulas used in the spreadsheet. 5ormula functions ill ignore te6t entries.

?ote

,e.t
Clic0 in a cell and type the te6t. The te6t is left.aligned by default. Cells can contain se+eral lines of te6t. If you ant to use paragraphs* press $trl5)nter to create another paragraph. On the 5ormula 7ar* you can e6tend the Input Line if you are entering se+eral lines of te6t. Clic0 on the #.tend Formula 7ar icon located on the right of the 5ormula 7ar and the Input Line becomes multi.line* as sho n in 5igure 22. Clic0 the #.tend Formula 7ar icon again to return to a single input line.

'igure 99: )*tended input line on 'ormula Bar

%ate and time


/elect the cell and type the date or time. !ou can separate the date elements ith a slash &() or a hyphen &X) or use te6t* for e6ample 10 Oct 2012. The date format automatically changes to the selected format used by Calc.
$hapter 9 )ntering= )diting= and 'ormatting Data "3

3hen you enter a time* separate time elements ith colons* for e6ample 10'=3'=B. The time format automatically changes to the selected format used by Calc. To change the date or time format used by Calc' 1) 3ith the cell selected* right.clic0 on the cell select Format Cells from the conte6t menu or go to Format < Cells on the menu bar or use the 0eyboard shortcut $trl5# to open the Format Cells dialog &5igure 21). 2) 4a0e sure the ?umbers page is selected* then select Date or (ime from the $ategor2 list. 3) /elect the date or time format you ant to use from the 'ormat list. =) Clic0 =6 to sa+e the changes and close the dialog.

+pecial characters
, special character is a character not normally found on a standard 0eyboard* for e6ample* [ \ ] ^ _ ` a b. To insert a special character' 1) %lace the cursor in the cell here you ant the character to appear. 2) "o to nsert < +pecial CharacterJ on the menu bar to open the /pecial Characters dialog &5igure 23). 3) /elect in order the special characters you ant to insert into the cell. The special characters selected ill appear at the bottom left of the /pecial Characters dialog. The last character selected is sho n on the right of the /pecial Characters dialog along ith its numerical code. =) Clic0 =6 to close the dialog and the special characters are inserted into the selected cell.

?ote

Different fonts include different special characters. If you do not find a particular special character you ant* try changing the 'ont and Subset selection.

'igure 93: Special $haracters dialog

Autocorrection options
Calc automatically applies many changes during data input using autocorrection* unless you ha+e deacti+ated any autocorrect changes. !ou can also undo any autocorrection changes by using the 0eyboard shortcut $trl5? or manually by going bac0 to the change and replacing the autocorrection ith hat you ant to actually see.
$hapter 9 )ntering= )diting= and 'ormatting Data ""

To change the autocorrect options* go to ,ools < AutoCorrect =ptions on the menu bar to open the AutoCorrect dialog &5igure 2=).

'igure 9": ,uto$orrect dialog

3eplace X edits the replacement table for automatically correcting or replacing ords or
abbre+iations in your document.

#.ceptions X specify the abbre+iations or letter combinations that you do not ant
LibreOffice to correct automatically.

=ptions X select the options for automatically correcting errors as you type and then clic0
=6.

2ocali5ed =ptions X specify the ,utoCorrect options for @uotation mar0s and for options
that are specific to the language of the te6t.

3eset X resets modified +alues bac0 to the LibreOffice default +alues.

nserting dashes
Calc pro+ides te6t shortcuts so that you can @uic0ly insert dashes into a cell and these shortcuts are sho n in Table 3. (able 3: 0nserting dashes /ext t"at $ou t$pe
, . 7 &,* space* hyphen* space* 7) , .. 7 &,* space* hyphen* hyphen* space* 7) ,..7 &,* hyphen* hyphen* 7) ,.7 &,* hyphen* 7) , .7 &,* space* hyphen* 7) , ..7 &,* space* hyphen* hyphen* 7)
$hapter 9 )ntering= )diting= and 'ormatting Data

&esult
, X 7 &,* space* en.dash* space* 7) , X 7 &,* space* en.dash* space* 7) ,c7 &,* em.dash* 7) ,.7 &unchanged) , .7 &unchanged) , X7 &,* space* en.dash* 7)
"%

+peeding up data entry


Dntering data into a spreadsheet can be +ery labor.intensi+e* but Calc pro+ides tools for remo+ing some of the drudgery from input. These tools include drag and drop to mo+e or copy contents of one cell to another using a mouse* an ,utoInput tool* the 5ill tool* and selection lists. The 5ill tool and selection lists automate input of repetiti+e material into cells. Calc also has the ability to input information into multiple sheets of the same spreadsheet at the same time.

Auto nput tool


The Auto nput function in Calc automatically completes entries* based on other entries in the same column. The column is scanned up to a ma6imum of 2000 cells or 200 different strings. 3hen te6t is highlighted in a cell* Auto nput can be used as follo s' 1) To accept the completion* press )nter or '9 or the mouse button. 2) To +ie more completions* use the 0ey combinations $trl5(ab to scroll for ard* or $trl5Shift5(ab to scroll bac0 ard. 3) To see a list of all a+ailable Auto nput te6t items for the current column* use the 0eyboard combination ,lt5Down ,rrow. 3hen typing formulas using characters that match pre+ious entries* a 2elp tip ill appear listing the last ten functions used in the 5unction 3iFard from all defined range names and from the content of all label ranges. Auto nput ignores the case sensiti+ity of any data you enter. If* for e6ample* you ha+e ritten UTotalU in a cell* you cannot then enter UtotalU in another cell of the same column ithout first deacti+ating Auto nput. 7y default* Auto nput is acti+ated in Calc. To turn off Auto nput* go to ,ools < Cell Contents on the main menu bar and deselect Auto nput.

'igure 9%: )*amples of using the 'ill tool

Fill tool
!ou can use the Fill tool in Calc to duplicate e6isting content or create a series in a range of cells in your spreadsheet as sho n by the e6amples in 5igure 2B. 1) /elect the cell containing the contents you ant to copy or start the series from. 2) Drag the cursor in any direction or hold do n the Shift 0ey and clic0 in the last cell you ant to fill.

$hapter 9 )ntering= )diting= and 'ormatting Data

"&

3) "o to #dit < Fill on the main menu bar and select the direction in hich you ant to copy or create data &*p* %own* 2eft 3ight* +heet or +eries). , menu option ill be grayed out if it is not a+ailable. ,lternati+ely* you can use a shortcut to fill cells' 1) /elect the cell containing the contents you ant to copy or start the series from. 2) 4o+e the cursor o+er the small selection handle in the bottom right corner of the selected cell. The cursor ill change shape. 3) Clic0 and drag in the direction you ant the cells to be filled* +ertical or horiFontal. If the original cell contained te6t* then the te6t ill automatically be copied. If the original cell contained a number* a series ill be created.

?ote

3hen you are selecting cells so you can use the Fill tool* ma0e sure that none of the cells contain data* e6cept for the cell data you ant to use. 3hen you use the Fill tool* any data contained in selected cells is o+er ritten.

+sin% a fill series


3hen you select a series fill from #dit < Fill < +eries on the menu bar* the 5ill /eries dialog &5igure 2A) opens. 2ere you can select the type of series you ant or create your o n list.

'igure 9&: 'ill Series dialog

%irection X determines the direction of series creation. Down X creates a do n ard series in the selected cell range for the column using the
defined increment to the end +alue.

3ight X creates a series running from left to right ithin the selected cell range using the defined increment to the end +alue. Up X creates an up ard series in the cell range of the column using the defined increment to the end +alue. Left X creates a series running from right to left in the selected cell range using the defined increment to the end +alue.

+eries ,ype X defines the series type. Linear X creates a linear number series using the defined increment and end +alue. Growth X creates a gro th series using the defined increment and end +alue. Date X creates a date series using the defined increment and end date. ,uto'ill X forms a series directly in the sheet. The ,uto5ill function ta0es account of
customiFed lists. 5or e6ample* by entering 1anuary in the first cell* the series is

$hapter 9 )ntering= )diting= and 'ormatting Data

"A

completed using the list defined in 2ibre=ffice < ,ools < =ptions < 2ibre=ffice Calc < +ort 2ists. ,uto5ill tries to complete a +alue series by using a defined pattern. 5or e6ample* a numerical series using 1*3*B is automatically completed ith E*<*11*13N a date and time series using 01.01.<< and 1B.01.<<* an inter+al of fourteen days is used.

*nit of ,ime X in this area you specify the desired unit of time. This area is only acti+e if
the Date option has been selected in +eries ,ype. Da2 X use the Date series type and this option to create a series using se+en days.

<ee4da2 X use the Date series type and this option to create a series of fi+e day sets. :onth X use the Date series type and this option to form a series from the names or abbre+iations of the months. Fear X use the Date series type and this option to create a series of years.

+tart >alue X determines the start +alue for the series. $se numbers* dates or times. #nd >alue X determines the end +alue for the series. $se numbers* dates or times. ncrement X determines the +alue by hich the series of the selected type increases by
each step. Dntries can only be made if the linear* gro th or date series types ha+e been selected.

'igure 9A: Sort Lists dialog

*efinin% a fill series


To define your o n fill series' 1) "o to ,ools < =ptions < 2ibre=ffice Calc < +ort 2ists to open the +ort 2ists dialog &5igure 2E). This dialog sho s any pre+iously defined series in the Lists bo6 on the left and the contents of the highlighted list in the )ntries bo6. 2) Clic0 ?ew and the )ntries bo6 is cleared. 3) Type the series for the ne list in the )ntries bo6 &one entry per line) &5igure 2-). =) Clic0 Add and the ne list ill no appear in the Lists bo6. B) Clic0 =6 to sa+e the ne list and close the dialog.

$hapter 9 )ntering= )diting= and 'ormatting Data

"-

'igure 9-: $reating new sort list

+election lists
/election lists are a+ailable only for te6t and are limited to using only te6t that has already been entered in the same column. 1) /elect a blan0 cell in a column that contains cells ith te6t entries. 2) Hight.clic0 and select +election 2ists from the conte6t menu* or use the 0eyboard shortcut ,lt5G. , drop.do n list appears listing any cell in the same column that either has at least one te6t character or hose format is defined as te6t. 3) Clic0 on the te6t entry you re@uire and it is entered into the selected cell.

4erging and splitting cells


4erging
!ou can select contiguous cells and merge them into one as follo s' 1) /elect the range of contiguous cells you ant merge. 2) Hight clic0 on the selected cells and select 4erge Cells from the conte6t menu* or go to Format < 4erge cells < 4erge cells or 4erge and Center Cells on the menu bar* or clic0 on the 4erge and Center Cells icon on the 5ormatting toolbar. $sing 4erge and Center Cells ill center align any contents in the cells. 3) If the cells contain any data* clic0 Ies on the confirmation dialog that opens to mo+e the data in the hidden cells into the first cell.

?ote

4erging cells can lead to calculation errors if formulas ha+e used in the spreadsheet.

+plitting
!ou can re+erse or split only a cell that as created from se+eral cells by merging. 1) /elect a merged cell. 2) "o to Format < 4erge cells < +plit cells on the menu bar* or right.clic0 and select +plit Cells from the conte6t menu* or clic0 on the 4erge and Center Cells icon on the 5ormatting toolbar. 3) ,ny data in the cell ill remain in the first cell. If the hidden cells did ha+e any contents* before the cells ere merged* then you ha+e to manually mo+e the contents in to the correct cell.

$hapter 9 )ntering= )diting= and 'ormatting Data

".

+haring content between sheets


!ou might ant to enter the same information in the same cell on multiple sheets* for e6ample to set up standard listings for a group of indi+iduals or organiFations. Instead of entering the list on each sheet indi+idually* you can enter the information in se+eral sheets at the same time.

'igure 9.: Select Sheets dialog 1) "o to #dit < +heet < +elect on the menu bar to open the +elect +heets dialog &5igure 2<). 2) /elect the indi+idual sheets here you ant the information to be repeated. 3) Clic0 =6 to select the sheets and the sheet tabs ill change color. =) Dnter the information in the cells on the sheet here you ant the information to first appear and the information ill repeated in the selected sheets. B) Deselect the sheets hen you ha+e finished entering the information that you ant repeated in the sheets.
This techni@ue automatically o+er rites* ithout any arning* any information that is already in the cells on the selected sheets. 4a0e sure you deselect the additional sheets hen you ha+e finished entering the information to be repeated before continuing to enter data into your spreadsheet.

?ote

>alidating cell contents


3hen creating spreadsheets for other people to use* you may ant to ma0e sure they enter data that is +alid or appropriate for the cell. !ou can also use +alidation in your o n or0 as a guide to entering data that is either comple6 or rarely used. 5ill series and selection lists can handle some types of data* but are limited to predefined information. 5or e6ample* a cell may re@uire a date or a hole number ith no alphabetic characters or decimal points* or a cell may not be left empty. Depending on ho +alidation is set up* it can also define the range of contents that can be entered* pro+ide help messages e6plaining the content rules set up for the cell and hat users should do hen they enter in+alid content. !ou can also set the cell to refuse in+alid content* accept it ith a arning* or start a macro hen an error is entered.

%efining validation
To +alidate any ne data entered into a cell' 1) /elect a cell and go to %ata < >alidity on the menu bar to open the Calidity dialog.

$hapter 9 )ntering= )diting= and 'ormatting Data

%8

'igure 38: Halidit2 dialog E $riteria page 2) Define the type of contents that can be entered in that cell using the options gi+en on the tabbed pages for Criteria* nput ;elp and #rror Alert. The options a+ailable are e6plained belo .

Criteria options
/pecify the +alidation rules for the selected cells using the Criteria page in the Calidity dialog as sho n in 5igure 30. 5or e6ample* you can define criteria such as' @umbers between # and #8 or (e*ts that are no more than 98 characters. The options a+ailable on the Criteria page ill depend on drop.do n list. hat has been selected in the Allow

Allow X select a +alidation option for the selected cells from the drop.do n list. ,ll values X no limitation. <hole number X only hole numbers allo ed. Decimal X all numbers correspond to decimal format. Date X all numbers correspond to date format. The entered +alues are formatted the
ne6t time the dialog is called up.

(ime X all numbers correspond to time format. The entered +alues are formatted the ne6t time the dialog is called up. $ell range X allo only +alues that are gi+en in a cell range. The cell range can be specified e6plicitly* or as a named database range* or as a named range. The range may consist of one column or one ro of cells. If you specify a range of columns and ro s* only the first column is used. List X allo only +alues or strings specified in a list. /trings and +alues can be mi6ed. #umbers e+aluate to their +alue* so if you enter the number 1 in the list* the entry 100d is also +alid. (e*t length X entries hose length corresponds to the number of characters that ha+e been set.

Allow blank cells X in conGunction ith ,ools < %etective < 4ark invalid %ata* this
defines that blan0 cells are sho n as in+alid data &disabled) or not sho n &enabled).

+how selection list X sho s a list of all +alid strings or +alues to select from. The list can
also be opened by selecting the cell and pressing $trl5D.

+ort entries ascending X sorts the selection list in ascending order and filters duplicates
from the list. If not chec0ed* the order from the data source is ta0en.

$hapter 9 )ntering= )diting= and 'ormatting Data

%#

+ource X enter the cell range that contains the +alid +alues or te6t. #ntries X enter the entries that ill be +alid +alues or te6t strings. %ata X select the comparati+e operator that you ant to use from the drop.do n list. The
a+ailable operators depend on hat you ha+e selected in the Allow drop.do n list. 5or e6ample* if you select valid range* the 4inimum and 4a.imum input bo6es replace the >alue bo6.

>alue X enter the +alue for the data +alidation option that you selected in the Allow drop.
do n list.

4inimum X enter the minimum +alue for the data +alidation option that you selected in the
Allow drop.do n list.

4a.imum X enter the ma6imum +alue for the data +alidation option that you selected in the
Allow drop.do n list.

nput ;elp options


Dnter the message to be displayed hen the cell or cell range is selected in the spreadsheet &5igure 31).

+how input help when cell is selected X displays the message that you enter in the ,itle
and Contents bo6es hen the cell or cell range is selected in the sheet. If you enter te6t in the ,itle and Contents bo6es and then deselect this option* the te6t ill be lost.

,itle X enter the title to be displayed hen the cell or cell range is selected. nput help X enter the message to be displayed hen the cell or cell range is selected.

'igure 3#: Halidit2 dialog E 0nput +elp page

'igure 39: Halidit2 dialog E )rror ,lert page

$hapter 9 )ntering= )diting= and 'ormatting Data

%9

#rror Alert options


Define the error message that is displayed hen in+alid data is entered in a cell &5igure 32).

+how error message when invalid values are entered X hen selected* displays the
error message that you enter in the Contents area hen in+alid data is entered in a cell.

Action X select the action that you ant to occur hen in+alid data is entered in a cell. Stop X reGects the in+alid entry and displays a dialog that you ha+e to close by clic0ing
=6.

<arning and 0nformation X displays a dialog that can be closed by clic0ing =6 or Cancel. The in+alid entry is only reGected hen you clic0 Cancel. :acro X acti+ates the 7rowse button to open the 4acro dialog here you can select a macro that is e6ecuted hen in+alid data is entered in a cell. The macro is e6ecuted after the error message is displayed.

,itle X enter the title of the macro or the error message that you ant to display hen
in+alid data is entered in a cell.

#rror message X enter the message that you ant to display hen in+alid data is entered
in a cell.

Calc detective
The Detecti+e is a tool ithin Calc that you can use to locate any cells in a spreadsheet that contain in+alid data if the cells are set to accept in+alid data ith a arning. 1) "o to ,ools < %etective < 4ark nvalid %ata on the menu bar to locate any cells containing in+alid data. The Detecti+e function mar0s any cells containing in+alid data. 2) Correct the data so that it becomes +alid. 3) "o to ,ools < %etective < 4ark nvalid %ata on the menu bar again and any cells that ere pre+iously mar0ed as containing in+alid data ha+e the in+alid data mar0 remo+ed.
, +alidity rule is considered part of the format for a cell. If you select %elete All from the Delete Contents dialog &5igure 33)* then it is remo+ed. If you ant to copy a +alidity rule ith the rest of the cell* use #dit < Paste +pecial < Paste Formats or Paste All.

?ote

#diting data
%eleting data
*eletin% data onl$
Data can be deleted from a cell ithout deleting any of the cell formatting. Clic0 in the cell to select it and then press the Delete 0ey.

*eletin% data and for(attin%


Data and cell formatting can be deleted from a cell at the same time. 1) Clic0 in the cell to select it. 2) %ress the Bac4space 0ey* or right.clic0 in the cell and select %elete Contents from the conte6t menu* or go to #dit < %elete Contents) on the menu bar to open the %elete Contents dialog &5igure 33). 2ere you can choose to delete the different aspects of the data in the cell or delete e+erything in the cell.
$hapter 9 )ntering= )diting= and 'ormatting Data %3

'igure 33: Delete $ontents dialog 3) /elect the delete options. =) Clic0 =6 to delete the contents and close the dialog.

3eplacing data
To completely replace data in a cell and insert ne data* select the cell and type in the ne data. The ne data ill replace the data already contained in the cell and ill retain the original formatting used in the cell. ,lternati+ely* clic0 in the Input Line on the 5ormula 7ar then double.clic0 on the data to highlight it completely and type the ne data.

#diting data
/ometimes it is necessary to edit the contents of cell ithout remo+ing all of the data from the cell. 5or e6ample* changing the phrase J/ales in Itr. 2K to J/ales rose in ItrK can be done as follo s.

+sin% t"e 0e$board


1) Clic0 in the cell to select it. 2) %ress the '9 0ey and the cursor is placed at the end of the cell. 3) %ress the Bac4space 0ey to delete any data up to the point here you ant to enter ne data. =) ,lternati+ely* use the 0eyboard arro 0eys to reposition the cursor here you ant to start entering the ne data in the cell* then press the Delete 0ey or Bac4space 0ey to delete any un anted data before typing the ne data. B) 3hen you ha+e finished editing* press the )nter 0ey to sa+e the changes.

?ote

Dach time you select a cell* the contents are displayed in the Input Line on the 5ormula 7ar. $sing the Input Line maybe easier to carry out editing data.

+sin% t"e (ouse


1) Double.clic0 on the cell to select it and place the cursor in the cell for editing. 2) Heposition the cursor to here you ant to start editing the data in the cell. 3) ,lternati+ely* single.clic0 to select the cell* then mo+e the cursor to the Input Line on the 5ormula 7ar and clic0 at the position here you ant to start editing the data in the cell. =) 3hen you ha+e finished* clic0 a ay from the cell to deselect it and your editing changes are sa+ed.
$hapter 9 )ntering= )diting= and 'ormatting Data %"

Paste +pecial function


!ou can use the %aste /pecial function to paste into another cell selected parts of the data in the original cell or cell range* for e6ample its format or the result of its formula.

1aste !pecial dialo%


1) 2) 3) =) /elect a cell or a cell range. "o to #dit < Copy on the menu bar* right.clic0 and select Copy from the conte6t menu. /elect the target cell or cell range. "o to #dit < Paste +pecial from the menu bar* or use the 0eyboard shortcut $trl5Shift5H* or right.clic0 and select Paste +pecial from the conte6t menu to open the %aste /pecial dialog &5igure 3=). B) /elect the options for Selection* Operations* Options and Shift cells. The %aste /pecial options are e6plained belo . A) Clic0 =6 to paste the data into to the target cell or range of cells and close the dialog.

'igure 3": Paste Special dialog

1aste !pecial options +election X select a format for the clipboard contents that you ant to paste. Paste all X pastes all cell contents* comments* formats* and obGects into the current
document.

(e*t X pastes cells containing te6t. @umbers X pastes cells containing numbers. Date > (ime X pastes cells containing date and time +alues. 'ormulas X pastes cells containing formulas. $omments X pastes comments that are attached to cells. If you ant to add the comments to the e6isting cell content* select the ,dd operation. 'ormats X pastes cell format attributes.

$hapter 9 )ntering= )diting= and 'ormatting Data

%%

ObIects X pastes obGects contained ithin the selected cell range. These can be OLD obGects* chart obGects* or dra ing obGects.

=perations X select the operation to apply hen you paste cells into your sheet. @one X does not apply an operation hen you insert the cell range from the clipboard.
The contents of the clipboard ill replace e6isting cell contents.

,dd X adds the +alues in the clipboard cells to the +alues in the target cells. ,lso* if the clipboard only contains comments* adds the comments to the target cells. Subtract X subtracts the +alues in the clipboard cells from the +alues in the target cells. :ultipl2 X multiplies the +alues in the clipboard cells ith the +alues in the target cells. Divide X di+ides the +alues in the target cells by the +alues in the clipboard cells.

=ptions X sets the paste options for the clipboard contents. S4ip empt2 cells X empty cells from the clipboard do not replace target cells. If you use
this option in conGunction ith the :ultipl2 or the Divide operation* the operation is not applied to the target cell of an empty cell in the clipboard. If you select a mathematical operation and deselect the S4ip empt2 cells* empty cells in the clipboard are treated as Feroes. 5or e6ample* if you apply the :ultipl2 operation* the target cells are filled ith Feroes.

(ranspose X the ro s of the range in the clipboard are pasted to become columns of the output range. The columns of the range in the clipboard are pasted to become ro s. Lin4 X inserts the cell range as a lin0* so that changes made to the cells in the source file are updated in the target file. To ensure that changes made to empty cells in the source file are updated in the target file* ensure that the Paste ,ll is also selected. !ou can also lin0 sheets ithin the same spreadsheet. 3hen you lin0 to other files* a DDD lin0 is automatically created. , DDD lin0 is inserted as a matri6 formula and can only be modified as a hole.

+hift cells X set the shift options for the target cells hen the clipboard content is inserted. DonJt shift X inserted cells replace the target cells. Down X target cells are shifted do n ard hen you insert cells from the clipboard. 3ight X target cells are shifted to the right hen you insert cells from the clipboard. 1aste Onl$ options
If you only ant to copy te6t* numbers or formulas to your target cell or cell range' 1) /elect the cell or cell range and copy the data. 2) /elect the target cell or cell range. 3) Hight.clic0 on the target cell or cell range and select Paste =nly from the conte6t menu* then select ,e.t* ?umber or Formula.

nsert cell fields


!ou can insert a field lin0ed to the date* sheet name* or document name in a cell. 1) /elect a cell and double.clic0 to acti+ate edit mode. 2) Hight.clic0 and select nsert Fields < %ate or +heet ?ame or ,itle from the conte6t menu.

?ote

The nsert Fields < ,itle command inserts the name of the spreadsheet and not the title defined in the Description page in the %roperties dialog for the file.

$hapter 9 )ntering= )diting= and 'ormatting Data

%&

,ip

The fields are refreshed hen the spreadsheet is sa+ed or recalculated hen using the $trl5Shift5'. shortcut.

Formatting data
?ote
,ll the settings discussed in this section can also be set as a part of the cell style. /ee $hapter " Using St2les and (emplates in $alc for more information.

The data in Calc can be formatted in se+eral ays. 5ormatting can either be defined as part of a cell style so that it is automatically applied* or it can be applied manually to the cell. 5or more control and e6tra options* select a cell or cell range and use the Format Cells dialog. ,ll of the format options are discussed belo .

4ultiple lines of te.t


4ultiple lines of te6t can be entered into a single cell using automatic rapping or manual line brea0s. Dach method is useful for different situations.

)uto(atic wrappin%
To automatically rap multiple lines of te6t in a cell' 1) /elect a cell or cell range. 2) Hight.clic0 on the selection and select Format Cells from the conte6t menu* or go to Format < Cells on the menu bar* or press $trl5# to open the 5ormat Cells dialog. 3) Clic0 on the ,lignment tab &5igure 3B). =) $nder Properties* select <rap te*t automaticall2 and clic0 =6.

'igure 3%: 'ormat $ells dialog E ,lignment page

$hapter 9 )ntering= )diting= and 'ormatting Data

%A

Manual line brea0s


To insert a manual line brea0 hile typing in a cell* press $trl5)nter. This method does not or0 ith the cursor in the input line. 3hen editing te6t* double.clic0 the cell* then reposition the cursor to here you ant the line brea0. 3hen a manual line brea0 is entered* the cell idth does not change and your te6t may still o+erlap the end of the cell. !ou ha+e to change the cell idth manually or reposition your line brea0 so that your te6t does not o+erlap the end of the cell.

+hrinking te.t to fit a cell


The font siFe of the data in a cell can automatically adGust to fit inside cell borders. 1) /elect a cell or cell range. 2) Hight.clic0 on the selection and select Format Cells from the conte6t menu* or go to Format < Cells on the menu bar* or press $trl5# to open the 5ormat Cells dialog. 3) Clic0 on the ,lignment tab &5igure 3B). =) $nder Properties* select Shrin4 to fit cell si1e and clic0 =6.

Formatting numbers
/e+eral different number formats can be applied to cells by using icons on the 5ormatting toolbar &highlighted in 5igure 3A). /elect the cell* then clic0 the rele+ant icon to change the number format. 5or more control or to select other number formats* use the @umbers page of the 5ormat Cells dialog &5igure 21 on page =2 and J#umbersK on page =2)'

,pply any of the data types in the Category list to the data. Control the number of decimal places and leading Feros in =ptions. Dnter a custom format code. The 2anguage setting controls the local settings for the different formats such as the date format and currency symbol.

'igure 3&: @umber icons on 'ormatting toolbar

Formatting fonts
To select a font and format it for use in a cell' 1) /elect a cell or cell range. 2) Clic0 the small triangle on the right of the 5ont #ame bo6 on the 5ormatting toolbar &highlighted in 5igure 3E) and select a font from the drop.do n list. The font can also be changed using the 5ont page on the 5ormat Cells dialog. 3) Clic0 on the small triangle on the right of the 5ont /iFe bo6 on the 5ormatting toolbar and select a font siFe from the drop.do n list. The font siFe can also be changed using the 5ont page on the 5ormat Cells dialog. =) To change the character format* clic0 on the 7old* 0talic* or $nderline icons. B) To change the paragraph alignment of the font* clic0 on one of the four alignment icons &Left* Centre* Hight* 1ustified) .

$hapter 9 )ntering= )diting= and 'ormatting Data

%-

'igure 3A: 'ont @ame and Si1e on 'ormatting toolbar


To specify the language used in the cell* open the 5ont page on the 5ormat Cells dialog. Changing language in a cell allo s different languages to e6ist ithin the same document. 5or more changes to font characteristics* see J5ont effectsK belo for more information.

?ote

,ip

To choose hether to sho the font names in their font or in plain te6t* go to ,ools < =ptions < 2ibre=ffice < >iew and select or deselect the Show preview of fonts option in the 5ont Lists section. 5or more information* see $hapter #" Setting Up and $ustomi1ing $alc.

Font effects
1) /elect a cell or cell range. 2) Hight.clic0 on the selection and select Format Cells from the conte6t menu* or go to Format < Cells on the menu bar* or press $trl5# to open the 5ormat Cells dialog. 3) Clic0 on the 'ont )ffects tab &5igure 3-). =) /elect the font effect you ant to use from the options a+ailable. The options a+ailable are described belo . B) Clic0 =6 to apply the font effects and close the dialog.

'igure 3-: 'ormat $ells dialog E 'ont )ffects page ,ny font effect changes are applied to the current selection* or to the entire ord that contains the cursor* or to any ne te6t that you type.

Font Color X sets the color for the selected te6t. If you select ,utomatic* the te6t color is
set to blac0 for light bac0grounds and to hite for dar0 bac0grounds. ,lso yo can change

$hapter 9 )ntering= )diting= and 'ormatting Data

%.

the font color by clic0ing on the triangle to right of the Font Color icon color palette* then select the desired color.

to display the

3elief X select a relief effect to apply to the selected te6t. The embossed relief ma0es the
characters appear as if they are raised abo+e the page. The engra+ed relief ma0es the characters appear as if they are pressed into the page.

=utline X displays the outline of the selected characters. This effect does not or0 ith
e+ery font.

+hadow X adds a shado that casts belo and to the right of the selected characters. =verlining X select the o+erlining style that you ant to apply. To apply o+erlining to ords
only* select ndividual 8ords.

=verline color X select the color for the o+erlining. +trikethrough X select a stri0ethrough style for the selected te6t. If you sa+e your
document in 4/ 3ord format* all of the stri0ethrough styles are con+erted to the single line style.

*nderlining X select the underlining style that you ant to apply. To apply the underlining
to ords only* select ndividual 8ords. If you apply underlining to a superscript te6t* the underlining is raised to the le+el of the superscript. If the superscript is contained in a ord ith normal te6t* the underlining is not raised.

*nderline color X select the color for the underlining. ndividual words X applies the selected font effect only to ords and ignores spaces. #mphasis mark X select a character to display o+er or belo the entire length of the
selected te6t.

Position X specify here to display the emphasis mar0s. Preview X displays a pre+ie of the current selection.

,e.t direction
To change the te6t direction ithin a cell* you can use the ,lignment page on the 5ormat Cells dialog &5igure 3B on page BE) or the icons on the 5ormatting toolbar. 1) On the ,lignment page of the 5ormat Cells dialog* select the 3eference edge from to rotate the te6t as follo s' edge out ards. hich

(e*t )*tension 'rom Lower $ell Border X rites the rotated te6t from the bottom cell (e*t )*tension 'rom Upper $ell Border X rites the rotated te6t from the top cell edge
out ards.

(e*t )*tension 0nside $ells X rites the rotated te6t only ithin the cell.
2) Clic0 on the small indicator at the edge of the ,e.t orientation dial and rotate it until you reach the re@uired degrees. 3) ,lternati+ely* enter the number of degrees to rotate the te6t in the %egrees bo6. =) /elect >ertically stacked to ma0e the te6t appear +ertically in the cell. Only select Asian layout mode if you are using an ,sian language in the cell. B) The icons on the 5ormatting toolbar can be used as follo s after the cell has been selected'

To change the te6t direction from horiFontal &default direction) to +ertical* clic0 on the
,e.t direction from top to bottom icon .

$hapter 9 )ntering= )diting= and 'ormatting Data

&8

To change te6t direction from +ertical to horiFontal &default)* clic0 on the ,e.t direction
from left to right icon .

To change te6t direction from left to right* hich is the default direction for 3estern
fonts* to a right to left direction used in some fonts* for e6ample ,rabic* the clic0 on the 3ight/,o/2eft icon left direction. . This only or0s if a font has been used that re@uires a right to

To change te6t direction bac0 to the default left to right direction used for 3estern fonts*
clic0 on the 2eft/,o/3ight icon .

?ote

If the te6t direction icons are not a+ailable on the 5ormatting toolbar* then right. clic0 in an empty area on the toolbar and select >isible 7uttons from the conte6t menu. Clic0 on the icon you re@uire and it ill be placed on the 5ormatting toolbar.

Formatting cell borders


To format the borders of a cell or a group of selected cells &see $hapter " Using St2les and (emplates in $alc for more information). The border icons on the 5ormatting toolbar only apply the default styles to borders* but the 5ormat Cells dialog pro+ides greater control o+er of ho the cell borders ill loo0.

'igure 3.: 'ormat $ells dialog E Borders page 1) /elect a cell or a range of cells. 2) Hight.clic0 on the selection and select Format Cells from the conte6t menu* or go to Format < Cells on the menu bar* or press $trl5# to open the 5ormat Cells dialog. 3) Clic0 on the Borders tab &5igure 3<). =) /elect the options from the 7orders page. The options a+ailable are gi+en belo . B) Clic0 =6 to close the dialog and sa+e your changes.

$hapter 9 )ntering= )diting= and 'ormatting Data

&#

A) ,lternati+ely* use the icons on the 5ormatting to apply default styles to borders. a) Clic0 on the 7orders icon palette. and select one of the border options displayed in the 7orders and select one of the line styles from the 7order /tyle and select a color from 7order Color palette.

b) Clic0 on the 7order +tyle icon palette. c) Clic0 on the 2ine Color icon

?ote

Cell border properties apply only to the selected cells and can only be changed if you are editing those cells. 5or e6ample* if cell C3 has a top border* that border can only be remo+ed by selecting C3. It cannot be remo+ed in C2 it appears to be the bottom border for cell C2. 3hen entering borders ith the 7order icons on the 5ormatting toolbar* you ha+e t o choices' clic0 the re@uired icon to add a border to the present borders or shift. clic0 to add a border and remo+e the present borders.

?ote

The border options a+ailable in the 5ormat Cells dialog are as follo s.

2ine arrangement X select the style of cell borders. Default X select a predefined border style to apply. User defined X clic0 on the diagram to apply a border to one of the edges or diagonal
lines across the cell.

2ine X select the line style for the cell borders. St2le X select the line style to be used for the border. <idth X enter a idth to be used for the border line. $olor X select a color to be used for the border line. +pacing to contents X specify the amount of space that you ant to lea+e bet een the
border and the contents of the selection.

Left X enter the distance bet een the left border and the contents of the selection. 3ight X enter the distance bet een the right border and the contents of the selection. (op X enter the distance bet een the top border and the contents of the selection. Bottom X enter the distance bet een the bottom border and the contents of the selection. S2nchroni1e X applies the same spacing to contents setting to all four borders hen you enter a ne distance. hen all four borders are +isible.

+hadow style X applies a shado effect to borders. 5or the best results* only apply this
effect

Position X select a shado style for the selected borders. Distance X enter the idth of the shado . $olor X select a color for the shado .

$hapter 9 )ntering= )diting= and 'ormatting Data

&9

Formatting cell backgrounds


To format the bac0ground color for a cell or a group of cells &see $hapter " Using St2les and (emplates in $alc for more information)' 1) /elect a cell or a range of cells. 2) Hight.clic0 on the selection and select Format Cells from the conte6t menu* or go to Format < Cells on the menu bar* or press $trl5# to open the 5ormat Cells dialog. 3) Clic0 on the Bac4ground tab. =) /elect a color from the color palette. B) Clic0 =6 to sa+e your changes and close the dialog. A) ,lternati+ely* clic0 on the 7ackground Color icon a color from the 7ac0ground color palette. on the 5ormatting toolbar and select

AutoFormat of cells and sheets


*sing AutoFormat
!ou can use ,uto5ormat to format a group of cells. 1) /elect the cells in at least three columns and ro s* including column and ro headers* that you ant to format. 2) "o to Format < AutoFormat on the menu bar to open the AutoFormat dialog &5igure =0). 3) /elect the type of format and format color from the list =) If necessary* clic0 4ore to open Formatting if it is not +isible. B) /elect the formatting properties to be included in the ,uto5ormat function. A) Clic0 =6 to apply the changes and close the dialog.

'igure "8: ,uto'ormat dialog

%efining a new AutoFormat


!ou can define a ne ,uto5ormat so that it becomes a+ailable for use in all spreadsheets. 1) 5ormat the data type* font* font siFe* cell borders* cell bac0ground* and so on for a group of cells.

$hapter 9 )ntering= )diting= and 'ormatting Data

&3

2) "o to #dit < +elect All on the menu bar to select the hole spreadsheet. 3) "o to Format < AutoFormat to open the ,uto5ormat dialog and the Add button is no acti+e. =) Clic0 Add. B) In the @ame bo6 of the ,dd ,uto5ormat dialog that opens* type a meaningful name for the ne format and clic0 =6. A) Clic0 =6 to close the dialog. The ne ,uto5ormat is no a+ailable in the 'ormat list in the ,uto5ormat dialog.

*sing themes
Calc comes ith a predefined set of formatting themes that you can apply to spreadsheets. It is not possible to add themes to Calc and they cannot be modified. !ou can modify their styles after you apply them to a spreadsheet* but the modified styles are only a+ailable for use for that spreadsheet hen you sa+e the spreadsheet.

'igure "#: (heme Selection dialog To apply a theme to a spreadsheet' 1) Clic0 the Choose ,hemes icon in the Tools toolbar to open the Theme /election dialog &5igure =1). If the Tools toolbar is not +isible* go to >iew < ,oolbars on the menu bar and select ,ools. The Theme /election dialog lists the a+ailable themes for the hole spreadsheet. 2) /elect the theme that you ant to apply. ,s soon as you select a theme* the theme styles are applied to the spreadsheet and are immediately +isible. 3) Clic0 =6. =) If you ish* you can no open the /tyles and 5ormatting indo to modify specific styles. These modifications do not modify the themeN they only change the appearance of the style in the specific spreadsheet you are creating. 5or more about modifying styles* see $hapter " Using St2les and (emplates in $alc.

$hapter 9 )ntering= )diting= and 'ormatting Data

&"

>alue highlighting
The +alue highlighting function displays cell contents in different colors* depending on the type of content. ,n e6ample of +alue highlighting is sho n in 5igure =2.

Te6t is sho n in blac0. 5ormulas are sho n in green. #umbers are sho n in blue.

'igure "9: )*ample of value highlighting The +alue highlighting colors o+erride any colors used in formatting. This color change applies only to the colors seen on a display. 3hen a spreadsheet is printed* the original colors used for formatting are printed. "o to >iew < >alue ;ighlighting on the menu bar* or use the 0eyboard shortcut $trl5'- to turn the function on or off. 3hen +alue highlighting is s itched off* the original formatting colors are used for display. !ou can ma0e +alue highlighting the default hen opening a spreadsheet in Calc* by selecting ,ools < =ptions < 2ibre=ffice Calc < >iew e >alue ;ighlighting. This default mode for +alue highlighting may not be hat you ant if you are going to format the cells for printing.

*sing conditional formatting


!ou can set up cell formats to change depending on conditions that you specify. Conditional formatting is used to highlight data that is outside the specifications that you ha+e set. It is recommended not to o+eruse conditional formatting as this could reduce the impact of data that falls outside the specifications that you ha+e set. /ee JConditional formatting e6ampleK on page A- for an e6ample on ho formatting. to use conditional

?ote

Conditional formatting depends upon the use of styles and the ,utoCalculate feature must be enabled. If you are not familiar ith styles* see $hapter " Using St2les and (emplates in $alc for more information.

+etting up conditional formatting


1) Dnsure that ,utoCalculate is enabled' ,ools < Cell Contents < AutoCalculate. 2) /elect the cells here you ant to apply conditional formatting.

'igure "3: $onditional 'ormatting dialog E $ondition


$hapter 9 )ntering= )diting= and 'ormatting Data &%

3) "o to Format < Conditional Formatting < Condition &5igure =3)* Color scale &5igure ==) or %ata 7ar &5igure =B) on the menu bar to open the Conditional 5ormatting dialog. ,ny conditions already defined are displayed. =) Clic0 Add to create and define a ne condition. Hepeat this step as necessary. B) /elect a style from the styles already defined in the ,ppl2 St2le drop.do n list. Hepeat this step as necessary. A) ,lternati+ely* select ?ew +tyle to open the Cell /tyle dialog &5igure =A) and create a ne cell style. Hepeat this step as necessary. E) Clic0 =6 to sa+e the conditions and close the dialog. The selected cells are no set to apply a result using conditional formatting.

'igure "": $onditional 'ormatting dialog E $olor Scale

'igure "%: $onditional 'ormatting dialog E Data Bar

'igure "&: $ell St2le dialog

$hapter 9 )ntering= )diting= and 'ormatting Data

&&

,ypes of conditional formatting


Condition
Condition is the starting point hen using conditional formatting. 2ere you can define hat formats to use to highlight any data in your spreadsheet that falls outside the specifications that you ha+e defined.

Color scale
$se Color scale to set the bac0ground color of cells depending on the +alue of the data in a spreadsheet cell. Color scale can only be used hen All Cells has been selected for the condition. !ou can use either t o or three colors for your color scale.

*ata bars
Data bars pro+ide a graphical representation of data in your spreadsheet. The graphical representation is based on the +alues of data in a selected range. Clic0 on 4ore =ptions in the Conditional 5ormatting dialog to define ho your data bars ill loo0. Data bars can only be used hen All Cells has been selected for the condition.

con sets
Icon sets display an icon ne6t to your data in each selected cell to gi+e a +isual representation of here the cell data falls ithin the defined range that you set. The icons sets a+ailable are colored arro s* gray arro s* colored flags* colored signs* symbols* bar ratings and @uarters. Icon sets can only be accessed hen the Conditional 5ormatting dialog has been opened and All Cells has been selected for the condition.

Conditional formatting management


To see all the conditional formatting defined in your spreadsheet and any styles used' 1) "o to Format < Conditional Formatting < 4anage on the menu bar to open the 4anage Conditional 5ormatting dialog &5igure =E). 2) /elect a range from the 3ange list and clic0 #dit to redefine the conditional formatting. 3) /elect a range from the 3ange list and clic0 3emove to delete the conditional formatting. The deletion is immediate ith no confirmation. =) /elect Add to create a ne definition of conditional formatting. B) Clic0 =6 to sa+e your changes and close the dialog.

'igure "A: :anage $onditional 'ormatting dialog

$hapter 9 )ntering= )diting= and 'ormatting Data

&A

Copying cell styles


To apply the style used for conditional formatting to other cells later' 1) Clic0 one of the cells that has been assigned conditional formatting and copy the cell to the clipboard. 2) /elect the cells that are to recei+e the same formatting as the copied cell. 3) "o to #dit < Paste +pecial on the menu bar to open the %aste /pecial dialog &5igure 3= on page BB). =) 4a0e sure that only 5ormats is selected and clic0 =6 to paste the conditional formatting into the cell.

Conditional formatting e.ample


3ith conditional formatting* you can* for e6ample* highlight the totals that e6ceed the a+erage +alue of all totals. If the totals change* the formatting changes correspondingly* ithout ha+ing to apply other styles manually. It is recommended that the /tyles and 5ormatting dialog is open and +isible before proceeding.

*efinin% conditions
1) /elect the cells here you ant to apply a conditional style. 2) "o to Format < Conditional Formatting < Condition* Color scale or %ata bar from the menu bar to open the Conditional 5ormatting dialog. 3) Dnter the conditions you ant to use for conditional formatting.

Generatin% nu(ber values


!ou may ant to gi+e certain +alues in your tables particular emphasis. 5or e6ample* in a table of turno+ers* you can sho all the +alues abo+e the a+erage in green and all those belo the a+erage in red. This is possible ith conditional formatting. 1) Create a table in hich a fe different +alues occur. 5or your test you can create tables ith any random numbers. In one of the cells enter the formula YH,#D&)* and you ill obtain a random number bet een 0 and 1. If you ant integers of bet een 0 and B0* enter the formula YI#T&H,#D&)ZB0). 2) Copy the formula to create a ro of random numbers. 3) Clic0 the bottom right corner of the selected cell* and drag to the right and do n ard until the desired cell range is selected.

*efinin% cell st$les


The ne6t step is to apply a cell style to all +alues that represent abo+e.a+erage turno+er and one to cells that are belo the a+erage. 1) Hight.clic0 in a blan0 cell and select Format Cells in the conte6t menu to open the 5ormat Cells dialog. 2) Clic0 the 7ac0ground tab and select a bac0ground color* then clic0 =6. 3) In the Conditional 5ormatting dialog* select ?ew +tyle from the ,ppl2 St2le drop.do n list to open the Cell /tyle dialog. =) Dnter a name of the ne style. 5or this e6ample* name the style ,bove. B) Define a second style* clic0 again in a blan0 cell and proceed as described abo+e. ,ssign a different bac0ground color to the cell and assign a name. 5or this e6ample* name the style Below.

$hapter 9 )ntering= )diting= and 'ormatting Data

&-

Calculatin% avera%e
In our particular e6ample* e are calculating the a+erage of the random +alues. The result is placed in a cell' 1) Clic0 in a blan0 cell* for e6ample* 11=* and go to nsert < Function on the menu bar* or clic0 the Function 8i5ard icon on the 5ormula bar to open the 5unction 3iFard dialog. 2) /elect ,CDH,"D from the 5unction list. 3) $se the cursor to select all your random numbers. =) Clic0 =6 to the 5unction 3iFard.

)ppl$in% cell st$les


#o you can apply the conditional formatting to the sheet' 1) /elect all cells containing the random numbers. 2) "o to the Format < Conditional Formatting on the menu bar to open the Conditional 5ormatting dialog. 3) Define the condition for each cell as follo s' if cell +alue is less than 11=* format ith cell style Below OH if cell +alue is greater than or e@ual to 11=* format ith cell style ,bove.

;iding and showing data


In Calc you can hide elements so that they are neither +isible on a computer display nor printed hen a spreadsheet is printed. 2o e+er* hidden elements can still be selected for copying if you select the elements around themN for e6ample* if column 7 is hidden* it is copied hen you select columns , and C. 3hen you re@uire a hidden element again* you can re+erse the process and sho the element.

;iding data
!"eets2 rows2 and colu(ns
1) /elect the sheet* ro * or column you ant to hide. 2) "o to Format on the main menu bar and select +heet* 3ow or Column. 3) /elect ;ide from the menu and the sheet* ro * or column can no longer +ie ed or printed. ,lternati+ely* right.clic0 on the sheet tab* ro header* or column header and select ;ide from the conte6t menu.

Cells
1) "o to ,ools < Protect %ocument < +heet on the menu bar to open the Protect +heet dialog dialog &5igure =-). 2) /elect Protect this sheet and the contents of protected cells. 3) Create a pass ord and then confirm the pass ord. =) /elect or deselect the options for ,llow all users of this sheet to: so users can select protected or unprotected cells. B) Clic0 =6 to sa+e the changes and close the dialog. A) /elect the cells you ant to hide. E) "o to Format < Cells on the menu bar* or right.clic0 and select Format Cells from the conte6t menu* or use the 0eyboard shortcut $trl5# to open the Format Cells dialog &5igure =<). -) Clic0 the $ell Protection tab and select an option for hiding and printing the cells. <) Clic0 =6 to sa+e the changes and close the dialog.
$hapter 9 )ntering= )diting= and 'ormatting Data &.

'igure "-: Protect Sheet dialog

'igure ".: 'ormat $ells dialog E $ell Protection page


3hen data in cells are hidden* it is only the data contained in the cells that are hidden and the protected cells cannot be modified. The blan0 cells remain +isible in the spreadsheet. 3hen data in cells are hidden* it is only the data contained in the cells that are hidden and the protected cells cannot be modified. The blan0 cells remain +isible in the spreadsheet.

?ote

?ote

+howing data
!"eets2 rows2 and colu(ns
1) /elect the sheets* ro s or columns each side of the hidden sheet* ro or column. 2) "o to Format on the menu bar and select +heet* 3ow or Column. 3) /elect +how from the conte6t menu and the sheet* ro or column ill be displayed and can be printed. =) ,lternati+ely* right.clic0 on the sheet tabs* ro headers or column headers and select +how from the conte6t menu.

Cells
1) "o to ,ools < Protect %ocument < +heet on the menu bar to open the Protect +heet dialog dialog &5igure =-). 2) Dnter the pass ord to unprotect the sheet and clic0 =6.
$hapter 9 )ntering= )diting= and 'ormatting Data A8

3) "o to Format < Cells on the menu bar* or right.clic0 and select Format Cells from the conte6t menu* or use the 0eyboard shortcut $trl5# to open the Format Cells dialog &5igure =<). =) Clic0 the $ell Protection tab and deselect the hide options for the cells. B) Clic0 =6.

(roup and outline


If you are continually hiding and sho ing the same cells* you can create an outline of your data and group ro s or columns together so that you can collapse a group to hide it or e6pand a group to sho it using a single clic0. The basic controls for grouping and outlining sho plus &R) or minus &.) signs on the group indicator to sho or hide ro s or columns. 2o e+er* if there are groups nested ithin each other* the basic controls ha+e numbered buttons so you can hide the different le+els of nested groups.

Groupin%
To group ro s or columns' 1) /elect the cells you ant to group in your spreadsheet. 2) "o to %ata < (roup and =utline < (roup on the menu bar* or press the '#9 0ey. 3) In the "roup dialog that opens* select either 3ows or $olumns and clic0 =6. , group indicator appears to the left of any ro s grouped or abo+e any columns grouped. 5igure B0 sho s a group indicator on the left of the first t o ro s of the spreadsheet ha+e been grouped.

'igure %8: Group indicator

3idin% details
To hide the details of any group of ro s or columns' 1) Clic0 on the minus &.) sign on the group indicator. 2) ,lternati+ely* select a cell ithin the group and go to %ata < (roup and =utline < ;ide %etails on the menu bar. 3) The ro s or columns are hidden and the minus &.) sign becomes a plus &R) sign on the group indicator.

!"owin% details
To sho the details of any hidden groups or ro s or columns' 1) Clic0 on the plus &R) sign on the group indicator. 2) ,lternati+ely* select a cell on each side of the hidden group and go to %ata < (roup and =utline < +how %etails on the menu bar.
$hapter 9 )ntering= )diting= and 'ormatting Data A#

3) The hidden ro s or columns are displayed and the plus &R) sign becomes a minus &.) sign on the group indicator.

+n%roupin%
To ungroup any groups of ro s or columns' 1) 4a0e sure the grouped ro s or columns are displayed. 2) "o to %ata < (roup and =utline < *ngroup on the menu bar* or use the 0eyboard combination $trl5'#9. 3) /elect either 3ows or $olumns to ungroup and clic0 =6.

?ote

,ny hidden groups of ro s or columns must be displayed. If they are hidden* then the grouped ro s or columns are deleted from your spreadsheet. If there are nested groups* only the last group of ro s or columns created is ungrouped.

?ote

)utoOutline
If a selected cell range contains formulas or references* Calc automatically outlines the selection. 5or e6ample* in 5igure B1 the cells for the 1st and 2nd @uarters each contain a sum formula for the three cells to their left. If you apply the Auto=utline command* the columns are grouped into t o @uarters. To apply the ,utoOutline function* go to %ata < (roup and =utline < Auto=utline on the menu bar. Calc ill then chec0 for cells that contain formulas or references and automatically group the cells as necessary.

'igure %#: )*ample of ,utoOutline

&e(ovin%
To remo+e any cell groups of ro s or columns* go to %ata < (roup and =utline < 3emove on the menu bar and any groups are remo+ed. ,ny cell group of ro s or columns that are hidden* the grouping is remo+ed from the cells and the cells are displayed in your spreadsheet.

Filtering
, filter is a list of conditions that each entry has to meet to be displayed. Calc pro+ides three types of filter'

+tandard X specifies the logical conditions to filter your data.

$hapter 9 )ntering= )diting= and 'ormatting Data

A9

AutoFilter X filters data according to a specific +alue or string. ,utomatically filters the
selected cell range and creates one.ro you ant to display. list bo6es here you can choose the items that

Advanced X uses filter criteria from specified cells. )ppl$in% a standard filter
, standard filter is more comple6 than ,uto5ilter. !ou can set as many as eight conditions as a filter* combining them ith the operators ,@D or O3. /tandard filters are mostly useful for numbers* although a fe of the conditional operators can also be used for te6t. 1) /elect a cell range in your spreadsheet. 2) "o to %ata < Filter < +tandard Filter on the menu bar to open the /tandard 5ilter dialog &5igure B2). 3) /pecify the filter criteria and filtering options that you ant to use. =) Clic0 =6 to carry out standard filtering and close the dialog. ,ny records that match the filter criteria and options that you specified are sho n.

'igure %9: Standard 'ilter dialog The filter criteria used in standard filtering defines a filter by indicating the type of line* the name of the field* a logical condition and a +alue or a combination of arguments.

=perator X for the follo ing arguments* you can choose bet een the logical operators
,#D ( OH.

Field name X specifies the field names from the current table to set them in the argument.
!ou ill see the column identifiers if no te6t is a+ailable for the field names.

Condition X specifies the comparati+e operators through hich the entries in the Field
name and >alue fields can be lin0ed.

>alue X specifies a +alue to filter the field. The >alue list bo6 contains all possible +alues
for the specified Field name. /elect a +alue to be used in the filter* including )mpt2 and @ot )mpt2 entries.

Case sensitive X distinguishes bet een uppercase and lo ercase letters hen filtering the
data.

$hapter 9 )ntering= )diting= and 'ormatting Data

A3

3ange contains column labels X includes the column labels in the first ro of a cell
range.

Copy results to X select the chec0 bo6 and then select the cell range here you ant to
display the filter results. !ou can also select a named range from the list.

3egular e.pression X select to use ildcards in the filter definition. /ee LibreOffice 2elp
for a list of the regular e6pressions that LibreOffice supports. If selected* you can use regular e6pressions in the >alue field if the Condition list bo6 is set to ?Y? DI$,L or ?fe? $#DI$,L. This also applies to the respecti+e cells that you reference for an ad+anced filter.

?o duplication X e6cludes duplicate ro s from the list of filtered data. 6eep filter criteria X select Copy results to and then specify the destination range here
you ant to display the filtered data. If this bo6 is chec0ed* the destination range remains lin0ed to the source range. !ou must ha+e defined the source range under %ata < %efine range as a database range. !ou can also reapply the defined filter at any time by clic0ing into the source range and then go to %ata < 3efresh 3ange.

'igure %3: ,uto'ilter e*ample

)ppl$in% an )utoFilter
,n ,uto5ilter adds a drop.do n list to the top ro of one or more data columns hich lets you select the ro s to be displayed. The list includes e+ery uni@ue entry in the selected cells sorted into le6ical order &see http'((sheepsystems.com(boo0dog(2elp7oo0(Le6icalOrder.html for an
$hapter 9 )ntering= )diting= and 'ormatting Data A"

e6planation of le6ical order). ,uto5ilter can be used on multiple sheets ithout first defining a database range. 1) Clic0 in a cell range on your spreadsheet. If you ant to apply multiple ,uto5ilters to the same sheet* you must first define database ranges* then apply the ,uto5ilters to the database ranges. 2) "o to %ata < Filter < AutoFilter on the menu bar. ,n arro button is added to the head of each column in the database range. 3) Clic0 the arro or small triangle in the column that contains the +alue or string that you ant to set as the filter criteria &sho n in 5igure B3). =) /elect the +alue or string that you ant to use as the filter criteria. The records that match the filter criteria that you selected are then sho n.

)ppl$in% an advanced filter


,n ad+anced filter has a structure similar to a standard filter. The difference is that the ,d+anced 5ilter arguments are not entered in a dialog. Instead* filters can be entered in a blan0 area of a spreadsheet* then referenced by the filter dialog to apply the filters. 1) /elect a cell range in your spreadsheet. 2) "o to %ata < Filter < Advanced Filter on the menu bar to open the ,d+anced 5ilter dialog &5igure B=). 3) In 3ead filter criteria from* select the named range* or enter the cell range that contains the filter criteria that you ant to use =) Clic0 =6 to carry out ad+anced filtering and close the dialog. ,ny records that match the filter criteria and options that you specified are sho n.

'igure %": ,dvanced 'ilter dialog

?ote

The options for ad+anced filtering are the same as those used for standard filtering* see J,pplying a standard filterK on page E3 for more information.

+orting records
/orting ithin Calc arranges the cells in a sheet using the sort criteria that you specify. /e+eral criteria can be used and a sort applies each criteria consecuti+ely. /orts are useful hen you are searching for a particular item and become e+en more useful after you ha+e filtered data. ,lso* sorting is useful hen you add ne information to a spreadsheet. 3hen a spreadsheet is long* it is usually easier to add ne information at the bottom of the sheet* rather than adding ro s in their correct place. ,fter you ha+e added information* you can then sort the records to update the spreadsheet.
$hapter 9 )ntering= )diting= and 'ormatting Data A%

+ort dialog
To sort cells in a spreadsheet using the /ort dialog &5igure BB)' 1) /elect the cells to be sorted. 2) "o to %ata < +ort on the menu bar to open the /ort dialog. 4a0e sure the +ort Criteria page is open. 3) /elect the sort criteria from the drop.do n lists. The selected lists are populated from the selected cells. =) /elect either ascending order &,.T* 1.<) or descending order &T.,* <.1). B) Clic0 =6 and the sort is carried out on your spreadsheet.

'igure %%: Sort dialog E Sort $riteria page

'igure %&: Sort dialog E Options page

+ort options
On the Options page of the /ort dialog &5igure BA)* you can set additional options'

Case +ensitivity X sorts first by uppercase letters and then by lo ercase letters. 5or ,sian
languages* special handling applies.
$hapter 9 )ntering= )diting= and 'ormatting Data A&

?ote

5or ,sian languages* select Case /ensiti+ity to apply multi.le+el collation. 3ith multi.le+el collation* entries are first compared in their primiti+e forms ith their cases and diacritics ignored. If they e+aluate as the same* their diacritics are ta0en into account for the second.le+el comparison. If they still e+aluate as the same* their cases* character idths* and 1apanese 8ana difference are considered for the third.le+el comparison.

3ange contains columnHrow labels X omits the first ro or the first column in the
selection from the sort. The %irection setting at the bottom of the dialog defines the name and function of this chec0 bo6.

nclude formats X preser+es the current cell formatting. #nable natural sort X natural sorting is a sort algorithm that sorts string.prefi6ed numbers
based on the +alue of the numerical element in each sorted number* instead of the traditional ay of sorting them as ordinary strings. 5or instance* assume you ha+e a series of +alues such as* ,1* ,2* ,3* ,=* ,B* ,A* ...* ,1<* ,20* ,21. 3hen you put these +alues into a range of cells and run the sort* it ill become ,1* ,11* ,12* ,13* ...* ,1<* ,2* ,20* ,21* ,3* ,=* ,B* ...* ,<. 3hile this sorting beha+ior may ma0e sense to those ho understand the underlying sorting mechanism* to the rest of the population it seems completely biFarre* if not outright incon+enient. 3ith natural sorting selected* +alues such as the ones in the abo+e e6ample are sorted correctly* hich impro+es the con+enience of sorting operations in general.

Copy sort results to X copies the sorted list to the cell range that you specify. /elect a
named cell range here you ant to display the sorted list* or enter a cell range in the input bo6.

Custom sort order X select this option and then select the custom sort order that you ant
to apply. To define a custom sort order* go to 2ibre=ffice < Preferences < 2ibre=ffice Calc < +ort 2ists.

2anguage X select the language for the sorting rules. =ptions X select a sorting option for the language. 5or e6ample* select the Uphoneboo0U
option for "erman to include the umlaut special character in the sorting.

,op to 7ottom K+ort 3owsL X sorts ro s by the +alues in the acti+e columns of the
selected range.

2eft to 3ight K+ort ColumnsL X sorts columns by the +alues in the acti+e ro s of the
selected range.

Muick sort
If the columns in your spreadsheet ha+e a header 1) /elect a cell or a cell range to be sorted. 2) Clic0 the +ort Ascending or +ort %escending icons on the /tandard toolbar. ith a te6t format* you can use a @uic0 sort.

Find and replace


Calc has t o ays to find te6t ithin a document' the 5ind toolbar and the 5ind S Heplace dialog.

'igure %A: 'ind toolbar

$hapter 9 )ntering= )diting= and 'ormatting Data

AA

Find toolbar
1) "o to >iew < ,oolbars < Find on the menu bar* or go to #dit < Find on the menu bar* or use the 0eyboard shortcut $trl5' to open the 5ind toolbar &5igure BE). 7y default the 5ind toolbar is doc0ed in the lo er left.corner of the Calc indo . !ou can undoc0 the toolbar and mo+e it to here you choose. 2) Type a search term in the 5ind bo6. 3) /elect 4atch Case to refine your search. 5or e6ample* Owner is your search term and selecting 4atch Case ill only find Owner and ill not find owner. =) Clic0 the Find ?e.t or Find Previous term* continue clic0ing the icon. icons. To find other occurrences of the same

Find B 3eplace dialog

'igure %-: 'ind > 3eplace dialog

$hapter 9 )ntering= )diting= and 'ormatting Data

A-

Findin%
1) "o to #dit > Find B 3eplace on the menu bar* or use the 0eyboard shortcut $trl5+* or select the Find B 3eplace icon on the 5ind toolbar to open the 5ind S Heplace dialog &5igure B-). Dnter or select the search criteria in the Search for bo6. If necessary* clic0 on Other Options so that you can increase the number of search filters that you can apply to your search. Clic0 Find to locate the first instance of the search criteria you entered. Clic0 Find again to locate the ne6t instance of your search criteria. Clic0 Find All to locate all instances of your search criteria. The instances of your search criteria ill be highlighted in the spreadsheet.

2) 3) =) B) A)

&eplacin%
1) "o to #dit > Find B 3eplace on the menu bar* or use the 0eyboard shortcut $trl5+* or select the Find B 3eplace icon on the 5ind toolbar to open the 5ind S Heplace dialog &5igure B-). Dnter or select the search criteria in the Search for bo6. Dnter or select the replace criteria in the 3eplace with bo6. If necessary* clic0 on Other Options so that you can increase the number of search filters that you can apply to your find and replace. Clic0 3eplace to locate and replace the first instance of the search criteria you entered ith your replacement criteria. Clic0 3eplace again to locate and replace the ne6t instance of the search criteria you entered ith your replacement criteria. Clic0 3eplace All to locate and replace all instances of the search criteria you entered ith your replacement criteria.
$se 3eplace All ith cautionN other ise* you may end up ith some highly embarrassing mista0es. , mista0e ith 3eplace All might re@uire a manual* ord. by. ord search to fi6* if it is not disco+ered in time to undo it.

2) 3) =) B) A) E)

?ote

Find 4 &eplace options


The options a+ailable to refine your find and replace are as follo s'

+earch for X enter the te6t that you ant to search for* or select a pre+ious search from the
list.

3eplace with X enter the replacement te6t* or select a recent replacement te6t or style
from the list.

4atch case X distinguishes bet een uppercase and lo ercase characters. #ntire Cells X searches for hole ords or cells that are identical to the search te6t. Current selection only X searches only the selected te6t or cells. 7ackwards X search starts at the current cursor position and goes bac0 ards to the beginning of the file. more information on the use of regular e6pressions.

3egular e.pressions X select to use ildcards in your search. /ee LibreOffice 2elp for +imilarity +earch X find terms that are similar to the +earch for te6t. /elect this chec0bo6*
and then clic0 the ... button to define the similarity options.
$hapter 9 )ntering= )diting= and 'ormatting Data A.

+earch for +tyles X searches for te6t formatted ith the style that you specify. /elect this
option and then select a style from the +earch for list. To specify a replacement style* select a style from the 3eplace with list.

4atch character width X distinguishes bet een half. idth and full. idth character formsN
only a+ailable if ,sian languages are enabled.

+ounds like KNapaneseL X specify the search options for similar notation used in 1apanese
te6t. /elect this option* and then clic0 the ... button to specify the search options. This option is only a+ailable if ,sian languages are enabled.

+earch in X select either 'ormulas* Halues* or @otes to search for the characters that you
specify in +alues* in the results of formulas* or in notes.

+earch direction X determines the order for searching the cells. +earch in all sheets X searches through all of the sheets in the current spreadsheet file.

$hapter 9 )ntering= )diting= and 'ormatting Data

-8

$hapter 3 $reating $harts and Graphs


Presenting information visuall2

ntroduction
Charts and graphs can be po erful ays to con+ey information to the reader. LibreOffice Calc offers a +ariety of different chart and graph formats for your data. $sing Calc* you can customiFe charts and graphs to a considerable e6tent. 4any of these options enable you to present your information in the best and clearest manner. 5or readers ho are interested in effecti+e ays to present information graphically* t o e6cellent introductions to the topic are 3illiam /. Cle+elandMs (he elements of graphing data* 2nd edition* 2obart %ress &1<<=) and Dd ard H. TufteMs (he Hisual Displa2 of Cuantitative 0nformation* 2nd edition* "raphics %ress &2001).

Chart 8i5ard
Calc uses a Chart 3iFard to create charts or graphs from your spreadsheet data. ,fter the chart has been created as an obGect in your spreadsheet* you can then change the chart type* adGust data ranges and the edit the chart using the functions a+ailable in the Chart 3iFard. Dach change you ma0e using is automatically reflected in the chart obGect placed onto your spreadsheet. This is described in the follo ing sections.

Creating charts and graphs


To demonstrate the process of creating charts and graphs in Calc* sho n in 5igure B< to create a chart. e ill use e6ample data as

'igure %.: )*ample data for creating a chart 1) /elect the cells containing the data to be included in the chart by highlighting &5igure B<). The selection does not need to be in a single bloc0 as in 5igure B<N you can also choose indi+idual cells or groups of cells &columns or ro s). /ee $hapter # 0ntroducing $alc for more information about selecting cells and ranges of cells. 2) "o to nsert < Chart on the main menu bar* or clic0 the Chart icon on the /tandard toolbar to open the Chart 3iFard dialog &5igure A0). , sample chart is created using the selected data and is placed onto the spreadsheet as an obGect &5igure A1).

$hapter 3 $reating $harts and Graphs

-9

'igure &8: $hart <i1ard dialog E selecting chart t2pe

'igure &#: )*ample chart automaticall2 created using $hart <i1ard

?ote

If you ant to plot any unconnected ro s or columns of data* select the first data series* then hold do n the $trl 0ey and select the ne6t series. The t o data series you are selecting must be in separate columns or ro s. Other ise Calc ill assume that you are adding to the same data series.

,ip

7efore opening the Chart 3iFard* place the cursor or select a cell any here in the area of the data. The Chart 3iFard ill then guess the range of the data to create a sample chart. 1ust be careful that you ha+e not included the title of your chart hen you ma0e your selection.

$hapter 3 $reating $harts and Graphs

-3

+electing chart type


Calc offers a choice of ten basic chart types and the options a+ailable +ary according to the type of chart you select. The initial chart created using the Chart 3iFard is a normal column chart and by default it is a 2D chart. This is highlighted ith a surrounding border in the pre+ie bo6 in 5igure A0 and the chart name is sho n belo the pre+ie . To change the chart type' 1) /elect the type of chart from the list in Choose a chart type &5igure A0). 2) /elect a chart icon in the pre+ie bo6 and chec0 to see if it is the chart type you re@uire. 5or more information on chart types* see J"allery of chart typesK on page 10-. 3) 5or $olumn* Bar* Pie or ,rea chart types only and if you ant to use a 3D chart* select the chec0bo6 '% 2ook and select the type of 3D +ie for your chart &3ealistic or Simple). =) /elect the options you ant to use for your chart. The options a+ailable are dependent of the type of chart selected. B) Clic0 ?e.t<< to mo+e onto the ne6t step in creating an e6ample chart and ma0e changes to the data range and a6es labels &5igure A2). A) If you are satisfied ith your chart* clic0 Finish to close the Chart 3iFard and create an e6ample chart obGect on your spreadsheet.

?ote

To demonstrate the process of creating charts using the follo ing sections* please lea+e the chart type as 2D column normal.

'igure &9: $hart <i1ard dialog E selecting data range

%ata range and a.es labels


In the Data Hange step of the Chart 3iFard &5igure A2)* you can manually correct any mista0es you ha+e made in selecting the data for your chart* ho your chart is plotted and ho to label your chart. 1) If necessary* change the ro s and columns used as data for your chart by editing the cell references in the Data range te6t bo6.

$hapter 3 $reating $harts and Graphs

-"

2) /elect hether to plot chart data by using either ro s or columns as the data series. This is useful if you use a chart type such as Donut or %ie to display your data. 3) /elect hether to use the first ro * or first column* or both* as labels for the a6es of the chart. =) Clic0 ?e.t<< to mo+e onto the ne6t step in creating an e6ample chart and ma0e changes to the data series &5igure A3). B) If you are satisfied ith your chart* clic0 Finish to close the Chart 3iFard and create an e6ample chart obGect on your spreadsheet.
, data range may consist of more than one region in a spreadsheet* for e6ample Ug/heet1.,1',BNg/heet1.D1'DBU is also a +alid data range.

?ote

If you ant a data range of multiple cell areas that are not ne6t to each other* enter the first range* then manually add a semicolon at the end of the te6t bo6* then enter the other ranges. $se a semicolon as delimiter bet een ranges.

'igure &3: $hart <i1ard dialog E selecting data series

%ata series
On the Data /eries page of the Chart 3iFard &5igure A3) you can change the source range of all data series separately* including their labels. !ou can also change the range of the categories and remo+e unnecessary data series or add data series from other cells. Dach named data series has its ranges and its indi+idual !.+alues listed. This is useful if you ha+e +ery specific re@uirements for data in your chart* as you can include or lea+e out these ranges. In the %ata series list bo6 you see a list of all data series in the current chart. 1) To organiFe the data series* select an entry in the %ata series list. 2) Clic0 Add to add another data series belo the selected entry. The ne data series has the same type as the selected entry. 3) Clic0 3emove to remo+e the selected entry from the %ata series list. =) $se the *p and %own buttons to mo+e the selected entry in the list up or do n. This does not change the order in the data source table* but changes only the arrangement in the chart.

$hapter 3 $reating $harts and Graphs

-%

B) To change the cell reference that is used to name a data series* select an entry in the %ata series list and edit the cell reference in the 3ange for ?ame te6t bo6. A) To change the cell reference that is to gi+e a category in a data series* select an entry in the %ata series list and edit the cell reference in the Categories te6t bo6. E) Clic0 ?e.t<< to mo+e onto the ne6t step in creating an e6ample chart and ma0e changes to the chart elements &5igure AB). -) If you are satisfied ith your chart* clic0 Finish to close the Chart 3iFard and create an e6ample chart obGect on your spreadsheet.

'igure &": $hart elements

Chart elements
The chart elements for 2D and 3D charts are sho n in 5igure A=.

The chart all contains the graphic of the chart displaying the data. The chart area is the area surrounding the chart graphic. The chart floor is only a+ailable for 3D charts. The chart title and subtitle* chart legend* a6es labels and a6es names are in the chart area and can be added hen using the Chart 3iFard to create a chart.

On the Chart Dlements page &5igure AB)* you can add or change the titles* a6es names and grids. $se a title that dra s the attention of +ie ers to the purpose of the chart and hat you ant them to see. 5igure A= sho s the +arious chart elements that can be placed onto a chart. 1) Dnter a title and subtitle you ant to use in the ,itle and +ubtitle te6t bo6es. 5or e6ample* a better title for this e6ample chart might be (he Performance of :otor and Other 3ental Boats. 2) Dnter a name you ant to use in the O a.is and I a.is te6t bo6es* for e6ample* (housands for the ! a6is. The D a.is te6t bo6 is only acti+e if you are creating a 3D chart. 3) /elect the %isplay legend chec0bo6 and here you ant the legend displayed on your chart X 2eft* 3ight* ,op or 7ottom. =) In Displa2 grids* select the O a.is or I a.is chec0bo6es to display a grid on your chart. The D a.is chec0bo6 is only acti+e if you are creating a 3D chart. "rid lines are not a+ailable for pie charts.

$hapter 3 $reating $harts and Graphs

-&

B) Clic0 Finish to close the Chart 3iFard and create an e6ample chart obGect on your spreadsheet.

'igure &%: $hart <i1ard dialog E selecting and changing chart elements
Clic0ing Finish closes the Chart 3iFard* but the chart is still in edit mode and you can still modify it. Clic0 outside the chart in any cell or a data series to complete the chart creation.

?ote

#diting charts and graphs


,fter you ha+e created a chart* you may find that data has changed or you ould li0e to impro+e the loo0 of the chart. Calc pro+ides tools for changing the chart type* chart elements* data ranges* fonts* colors* and many other options* and this is described in the follo ing sections.

Changing chart type


!ou can change the chart type at any time. 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to Format < Chart ,ype on the main menu bar* or clic0 the Chart ,ype icon on the 5ormatting toolbar* or right.clic0 on the chart and select Chart ,ype from the conte6t menu to open the Chart Type dialog. This is similar to the Chart 3iFard dialog sho n in 5igure A0 on page -=. 3) /elect a replacement chart type you ant to use. 5or more information* see J/electing chart typeK on page -=. =) Clic0 =6 to close the dialog. B) Clic0 outside the chart to lea+e edit mode.

$hapter 3 $reating $harts and Graphs

-A

#diting data ranges or data series


If the data range or data series has changed in your spreadsheet* you can edit them in your chart. 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to Format < %ata 3anges on the main menu bar* or right.clic0 on the chart and select %ata 3anges from the conte6t menu to open the Data Hanges dialog. This dialog has similar pages to the Chart 3iFard dialogs sho n in 5igure A2 on page -= and 5igure A3 on page -B. 3) To edit the data range used for the chart* clic0 on the %ata 3ange tab. 5or more information* see JData range and a6es labelsK on page -=. =) To edit the data series used for the chart* clic0 on the %ata +eries tab. 5or more information* see JData seriesK on page -B. B) Clic0 =6 to close the dialog. A) Clic0 outside the chart to lea+e edit mode.

7asic editing of chart elements


7asic editing of the title* subtitle and a6es names in your chart is as follo s. 5or more ad+anced editing* see the follo ing sections. 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to nsert < ,itles on the main menu bar* or right.clic0 in the chart area and select nsert ,itles from the conte6t menu to open the Titles dialog. This dialog is similar to the Chart 3iFard dialog sho n in 5igure AB on page -E. 3) Ddit the te6t sho n in the +arious te6t bo6es. =) Clic0 =6 to close the dialog. B) Clic0 outside the chart to lea+e edit mode.

Adding or removing chart elements


/itles2 subtitles and axes na(es
,dding a title* subtitle or a6es names to your chart is the same procedure as gi+en in J7asic editing of chart elementsK abo+e. To remo+e a title* subtitle or a6es names from your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) Open the Titles dialog as abo+e and delete the te6t from the +arious te6t bo6es. 3) Clic0 =6 to close the dialog. =) Clic0 outside the chart to lea+e edit mode.

Le%ends
To add a legend to your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to nsert < 2egend on the main menu bar to open the Legend dialog. This dialog is similar to the %isplay legend section on the Chart 3iFard dialog sho n in 5igure AB on page -E. 3) /elect the %isplay legend chec0bo6 and here you ant the legend displayed on your chart X 2eft* 3ight* ,op or 7ottom.
$hapter 3 $reating $harts and Graphs --

=) Clic0 =6 to close the dialog. B) ,lternati+ely* right.clic0 in the chart area and select nsert 2egend from the conte6t menu to insert a legend in the default position on the right side of the chart. A) Clic0 outside the chart to lea+e edit mode. To remo+e a legend from your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to nsert < 2egend on the main menu bar to open the Legend dialog. 3) Deselect the %isplay legend chec0bo6. =) Clic0 =6 to close the dialog. B) ,lternati+ely* right.clic0 in the chart area and select %elete 2egend from the conte6t menu. A) Clic0 outside the chart to lea+e edit mode.

)xes
To add an a6is to your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to nsert < A.es on the main menu bar* or right.clic0 on the chart and select nsertH%elete A.es from the conte6t menu to open the ,6es dialog &5igure AA). 3) /elect the a6es chec0bo6es that you ant to use on your chart. The D a.is chec0bo6 is only acti+e if you are creating a 3D chart. =) Clic0 =6 to close the dialog. B) Clic0 outside the chart to lea+e edit mode. To remo+e an a6is from your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) Open the ,6es dialog as abo+e and deselect the chec0bo6es for the a6es you ant to remo+e. 3) Clic0 =6 to close the dialog. =) Clic0 outside the chart to lea+e edit mode.

'igure &&: ,*es dialog

Grids
The +isible grid lines can help to estimate the data +alues in the chart. The distance of the grid lines corresponds to the inter+al settings in the /cale tab of the a6is properties.
$hapter 3 $reating $harts and Graphs -.

"rid lines are not a+ailable for pie charts. To add a grid to your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to nsert < (rids on the main menu bar to open the "rids dialog. This is the same dialog as the ,6es dialog &5igure AA)* but it is titled "rids. 3) /elect the grid chec0bo6es that you ant to use on your chart. The D a.is chec0bo6 is only acti+e if you are creating a 3D chart. =) Clic0 =6 to close the dialog. B) Clic0 outside the chart to lea+e edit mode. To remo+e a grid from your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) Open the "rids dialog as abo+e and deselect the chec0bo6es for the grids you ant to remo+e. 3) Clic0 =6 to close the dialog. =) Clic0 outside the chart to lea+e edit mode.

*ata labels
Data labels put information about each data point on the chart. They can be +ery useful for presenting detailed information* but you need to be careful not to create a chart that is too cluttered to read.

'igure &A: Data Labels dialog


The te6t for data labels is ta0en from the spreadsheet data and it cannot be changed here. If the te6t needs to be abbre+iated* or if it did not label your graph as you ere e6pecting* you need to change it in the original data table.

?ote

To add data labels to your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border.
$hapter 3 $reating $harts and Graphs .8

2) /elect the data series on your chart that you ant to label. If you do not select a data series* then all data series on your chart ill be labelled. 3) "o to nsert < %ata 2abels on the menu bar to open the Data Labels dialog &5igure AE). =) /elect the options that you ant to use for data labels. The options a+ailable for data labels are e6plained belo . B) Clic0 =6 to close the dialog. A) ,lternati+ely* right.clic0 on the selected data series and select nsert %ata 2abels from the conte6t menu. This method uses the default setting for the data labels. E) Clic0 outside the chart to lea+e edit mode. To remo+e data labels from you chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) /elect the data labels on your chart that you ant to remo+e. 3) "o to nsert < %ata 2abels on the menu bar* or right.clic0 on the data labels and select Format %ata 2abels from the conte6t menu to open the Data Labels dialog &5igure AE). =) 4a0e sure Data Labels page is selected in the dialog and deselect all the options for the data labels that you ant to remo+e. B) Clic0 =6 to close the dialog and remo+e the data labels. A) ,lternati+ely* right.clic0 on the data series and select %elete %ata 2abels from the conte6t menu. E) Hepeat the abo+e steps to remo+e more data labels because you can only remo+e one data series at a time. -) Clic0 outside the chart to lea+e edit mode. The options a+ailable for data labels in the Data Labels dialog are as follo s.

+how value as number X displays the numeric +alues of the data points. 3hen selected*
this option acti+ates the ?umber format button.

?umber format X opens the #umber 5ormat dialog* here you can select the number
format. This dialog is +ery similar to the one for formatting numbers in cells* see $hapter 9 )ntering= )diting= and 'ormatting Data for more information.

+how value as percentage X displays the percentage +alue of the data points in each
column. 3hen selected* this option acti+ates the Percentage format button.

Percentage format X opens the #umber 5ormat dialog* here you can select the
percentage format. This dialog is +ery similar to the one for formatting numbers in cells* see $hapter 9 )ntering= )diting= and 'ormatting Data for more information.

+how category X sho s the data point te6t labels. +how legend key X displays the legend icons ne6t to each data point label. +eparator X selects the separator bet een multiple te6t strings for the same obGect &if at
least t o options abo+e are selected).

Placement X selects the placement of data labels relati+e to the obGects. 3otate ,e.t X clic0 in the dial to set the te6t orientation for the data labels or enter the
rotation angle for the data labels.

,e.t %irection X specify the te6t direction for a paragraph that uses Comple6 Te6t Layout
&CTL). This feature is only a+ailable if CTL support is enabled.

/rend lines
3hen you ha+e a scattered grouping of points in a graph* you may ant to sho the relationship of the points by using a trend line. Calc has a good selection of regression types you can use for
$hapter 3 $reating $harts and Graphs .#

trend lines' linear* logarithm* e6ponential* and po er. Choose the type that comes closest to passing through all of the points. Trend lines can be added to all 2D chart types e6cept for pie and stoc0 charts. If a data series is selected* a trend line is inserted for that data series only. If no data series are selected* trend lines are inserted for all data series. 3hen inserted* trend lines are automatically sho n in the chart legend.

'igure &-: (rend Lines dialog To insert trend lines to your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) /elect the data series on your chart that you ant to use to insert trend lines. If you do not select a data series* then trend lines for all data series on your chart ill be inserted. 3) To insert trend lines for all data series* go to nsert < ,rend 2ines on the main menu bar to open the Trend Lines dialog &5igure A-). =) To insert a trend line for a single data series* select a data series then go to nsert < ,rend 2ines on the main menu bar* or right.clic0 on the data series and select nsert ,rend 2ine from the conte6t menu to open the Trend Lines dialog for the selected data series.
The dialog to insert a trend line for a single data series is similar to the dialog for all data series &5igure A-)* but has a second page called 2ine here you can select the formatting for the trend line &style* color* idth* and transparency).

?ote

B) /elect the type of trend line that you ant to insert X Linear* Logarithmic* )*ponential* or Power. A) To sho the e@uation or coefficient of determination used to calculate the trend lines* select the options Show eKuation and(or Show coefficient of determination 6397. E) Clic0 =6 to close the dialog and the trend lines are placed onto your chart. -) Clic0 outside the chart to lea+e edit mode.

$hapter 3 $reating $harts and Graphs

.9

?ote

3hen inserted* a trend line has the same color as the corresponding data series. To change the trend line properties* right.clic0 on the trend line and select Format ,rend 2ine on the conte6t menu to open the 2ine page of the Trend Lines dialog.

To sho the e@uation or the coefficient of determination and the e@uation after a trend line has been inserted* right.clic0 on the trend line and select nsert ,rend 2ine #@uation or nsert 3" and ,rend 2ine #@uation from the conte6t menu. 5or more information on the e@uations* see the topic (rend Lines in the LibreOffice Calc 2elp. 3hen you select a trend line* the information for the trend line is sho n in the /tatus 7ar* normally located at the bottom of the spreadsheet. hich is

To delete trend lines from your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) To delete all trend lines* go to nsert < ,rend 2ines on the main menu bar to open the Trend Lines dialog and select ?one then clic0 =6. 3) To delete a single trend line* right.clic0 on the data series and select %elete ,rend line from the conte6t menu.

Mean value lines


4ean +alue lines are special trend lines that sho the mean +alue and can only be used in 2D charts. If a data series is selected* a mean +alue line is inserted for that data series only. If no data series are selected* mean +alue lines are inserted for all data series. 3hen you insert mean +alue lines into your chart* Calc calculates the a+erage of each selected data series and places a colored line at the correct le+el in the chart. The colored line uses the same color as that used for the data series. To insert mean +alue lines on your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) /elect the data series on your chart that you ant to use to insert mean +alue lines. If you do not select a data series* then mean +alue lines for all data series on your chart ill be inserted. 3) To insert mean +alue lines for all data series* go to nsert < 4ean >alue 2ines on the main menu bar. =) To insert a mean +alue line for a single data series* select a data series then go to nsert < 4ean >alue 2ines on the main menu bar* or right.clic0 on the data series and select nsert 4ean >alue 2ine from the conte6t menu. B) Clic0 outside the chart to lea+e edit mode. To delete mean +alue lines from your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) /elect the mean +alue line you ant to delete and press the Delete 0ey* or right.clic0 on the data series and select %elete 4ean >alue 2ine from the conte6t menu. 3) Clic0 outside the chart to lea+e edit mode.

5 or 6 error bars
$se the Q and ! error bars to display error bars for 2D charts only. If a data series is selected* an Q or ! error bar is inserted for that data series only. If no data series are selected* Q or ! error bars are inserted for all data series.
$hapter 3 $reating $harts and Graphs .3

If you are presenting data that has a 0no n possibility of error* such as social sur+eys using a particular sampling method* or you ant to sho the measuring accuracy of the tool you used* you may ant to sho error bars on the chart. To insert error bars to your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border.

'igure &.: )rror Bars dialog 2) /elect the data series on your chart that you ant to use to insert error bars. If you do not select a data series* then error bars for all data series on your chart ill be inserted. 3) To insert error bars for all data series* go to nsert < O #rror 7ars or nsert < I #rror 7ars on the main menu bar to open the Drror 7ars dialog &5igure A<). =) To insert error bars for a single data series* select a data series then go to nsert < O #rror 7ars or nsert < I #rror 7ars on the main menu bar* or right.clic0 on the data series and select nsert O #rror 7ars or nsert I #rror 7ars from the conte6t menu to open the Drror 7ars dialog. B) /elect the re@uired options in )rror $ategor2* )rror 0ndicator or Parameters to use for the error bars. 4ore information on the options for error bars is gi+en belo . A) Clic0 =6 to close the dialog and insert the error bars onto your chart. E) Clic0 outside the chart to lea+e edit mode. To delete error bars from your chart' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) To delete error bars for all data series* go to nsert < O #rror 7ars or nsert < I #rror 7ars on the main menu bar to open the Drror 7ars dialog &5igure A<) and select ?one in )rror $ategor2. 3) Clic0 =6 to close the dialog and delete the error bars from your chart. =) To delete error bars from a single data series* right.clic0 on the data series and select %elete O #rror 7ars or %elete I #rror 7ars from the conte6t menu. B) Clic0 outside the chart to lea+e edit mode. /e+eral options are pro+ided on the Q or ! Drror 7ars dialog. !ou can select only one error category at a time. !ou can also select hether the error indicator sho s both positi+e and negati+e errors* or only positi+e or only negati+e.

$hapter 3 $reating $harts and Graphs

."

Constant value X you can ha+e separate positi+e and negati+e +alues. Percentage X choose the error as a percentage of the data points. The drop.do n list has four options as follo s' Standard error Hariance X sho s error calculated on +ariance Standard deviation X sho s error calculated on standard de+iation )rror margin X you designate the error Cell 3ange X calculates the error based on cell ranges you select. The %arameters section
at the bottom of the dialog changes to allo selection of the cell ranges.

Formatting charts and graphs


Calc pro+ides many options for formatting and fine.tuning the appearance of your charts. To enter formatting mode for your chart'

+electing chart elements


Depending on the purpose of your document* for e6ample a screen presentation or a printed document for a blac0 and hite publication* you might ish to ha+e more detailed control o+er the different chart elements to gi+e you hat you need. To select a chart element' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) /elect the chart element that you ant to format and the chart element ill be highlighted ith selection s@uares or a border of s@uare selection handles. Dach chart element has its o n formatting options and these are e6plained belo . 3) "o to Format on the main menu bar and select the rele+ant option* or right.clic0 to display a conte6t menu rele+ant to the selected element to open the rele+ant formatting dialog.
If your chart has many elements* it is recommended to turn on tooltips in ,ools < =ptions < 2ibre=ffice < (eneral. 3hen you ho+er a cursor o+er an element* Calc ill display the element name hich ill ma0ing it easier in selecting the correct element. The name of the selected element also appears in the /tatus 7ar.

?ote

Formatting options
Format +election X opens a dialog here you can specify the area fill* borders*
transparency* characters* fonts* and other attributes of the selected element on the chart.

Position and +i5e X opens the %osition and /iFe dialog &see J%osition and /iFe dialogK on
page 10A).

Arrangement X pro+ides t o options' 7ring Forward and +end 7ackward* of hich only
one may be acti+e for some items. $se these options to arrange o+erlapping data series.

,itle X formats the titles for the chart and chart a6es. 2egend X formats ho the legend appears and positioned on the chart A.is X formats the lines that create the chart as ell as the font of the te6t that appears on
both the Q and ! a6es.
$hapter 3 $reating $harts and Graphs .%

(rid X formats the lines that create a grid for the chart. Chart 8all* Chart Floor* or Chart Area X formats ho the chart all* chart floor and chart
area appear on your chart. #ote that the chart floor is a+ailable for 3D charts.

Chart ,ype X changes hat type of chart is displayed and hether it is 2D or 3D chart.
#ote that only column* bar* pie and area charts can be displayed as a 3D chart.

%ata 3anges X e6plained in JData range and a6es labelsK on page -= and JDditing data
ranges or data seriesK on page --.

'% >iew X formats 3D charts and is only a+ailable for 3D charts &see page <E).

4oving chart elements


!ou may ish to mo+e or resiFe indi+idual elements of a chart* independent of other chart elements. 5or e6ample* you may ish to reposition the legend from its default position on the right of the chart to belo the chart. %ie charts also allo mo+ing of indi+idual edges of the pie as ell as e6ploding the entire pie. 2o e+er* you cannot mo+e an indi+idual point or data series. 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) 4o+e the cursor o+er the chart element you ant to mo+e* then clic0 and drag to mo+e the element. If the element is already selected* then the cursor changes to the mo+e icon &normally a small hand)* then clic0 and drag to mo+e the element. 3) Helease the mouse button hen the element is in the desired position.
If your chart is a 3D chart* then round selection handles appear hen a 3D chart element is selected. These round selection handles control the 3D angle of the element. !ou cannot resiFe or reposition the element hile the round selection handles are sho ing. $se Shift5$lic4 to get the s@uare selection handles and you can no resiFe and reposition your 3D chart graphic.

?ote

Changing chart area background


The chart area is the area surrounding the chart graphic* including the main title* subtitle and legend. 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to Format < Chart Area on the main menu bar or right.clic0 in the chart area and select Format Chart Area from the conte6t menu to open the Chart ,rea dialog &5igure E0). 3) /elect the desired formatting from the 7orders* Area and ,ransparency pages. =) Clic0 =6 to close the dialog and sa+e your changes.

Changing chart graphic background


The Chart 3all is the area that contains the chart graphic. 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to Format < Chart 8all on the main menu bar or right.clic0 in the chart area and select Format Chart Area from the conte6t menu to open the Chart 3all dialog. This dialog is similar to the Chart ,rea dialog in 5igure E0. 3) /elect the desired formatting from the 7orders* Area and ,ransparency pages. =) Clic0 =6 to close the dialog and sa+e your changes.

$hapter 3 $reating $harts and Graphs

.&

'igure A8: $hart ,rea dialog

Changing colors
If you ant to modify the color scheme from the default* or you ant to add e6tra chart colors for charts in all your documents* go to ,ools < =ptions < Charts < %efault Colors top ma0e the changes. Changes made in this dialog affect the default chart colors for any chart you ma0e in the future. /ee the Getting Started Guide for more information on changing colors.

'% charts
The 3D Cie dialog &5igure E1) has three pages'

Perspective X here you can change the perspecti+e of the chart. Appearance X /elect hether to use a simple or realistic scheme for your 3D chart. llumination X controls the light source that illuminates your 3D chart and here the
shado s ill fall.

'igure A#: 3D Hiew dialog E Perspective page


$hapter 3 $reating $harts and Graphs .A

&otation and perspective


To rotate a 3D chart or change its perspecti+e +ie ' 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to Format < '% >iew on the main menu bar or right.clic0 in the chart area and select '% >iew from the conte6t menu to open the 3D Cie dialog &5igure E1). 3) Clic0 on the Perspective tab to open the page. =) Dnter the re@uired settings for 3ight angled a*es and Perspective. B) Clic0 =6 to close the dialog and sa+e your changes. /ome hints for using the Perspective page'

/et all angles to 0 for a front +ie of the chart. %ie charts and donut charts are sho n as
circles.

3ith 3ight!angled a*es enabled* you can rotate the chart contents only in the Q and !
directionN that is* parallel to the chart borders.

,n Q +alue of <0* ith ! and T set to 0* pro+ides a +ie from the top of the chart. 3ith Q set
to X<0* the +ie is from the bottom of the chart.

Hotation is applied in the follo ing order' Q.a6is first* then !.a6is* and T.a6is last. 3hen shading is enabled and you rotate a chart* the lights are rotated as if they are fi6ed to
the chart.

The rotation a6es al ays relate to the page* not to the a6es of the chart. This is different
from some other chart programs.

/elect the Perspective option to +ie the chart in central perspecti+e as through a camera
lens instead of using a parallel proGection. /et the focus length ith the spin button or type a number in the bo6. 100d gi+es a perspecti+e +ie here a far edge in the chart loo0s appro6imately half as big as a near edge.

&otatin% 7* c"arts interactivel$


In addition to using the %erspecti+e page of the 3D Cie dialog to rotate 3D charts* you can also rotate 3D charts interacti+ely. 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) /elect the Chart 3all and round selection handles appear. 3) 2o+er the mouse cursor o+er a corner handle and the cursor changes to a rotation icon. =) %ress and hold the left mouse button and drag the direction you ant. , dashed outline of the chart is +isible hile you drag to help you see ho the result ill loo0. B) Helease the mouse button hen satisfied.

)ppearance
$se the ,ppearance page to modify some aspects of the appearance of a 3D chart. 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to Format < '% >iew on the main menu bar or right.clic0 in the chart area and select '% >iew from the conte6t menu to open the 3D Cie dialog &5igure E2). 3) Clic0 on the Appearance tab to open the page. =) /elect a scheme from the Scheme drop do n list bo6 X 3ealistic &default) or Simple. 3hen you select a scheme* the options and the light sources are set accordingly.

$hapter 3 $reating $harts and Graphs

.-

'igure A9: 3D Hiew dialog E ,ppearance page B) If necessary* select or deselect a combination of Shading* ObIect borders* or 3ounded edges that is not gi+en by the 3ealistic or Simple schemes to create a $ustom scheme. A) Clic0 =6 to close the dialog and sa+e your changes. /ome hints for the Appearance page. Depending on the scheme selected* not all options are a+ailable.

/elect Shading to use the "ouraud method for rendering the surface. Other ise* a flat
method is used. The flat method sets a single color and brightness for each polygon. The edges are +isible* soft gradients and spot lights are not possible. The "ouraud method applies gradients for a smoother* more realistic loo0. /ee the Draw Guide for more information on the use of shading.

/elect ObIect borders to dra lines along the edges. /elect 3ounded edges to smooth the edges of bo6 shapes. llu(ination
$se the llumination page &5igure E3) to set the light sources for the 3D +ie . /ee the Draw Guide for more information on setting the illumination.

'igure A3: 3D Hiew dialog E 0llumination page 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to Format < '% >iew on the main menu bar or right.clic0 in the chart area and select '% >iew from the conte6t menu to open the 3D Cie dialog &5igure E3). 3) Clic0 on the llumination tab to open the page.
$hapter 3 $reating $harts and Graphs ..

=) Clic0 any of the eight buttons to s itch a directed light source on or off. 7y default* the second light source is s itched on. It is the first of se+en normal* uniform light sources. The first light source proGects a specular light ith highlights. B) 5or the selected light source* select a color from the drop do n list Gust belo the eight light source buttons. #ote that the brightness +alues of all lights are added together* so use dar0 colors hen you enable multiple lights. A) Dach light source al ays points at the middle of the obGect initially. If necessary* change the position of the light source by mo+ing the +ertical and(or horiFontal sliders to set position of the selected light source. E) Chec0 the small pre+ie on the dialog to see the effect of repositioning the light source. -) Clic0 the button in the bottom right corner of the pre+ie to s itch the internal illumination model bet een a sphere and a cube. <) /elect the ambient light using the ,mbient light drop do n list to define the ambient light hich shines ith a uniform intensity from all directions. 10) Clic0 =6 to close the dialog and sa+e your changes.

(rids
!ou can di+ide the a6es into sections by assigning gridlines to them. This allo s you to get a better o+er+ie of the chart* especially if you are or0ing ith large charts. The ! a6is maGor grid is acti+ated by default. $se the "rid dialog to set the formatting options for the lines used as grids in your chart by selecting line style* color* idth and transparency. The dialog is similar to the Line page in the Chart ,rea dialog sho n in 5igure E0 on page <E.

A.es
/ometimes you need to ha+e a special scale for one of the a6es of your chart* or you need smaller grid inter+als* or you ant to change the formatting of the labels on the a6is. ,fter highlighting the a6is you ish to change* right.clic0 and choose one of the items from the conte6t menu. 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) "o to Format < I A.is or O A.is on the main menu bar and select the a6is you ant to format* or right.clic0 in on the chart the a6is you ant to format and select Format A.is from the conte6t menu to open the ,6is dialog &5igure E=). The options a+ailable in the dialog depend on hich a6is as selected* type of a6is used* type of chart and hether the chart is 2D or 3D.

'igure A": F ,*is dialog E Scale page

$hapter 3 $reating $harts and Graphs

#88

3) Clic0 on the tab of the page here you to ma0e changes using the a+ailable options. The options for each page are e6plained belo . =) Clic0 =6 to close the dialog and sa+e your changes.

!cale
!ou can enter +alues for subdi+iding a6es on the /cale page &5igure E=).

3everse direction X defines here the lo er and the higher +alues are displayed at the
a6is. Deselect this option to use a mathematical direction. That means for Cartesian coordinate systems that the Q.a6is sho s the lo er +alues on the left and the !.a6is sho s the lo er +alues at the bottom. 5or polar coordinate systems* the mathematical angle a6is direction is countercloc0 ise and the radial a6is is from inner to outer.

2ogarithmic scale X specifies that you ant the a6is to be subdi+ided logarithmically. $se
this option if you are or0ing ith +alues that differ sharply from each other. !ou can use logarithmic scaling to ma0e the grid lines of the a6is e@uidistant but ha+e +alues that may increase or decrease.

4inimum X defines the minimum +alue for the beginning of the a6is. Automatic must be
deselected to set this option manually.

4a.imum X defines the ma6imum +alue for the end of the a6is. Automatic must be
deselected to set this option manually.

4aCor interval X defines the inter+al for the main di+ision of the a6es. The main inter+al
cannot be larger than the +alue area. Automatic must be deselected to set this option manually.

4inor interval count X defines the inter+al for the subdi+ision of the a6es. Automatic must
be deselected to set this option manually.

Automatic X you must first deselect this option to modify the +alues. Disable this option if
you are or0ing ith fi6ed +alues* as it does not permit automatic scaling.

,ype X for some types of a6es* you can select to format an a6is as te6t or date* or to detect
the type automatically. 5or a data a6is type* you can set the follo ing options.

4inimum and ma6imum +alue to be sho n on the ends of the scale. Hesolution can be set to sho days* months* or years as inter+al steps. 4aGor inter+al can be set to sho a certain number of days* months* or years. 4inor inter+al can be set to sho a certain number of days* months* or years.

'igure A%: F ,*is dialog E Positioning page

$hapter 3 $reating $harts and Graphs

#8#

1ositionin%
The %ositioning page &5igure EB) controls the positioning of the a6is.

A.is line X select here $ross other a*is at from the drop do n list X Start* )nd* or at a
specified Halue.

2abels X select here Place labels' is set from the drop do n list X @ear a*is* @ear a*is
6other side7* Outside start* or Outside end.

nterval marks

:aIor X specifies hether the mar0s are to be on the inner or outer side of the a6is. It is possible to combine both' you ill then see mar0s on both sides. 0nner X specifies that mar0s are placed on the inner side of the a6is. Outer X specifies that mar0s are placed on the outer side of the a6is. :inor X defines the mar0ing dashes bet een the a6is mar0s. It is possible to acti+ate both fields. This ill result in a mar0ing line running from the outside to the inside. 0nner X specifies that minor inter+al mar0s are placed on the inner side of the a6is. Outer X specifies that minor inter+al mar0s are placed on the outer side of the a6is. Place mar4s X select here to place the mar0s from the drop do n list X ,t labels* ,t a*is* or ,t a*is and labels.

Line

$se the Line page to set the formatting options for the a6is line by selecting line style* color* idth* and transparency. The dialog is similar to the Chart ,rea dialog sho n in 5igure E0 on page <E.

'igure A&: F ,*is dialog E Label page

Label
On the Label page &5igure EA)* you can decide hether to sho or hide the labels* ho to handle them hen they ill not all fit neatly into one ro &for e6ample* if the ords are too long)* and hether to ha+e them at an angle to the a6is.

$hapter 3 $reating $harts and Graphs

#89

+how labels X specifies hether to sho or hide the a6is labels. =rder X the options on this page are only a+ailable for a 2D chart. In this area* you can
define the alignment of the number labels on the Q or ! a6is.

?ote

(ile X arranges numbers on the a6is side by side. Stagger odd X staggers numbers on the a6is* e+en numbers lo er than odd numbers. Stagger even X stagger numbers on the a6es* odd numbers lo er than e+en numbers. ,utomatic X automatically arranges numbers on the a6is.
%roblems may arise in displaying labels if the siFe of your chart is too small. !ou can a+oid this by either enlarging the +ie or decreasing the font siFe.

,e.t flow X determines the te6t flo of the a6is label. Overlap X specifies that te6t in a6is labels may o+erlap other a6is labels. This can be
especially useful if there is a lac0 of space.

Brea4 X allo s a te6t brea0.

,e.t direction X defines the te6t direction of labels. ,B$D wheel X clic0 and drag the indicator on the heel defines the +ariable te6t
orientation. The characters U,7CDU on the heel correspond to the ne setting.

Herticall2 stac4ed X assigns +ertical te6t orientation for labels. If you define a +ertical Q.a6is label* the te6t may be cut off by the line of the 6.a6is. Degrees X manually enter the orientation angle for the labels. (e*t direction X specify the te6t direction for any te6t that uses comple6 te6t layout &CTL) and is only a+ailable if )nhanced language support is enabled In ,ools < =ptions < 2anguage +ettings.

.u(bers
$se the #umbers page to set the attributes for any numbers used on the a6is. This page is +ery similar to the one for formatting numbers in cellsN see $hapter 9 )ntering= )diting= and 'ormatting Data for more information.

Font and Font Effects


$se the 5ont and 5ont Dffects pages to set the attributes for fonts and the type of font effects used for a6is labels. These pages are +ery similar to the ones for fonts and font effects in cellsN see $hapter 9 )ntering= )diting= and 'ormatting Data for more information.

)sian /$po%rap"$
/ets the ,sian typographic options for a6is labels and is only a+ailable if )nhanced language support is enabled In ,ools < =ptions < 2anguage +ettings.

Apply list of forbidden characters to the beginning and end of line X pre+ents the
characters in the list from starting or ending a line. The characters are relocated to either the pre+ious or the ne6t line. To edit the list of restricted characters* go to ,ools < =ptions < 2anguage +ettings < Asian 2ayout.

Allow hanging punctuation X pre+ents commas and periods from brea0ing the line.
Instead* these characters are added to the end of the line* e+en in the page margin.

Apply spacing between Asian$ 2atin and Comple. te.t X inserts a space bet een
,sian* Latin and comple6 characters.

$hapter 3 $reating $harts and Graphs

#83

;ierarchical a.is labels


4ultiple columns of categories can be displayed in a hierarchical manner at the a6is on your chart. 2ierarchical a6es labels are created automatically if the first columns &or ro s) contain data that is te6t. ,n e6ample of hierarchical labels is sho n in 5igure EE here the first column indicates the @uarters and the second column sho s the months.

'igure AA: )*ample of hierarchical a*es labels

'igure A-: Data Series dialog E Line page

$hapter 3 $reating $harts and Graphs

#8"

+electing and formatting symbols


In line and scatter charts the symbols representing the points can be changed to a different symbol or color through the obGect properties dialog. 1) /elect the chart by double.clic0ing on it to enter edit mode. The chart should no be surrounded by a gray border. 2) /elect the data series you ant to change. 3) "o to Format < Format +election on the main menu bar or right.clic0 and select Format %ata +eries from the conte6t menu to open the Data /eries dialog &5igure E-). =) Open the 2ine page of the Data /eries dialog by clic0ing on its tab. B) In the con section* open the drop.do n list and select an option for your symbol from @o s2mbol* ,utomatic* 'rom file* Galler2 or S2mbols. , pre+ie of your selection is sho n in the pre+ie bo6 at the bottom of the dialog.

'rom file opens a file bro ser so you can select a file to use for your symbol. Galler2 opens a list sho ing the a+ailable graphics you can select for your symbol. S2mbols opens a list sho ing the a+ailable symbols you can select.

A) Dnter the <idth and the +eight you ant to use for your ne symbol. E) /elect Deep ratio if you ant the idth and height of your symbol to maintain its ratio.

Adding drawing obCects to charts


,s in the other LibreOffice components* you can use the Dra ing toolbar to add shapes such as lines* rectangles* circles* te6t obGects* or more comple6 shapes such as symbols or bloc0 arro s. $se these additional shapes to add e6planatory notes and highlight points on your chart* for e6ample. 5or more information on using the Dra ing toolbar and dra ing shapes* see the Draw Guide.

3esi5ing and moving the chart


!ou can resiFe or mo+e all elements of a chart at the same time* in t o ays' interacti+ely* or by using the %osition and /iFe dialog. !ou can use a combination of both methods' interacti+e for a @uic0 and easy change* then the %osition and /iFe dialog for precise siFing and positioning.

nteractively
To resiFe a chart interacti+ely' 1) Clic0 once on the chart to select it and s@uare selection handles appear around the border of the chart. 2) To increase or decrease the siFe of the chart* clic0 and drag one of the mar0ers. The cursor indicates the direction in hich you can increase or decrease the chart siFe. To mo+e a chart interacti+ely' 1) Clic0 once on the chart to select it and s@uare selection handles appear around the border of the chart. 2) 2o+er the cursor any here o+er the chart until it changes to a mo+e cursor &shape depends on computer setup). 3) Clic0 and drag the chart to its ne location. =) Helease the mouse button hen the chart is in the re@uired position.

$hapter 3 $reating $harts and Graphs

#8%

Position and +i5e dialog


To resiFe or mo+e a chart using the %osition and /iFe dialog' 1) Clic0 once on the chart to select it and s@uare selection handles appear around the border of the chart. 2) Hight.clic0 and select Position and +i5e from the conte6t menu to open the %osition and /iFe dialog &5igure E<). 3) /elect the options you ant to use ion the %osition and /iFe* Hotation and /lant S corner Hadius pages on this dialog. =) Clic0 =6 to close the dialog and sa+e your changes. %osition and siFe of a chart are coordinated relati+e to a fi6ed point &the base point) and* by default* this base point is located at the upper left of a chart. !ou can temporarily change this base point to ma0e positioning or siFing of a chart simpler. Clic0 one of the points in Base point corresponding to the location you ant to use for either Position or Si1e. 3hen you clic0 =6 and close this dialog* Calc resets the base point to the default position.

'igure A.: Position and Si1e dialog

1osition and !i-e


The options a+ailable on the Position and +i5e page &5igure E<) are as follo s'

Position X specify the location of the selected obGect on the page. Position ; X enter the horiFontal distance that you ant to mo+e the obGect relati+e to
the base point selected in the grid.

Position F X enter the +ertical distance that you ant to mo+e the obGect relati+e to the base point selected in the grid. Base point X select a base point in the grid* and then enter the amount that you ant to shift the obGect relati+e to the base point that you selected in the Position F and Position ; bo6es. The base points correspond to the selection handles on an obGect.

+i5e X specify the amount by hich you ant to resiFe the selected obGect ith respect to
the selected base point.

<idth X enter a idth for the selected obGect.

$hapter 3 $reating $harts and Graphs

#8&

+eight X enter a height for the selected obGect. Deep ratio X maintains proportions bet een idth and height selected obGect. hen you resiFe the

Base point X select a base point in the grid and then enter the ne siFe dimensions for the selected obGect in the <idth and +eight bo6es.

Protect X pre+ents changes to the position or the siFe of the selected obGect. Position X pre+ents you from mo+ing the obGect. Si1e X pre+ents you from resiFing the obGect. Adapt X specifies if the siFe should be adGusted to fit the siFe of entered te6t. 'it width to te*t X e6pands the idth of the obGect to the idth of the te6t* if the obGect is
smaller than the te6t.

&otation

'it height to te*t X e6pands the height of the obGect to the height of the te6t* if the obGect is smaller than the te6t.

The options for the 3otation page &5igure -0) are as follo s'

Pivot point X the selected obGect is rotated around a pi+ot point that you specify. The
default pi+ot point is at the center of the obGect. If you set a pi+ot point too far outside of the obGect boundaries* the obGect could be rotated off of the page.

Position ; X enter the horiFontal distance from the left edge of the page to the pi+ot point. Position F X enter the +ertical distance from the top edge of the page to the pi+ot point. Default settings X select here you ant to place the pi+ot point on the obGect. The default setting is the center of the obGect. heel.

3otation angle X specify the number of degrees that you ant to rotate the selected
obGect* or clic0 in the rotation

,ngle X enter the number of degrees that you ant to rotate the selected obGect. Default settings X clic0 and drag the indicator to specify the rotation angle in degrees. The number of degrees rotated is sho n in the ,ngle bo6.

'igure -8: Position and Si1e dialog E 3otation page


$hapter 3 $reating $harts and Graphs #8A

!lant 4 Corner &adius


The options for the +lant B Corner 3adius page &5igure -1) are as follo s'

Corner 3adius X you can only round the corners of a rectangular obGect. 3adius X enter the radius of the circle that you ant to use to round the corners. +lant X slants the selected obGect along an a6is that you specify. ,ngle X enter the angle of the slant a6is.

'igure -#: Position and Si1e dialog E Slant > $orner 3adius page

#.porting charts
!ou can e6port a chart as a graphic that you can use in other documents. 1) Clic0 once on the chart to select it. /@uare selection handles appear around the border of the chart. 2) Hight.clic0 on the selected chart and select #.port as graphic from the conte6t menu. 3) In the "raphics D6port dialog that opens* type a name for the graphic file* select the location here you ant to sa+e the file* and select the graphic format you ant to use. =) Clic0 +ave and your chart ill be e6ported as a graphic to the location you specified and the format you specified.

(allery of chart types


It is important to remember that hile your data can be presented ith a number of different charts* the message you ant to con+ey to your audience should determine hat type of chart you use. The follo ing sections present e6amples of the chart types that Calc pro+ides* ith some notes on the purpose of each chart type.

Column charts
Column charts are commonly used for data that sho s trends o+er time. They are best for charts that ha+e a relati+ely small number of data points. It is the default chart type pro+ided by Calc* as it is one of the most useful charts and the easiest to understand. If you ha+e a large time series* a line chart ould be better suited. , column chart sho s +ertical bars* ith the height of each bar being proportional to its +alue. The Q.a6is sho s categories and the !.a6is sho s the +alue for each category.

?ormal X this subtype sho s all data +alues belonging to a category ne6t to each other.
The main focus is on the indi+idual absolute +alues* compared to e+ery other +alue.

+tacked X this subtype sho s the data +alues of each category on top of each other. The
main focus is the o+erall category +alue and the indi+idual contribution of each +alue ithin its category.
$hapter 3 $reating $harts and Graphs #8-

Percent X this subtype sho s the relati+e percentage of each data +alue ith regard to the
total of its category. The main focus is the relati+e contribution of each +alue to the category total. !ou can enable a 3D +ie of the data +alues. , realistic 3D chart tries to gi+e the best 3D loo0 hile a simple 3D chart tries to mimic the chart +ie of other products. 5or 3D charts* you can select the shape of each data +alue from 7o6* Cylinder* Cone* and %yramid.

7ar charts
, bar chart sho s horiFontal bars. The length of each bar is proportional to its +alue. The !.a6is sho s categories and the Q.a6is sho s the +alue for each category. The subtypes for bar charts are the same as for column charts* gi+en abo+e. 7ar charts are e6cellent for gi+ing an immediate +isual impact for data comparison in cases hen time is not an important factor* for e6ample* hen comparing the popularity of a fe products in a mar0etplace. In the e6amples belo '

The first chart is achie+ed by using the chart iFard ith nsert < (rids* deselecting y.a6is*
and using nsert > 4ean >alue 2ines.

The second chart is a 3D chart created ith a simple border and the 3D chart area t isted
around.

The third chart is an attempt to get rid of the legend and put labels sho ing the names of
the companies on the a6is instead. 3e also changed the colors to a hatch pattern.

'igure -9: Bar chart e*amples

Pie charts
, pie chart sho s +alues as circular sectors of the total circle. The length of the arc* or the area of each sector* is proportional to its +alue.

Pie X this subtype sho s sectors as colored areas of the total pie* for one data column
only. In the created chart* you can clic0 and drag any sector to separate that sector from the remaining pie or to Goin it bac0.

#.ploded pie X this subtype sho s the sectors already separated from each other. !ou
can clic0 and drag any sector to mo+e it along a radial from the pie center.

%onut X this subtype can sho multiple data columns. Dach data column is sho n as one
donut shape ith a hole inside* here the ne6t data column can be sho n. !ou can clic0 and drag an outer sector to mo+e it along a radial from the donut center.

$hapter 3 $reating $harts and Graphs

#8.

#.ploded donut X this subtype sho s the outer sectors already separated from the
remaining donut. !ou can clic0 and drag an outer sector to mo+e it along a radial from the donut?s center. %ie charts are e6cellent hen you need to compare proportions. 5or e6ample* comparisons of departmental spending' hat the department spent on different items or hat different departments spent. They or0 best ith smaller numbers of +alues* about half a doFenN more than this and the +isual impact begins to fade. ,s the Chart 3iFard guesses the series that you ish to include in your pie chart* you might need to adGust this initially on the Data Hanges page of the 3iFard if you 0no you ant a pie chart* or by using the Format < %ata 3anges < %ata +eries dialog. !ou can do some interesting things ith a pie chart* especially if you ma0e it into a 3D chart. It can then be tilted* gi+en shado s* and generally turned into a or0 of art. 1ust do not clutter it so much that your message is lost* and be careful that tilting does not distort the relati+e siFe of the segments. !ou can choose in the Chart 3iFard to e6plode the pie chart* but this is an all or nothing option. If your aim is to accentuate one piece of the pie* you can separate out one piece by carefully highlighting it after you ha+e finished ith the Chart 3iFard* and dragging it out of the group. 3hen you do this you might need to enlarge the chart area again to regain the original siFe of the pieces.

'igure -3: Pie chart e*amples The effects achie+ed in 5igure -3 are e6plained belo .

2D pie chart ith one part of the pie e6ploded' /elect nsert < 2egend and deselect the
Displa2 legend bo6. /elect nsert > %ata 2abels and select Show value as number. Then carefully select the piece you ish to highlight* mo+e the cursor to the edge of the piece and clic0 &the piece ill ha+e highlight s@uares to mar0 it)* and then drag it out from the rest of the pieces. The pieces ill decrease in siFe* so you need to highlight the chart all and drag it at a corner to increase the siFe.

3D pie chart ith realistic schema and illumination' /elect Format < '% view <
llumination here you can change the direction of the light* the color of the ambient light* and the depth of the shade. ,lso adGusted is the 3D angle of the disc in the Perspective dialog on the same set of tabs. The chart updates as you ma0e changes* so you can immediately see the effects. If you ant to separate out one of the pieces* clic0 on it carefullyN you should see a ire frame highlight. Drag it out ith the mouse and then* if necessary* increase the siFe of the chart all.

3D pie chart ith different fill effects in each portion of the pie' /elect nsert < %ata labels
and select Show value as percentage. Then carefully select each of the pieces so that it has a ire frame highlight and right.clic0 to get the obGect properties dialogN choose the ,rea tab. 5or one e selected a bitmap* for another a gradient and for the third e used the (ransparenc2 tab and adGusted the transparency to B0d.
$hapter 3 $reating $harts and Graphs ##8

Donut charts sho n in 5igure -= are subtypes of the pie chart. To create one* select %ie in
the Chart 3iFard dialog* and select the third or fourth type of pie chart. 5or more +ariety* use a 3D Loo0.

'igure -": Donut chart e*amples

Area charts
,n area chart sho s +alues as points on the !.a6is and the Q.a6is sho s categories. The ! +alues of each data series are connected by a line and the area bet een lines is filled ith a color. The focus of an area chart is to emphasiFe the changes from one category to the ne6t.

?ormal X this subtype plots all +alues as absolute ! +alues. It first plots the area of the last
column in the data range* then the ne6t to last* and so on* and finally the first column of data is dra n. Thus* if the +alues in the first column are higher than other +alues* the last dra n area ill hide the other areas.

+tacked X this subtypes plots +alues cumulati+ely stac0ed on each other. It ensures that all
+alues are +isible* and no data set is hidden by others. 2o e+er* the ! +alues no longer represent absolute +alues* e6cept for the last column hich is dra n at the bottom of the stac0ed areas.

Percent X this subtype plots +alues cumulati+ely stac0ed on each other and scaled as
percentage of the category total. ,n area chart is a +ersion of a line or column graph. It may be useful here you ish to emphasiFe +olume of change. ,rea charts ha+e a greater +isual impact than a line chart* but the data you use ill ma0e a difference.

'igure -%: ,rea chart e*amples E the good= the bad= and the ugl2

$hapter 3 $reating $harts and Graphs

###

,s sho n in 5igure -B* an area chart is sometimes tric0y to use. This may be one good reason to use transparency +alues in an area chart. ,fter setting up the basic chart using the Chart 3iFard* do this' 1) Hight.clic0 on the ! a6is and select %elete 4aCor (rid from the conte6t menu. ,s the data o+erlaps* some of it is missing behind the first data series* as sho n in the e6ample on the left. This is not hat you ant. , better solution is sho n in the center e6ample. 2) ,fter deselecting the ! a6is grid* right.clic0 on each data series in turn and select Format %ata +eries. On the (ransparenc2 tab* set Transparency to B0d. The transparency ma0es it easy to see the data hidden behind the first data series. #o * right.clic0 on the Q a6is and select Format A.is. On the Label tab* select ,ile in the Order section and set the Te6t orientation to BB degrees. This places the long labels at an angle. 3) To create the e6ample on the right* after doing the steps abo+e* right.clic0 and select Chart ,ype. /elect the '% 2ook option and select 3ealistic from the drop.do n list. 3e also t isted the chart area around and ga+e the chart all a picture of the s0y. ,s you can see* the legend turns into labels on the F.a6is. O+erall* although it is +isually more appealing* it is more difficult to see the point you are trying to ma0e ith the data. Other ays of +isualiFing the same data series are represented by the stac0ed area chart or the percentage stac0ed area chart &5igure -A). In the first* each number of each series is added to the others so that it sho s an o+erall +olume* but not a comparison of the data. The percentage stac0ed chart sho s each +alue in the series as a part of the hole. 5or e6ample in 1une all three +alues are added together and that number represents 100d. The indi+idual +alues are a percentage of that. 4any charts ha+e +arieties hich ha+e this option.

'igure -&: )*amples of stac4ed and percentage stac4ed area charts

2ine charts
, line chart is a time series ith a progression. It is ideal for ra data and useful for charts ith plentiful data that sho trends or changes o+er time here you ant to emphasiFe continuity. On line charts* the Q.a6is is ideal to represent time series data. , line chart sho s +alues as points on the !.a6is and the Q.a6is sho s categories. The ! +alues of each data series can be connected by a line.

Points only X this subtype plots only points. Points and lines X this subtype plots points and connects points of the same data series
by a line.

2ines only X this subtype plots only lines. '% lines X this subtype connects points of the same data series by a 3D line.

$hapter 3 $reating $harts and Graphs

##9

/elect +tack series to arrange the points for ! +alues cumulati+e abo+e each other. The ! +alues no longer represent absolute +alues* e6cept for the first column hich is dra n at the bottom of the stac0ed points. If you select Percent* the ! +alues are scaled as percentage of the category total. /elect +mooth lines to dra cur+es through the points instead of straight lines. Clic0 Properties for a dialog to change the cur+e properties. Things to do ith lines' thic0en them* ma0e them 3D* smooth the contours* Gust use points. 2o e+er* 3D lines can confuse the +ie er* so Gust using a thic0er line often or0s better.

'igure -A: Line chart e*amples

+catter or OI charts
56 8!catter9
,n Q! chart in its basic form is based on one data series consisting of a name* a list of Q.+alues* and a list of !.+alues. Dach +alue pair &Q S !) is sho n as a point in a coordinate system. The name of the data series is associated ith the !.+alues and sho n in the legend. 3hen creating an Q! chart refer to the follo ing e6ample tas0s. !our Q! chart may ha+e more than one data series.

/cale the Q.a6is. "enerate a parameter cur+e* for e6ample a spiral. Dra the graph of a function. D6plore the statistical association of @uantitati+e +ariables

56 c"art variants
!ou can select an Q! chart +ariant on the first page of the Chart 3iFard* or by choosing Format < Chart ,ype for a chart in edit mode. The chart is created ith default settings. ,fter the chart is finished* you can edit its properties to change the appearance. Line styles and icons can be changed on the 2ine page of the data series properties dialog. Double.clic0 any data point to open the Data /eries dialog. In this dialog* you can change many properties of the data series. 5or 2D charts* you can select nsert < I #rror 7ars to enable the display of error bars. !ou can enable the display of mean +alue lines and trend lines using commands on the Insert menu.

$hapter 3 $reating $harts and Graphs

##3

Points only X each data point is sho n by an icon. Calc uses default icons ith different
forms and colors for each data series. The default colors are set in ,ools < =ptions < Charts < %efault Colors.

2ines =nly X this +ariant dra s straight lines from one data point to the ne6t. The data
points are not sho n by icons. The dra ing order is the same as the order in the data series. 4ar0 +ort by O >alues to dra the lines in the order of the Q +alues. This sorting applies only to the chart* not to the data in the table.

Points and 2ines X this +ariant sho s points and lines at the same time. '% 2ines X the lines are sho n li0e tapes. The data points are not sho n by icons. In the
finished chart select 3D Cie to set properties li0e illumination and angle of +ie .

+mooth 2ines 4ar0 +mooth 2ines to dra cur+es instead of straight line segments. Clic0 Properties to set details for the cur+es. Cubic +pline interpolates your data points ith polynomials of degree 3. The
transitions bet een the polynomial pieces are smooth* ha+ing the same slope and cur+ature.

The 3esolution determines ho many line segments are calculated to dra a piece of polynomial bet een t o data points. !ou can see the intermediate points if you clic0 any data point. 7/+pline uses a parametric* interpolating 7.spline cur+e. Those cur+es are built piece ise from polynomials. The %egree of polynomials sets the degree of these polynomials.

Exa(ple of 56 c"art
/catter charts are great for +isualiFing data that you ha+e not had time to analyFe and they may be the best for data hen you ha+e a constant +alue against hich to compare the dataN for e6ample* eather data* reactions under different acidity le+els* conditions at altitude* or any data hich matches t o series of numeric data. In contrast to line charts* the Q.a6is are the left to right labels* hich usually indicate a time series.

'igure --: ;F 6Scatter7 chart e*ample

$hapter 3 $reating $harts and Graphs

##"

/catter charts may surprise those unfamiliar ith ho they or0. 3hile constructing the chart* if you choose %ata 3ange < %ata series in rows* the first ro of data represents the Q.a6is. The rest of the ro s of data are then compared against the first ro data. 5igure -- sho s a comparison of three currencies ith the 1apanese !en. D+en though the table presents the monthly series* the chart does not. In fact the 1apanese !en does not appearN it is merely used as the constant series that all the other data series are compared against.

7ubble charts
, bubble chart is a specific +ariation of a scatter chart in hich the data points are replaced ith bubbles sho ing the relations of three +ariables. 7ubble charts are often used to present financial data or social(demographic data. It sho s the relations of three +ariables in t o dimensions. T o +ariables are used for the position on the Q.a6is and !.a6is* hile the third is sho n as the relati+e siFe of each bubble. One or more data series can be included in a single chart. The data series dialog for a bubble chart has an entry to define the data range for the bubbles and their siFes. It is sometimes easier to build a bubble chart manually in the data range entry section of the chart iFard. In the e6ample chart sho n in 5igure -<* the range including the dates and the three series as highlighted before starting the chart iFard. If you do not include the top ro ith the dates* there is no ay to include this data as a category later. The names of the series ere added manually* as ere the ranges for the second and third series. Dach data series as highlighted and the data points added and formatted to be in the center of the data point. In this case the number & hich is the JdimensionK) as deselected and category &the year) selected. The data points are formatted using the transparency tab ith a radial gradient.

'igure -.: Bubble chart e*ample


If the data series for Q.a6is contains te6t* an order number ill be displayed in the labels of this a6is. Other ise* the data of the series ill be used for the Q.a6is* hich can lead to irregularly arranged bubbles.

?ote

$hapter 3 $reating $harts and Graphs

##%

?et charts
, net chart is similar to a polar or radar chart and displays data +alues as points connected by some lines in a grid net that resembles a spider net or a radar tube display. 5or each ro of chart data* a radial is sho n on hich the data is plotted. ,ll data +alues are sho n ith the same scale* so all data +alues should ha+e about the same magnitude. , net chart is useful for comparing data that are not time series* but sho different circumstances* such as +ariables in a scientific e6periment or direction. The poles of the net chart are e@ui+alent to the !.a6es of other charts. "enerally* bet een three and eight a6es are bestN any more and this type of chart becomes confusing. 7efore and after +alues can be plotted on the same chart* or perhaps e6pected and real results* so that differences can be compared.

'igure .8: @et chart e*amples

'igure .#: )*ample of filled net or radar chart 5igure <0 sho s e6ample of t o types of net charts'

The left e6ample is a plain net chart ithout grids and ith Gust points* no lines. The right e6ample is a net chart ith lines* points and grid. ,6es colors and labels changed.
Chart area color Y gradient. %oints changed to 3D ones. Other +arieties of net chart sho the data series as stac0ed numbers or stac0ed percentages. The series can also be filled ith a color as sho n in 5igure <1. %artial transparency is often best for sho ing all the series.

$hapter 3 $reating $harts and Graphs

##&

+tock charts
, stoc0 chart illustrates the mar0et trend for stoc0 and shares by gi+ing opening price* bottom price* top price and closing price. The transaction +olume can also be sho n and the Q.a6is can represent a time series. 3hen you set up a stoc0 chart in the Chart 3iFard* the Data /eries dialog is +ery important. The data should be arranged as sho n in the e6ample table belo because you need to tell it hich series is for the opening price* closing price* high and lo price of the stoc0* and so on.
Transaction +olume 4onday Tuesday 3ednesday Thursday 5riday 2B00 3B00 1000 2200 =A00 Opening price 20 32 1B =0 2E Lo &bottom price) 1B 22 1B 30 20 2igh &top price) 2B 3E 1E =E 32 Closing price 1E 30 1E 3B 31

The open* lo * high* and closing +alues of a ro build together one data unit in the chart. , stoc0 price data series consists of se+eral ro s containing such data units. The column containing the transaction +olume builds an optional second data series. Depending on the chosen +ariant* you may not need all columns.

!toc0 c"art variants


/elect a stoc0 chart type on the first page of the Chart +ariants. iFard and then select one of the four

,ype 1 X based on lo and high column* Type 1 sho s the distance bet een bottom price
&lo ) and top price &high) by a +ertical line. 7ased on the lo * high* and close columns* Type 1 sho s an additional horiFontal mar0 for the closing price.

,ype " X based on the open* lo * high* and close columns* Type 2 generates the traditional
candle stic0 chart. Type 2 dra s the +ertical line bet een the bottom and top price and adds a rectangle in front* hich +isualiFes the range bet een the opening and closing price. If you clic0 on the rectangle* you see more information in the status bar. Calc uses different fill colors for rising +alues &the opening price is lo er than the closing price) and falling +alues.

,ype ' X based on the +olume* lo * high* and close columns* Type 3 dra s a chart li0e
Type 1 ith additional columns for the transaction +olume.

,ype & X based on all fi+e data columns &+olume* open* lo * high* and close)* Type =
combines a chart of Type 2 ith a column chart for the transaction +olume.
If measurement for transaction +olume is in units* a second ! a6is is introduced in chart Type 3 and Type =. The price a6is is sho n on the right side and the +olume a6is on the left side.

?ote

!ettin% data source


!ou can select or alter a data range on the second page of the Chart iFard or in the Data Hange dialog. 5or fine tuning use the Data /eries dialog.

$hapter 3 $reating $harts and Graphs

##A

To specify a data range do one of the follo ing'

Dnter the data range in the te6t bo6.


,n e6ample data range ould be Ug/heet1.g7g3'g7g1=U. #ote that a data range may consist of more than one region in a spreadsheet* for e6ample Ug/heet1.,1',BNg/heet1.D1'DBU is also a +alid data range. If the synta6 is not correct* Calc sho s the te6t in red.

Clic0 +elect data range to minimiFe the dialog* then drag to select the data range. 3hen
you release the mouse* the data are entered. Clic0 +elect data range again to add a data range. In the input field of the minimiFed dialog* clic0 after the entry and type a semicolon. Then drag to select the ne6t range.

Clic0 one of the options for data series in ro s or in columns.


!our stoc0 chart data are in columns* if the information in a ro belongs to the same candle stic0.

Or%ani-e data series


In the data series area on the left side of the dialog* you can organiFe the data series of the actual chart. , stoc0 chart has at least one data series containing the prices. It might ha+e a second data series for transaction +olume. If you ha+e more than one price data series* use the $p and Do n arro buttons to order them. The order determines the arrangement in the chart. Do the same for +olume data series. !ou cannot s itch price and +olume data series. To remo+e a data series* select the data series in the list and clic0 3emove. To add a data series* select one of the e6isting data series and clic0 Add. !ou get an empty entry belo the selected one* hich has the same type. If you ha+e no price data series or no +olume data series* you must first select a range for these series in the %ata 3ange dialog.

!ettin% data ran%es


In the %ata 3anges dialog you can set or change the data range of each component of the selected data series. The upper list sho s the role name of the components and the current +alues. 3hen you ha+e selected a role* you can change the +alue in the te6t bo6 belo the list. The label sho s the selected role. Dnter the range into the te6t bo6 or clic0 on +elect data range to minimiFe the dialog and select the range ith the mouse. /elect Open Calues* Close Calues* 2igh Calues* and Lo Calues in any order. /pecify only the ranges for those roles hich you need for the chosen +ariant of the stoc0 chart. The ranges need not be ne6t to each other in the table.

Le%end
The legend displays the labels from the first ro or column or from the special range that you ha+e set in the Data /eries dialog. If your chart does not contain labels* the legend displays te6t li0e UHo 1* Ho 2* ...U* or UColumn ,* Column 7* ...U according to the ro number or column letter of the chart data. The legend sho s the +alue from the range* hich you entered in the 3ange for ?ame field in the Data Hange dialog. The default entry is the column header of the closing price column. /elect one of the position options. 3hen the chart is finished* you can specify other positions using the 5ormat menu.

$hapter 3 $reating $harts and Graphs

##-

Column and line charts


, column and line chart is a combination of t o other chart types. It is useful for combining t o distinct but related data series* for e6ample sales o+er time &column) and the profit margin trends &line).

Columns and 2ines X the rectangles of the column data series are dra n side by side so
that you can easily compare their +alues.

+tacked Columns and 2ines X the rectangles of the column data series are dra n
stac0ed abo+e each other* so that the height of a column +isualiFes the sum of the data +alues. The e6ample chart in 5igure <2 has manufacturing cost and profit data for t o products o+er a period of time &si6 months in 200E). To create this chart* first highlight the table of data and start the Chart 3iFard. Choose the $olumn and Line chart type ith t o lines and the data series in ro s. Then gi+e it a title to highlight the aspect you ant to sho . The lines are different colors at this stage and do not reflect the product relationships. 3hen you finish ith the Chart 3iFard* highlight the chart* clic0 on the line* right.clic0 and select Format %ata +eries. There are a fe things to change' The colors should match the products. /o both ,r0 4anufacturing and profit are blue and %rall is red. The lines need to be more noticeable* so ma0e the lines thic0er by increasing the idth to 0.0-. 5or the bac0ground* highlight the chart all* right.clic0 and select Format 8all. On the ,rea page* change the drop.do n bo6 to sho "radient. Choose one of the preset gradient patterns and ma0e it lighter by going to the (ransparenc2 tab and ma0ing the gradient B0d transparent. To ma0e the chart loo0 cleaner ithout the grid* go to nsert < (rids and deselect the Q.a6is option.

'igure .9: $olumn and line chart e*ample

$hapter 3 $reating $harts and Graphs

##.

$hapter " Using St2les and (emplates in $alc


Bringing uniformit2 to 2our spreadsheets

8hat is a template9
, template is a model that you use to create other documents in a standard format. 5or e6ample* you can create a template for in+oices that has your company logo and address at the top of the page. This means that any ne spreadsheets &in+oices) created from this template ill then ha+e your company logo and address on the first page of the spreadsheet. Templates can contain anything that regular documents can contain* such as te6t* graphics* styles* and user.specific setup information such as measurement units* language* default printer* and toolbar and menu customiFation. ,ll documents in LibreOffice are based on templates. !ou can create* or do nload and install* as many templates as you ish. If you do not specify a template hen you start a ne spreadsheet* any ne spreadsheet is then based on the default template for spreadsheets that is included ith LibreOffice Calc. This default template consists of a blan0 spreadsheet hich you can customiFe to your needs and then* if you ish* use as a basis to create a custom default template. /ee J/etting default templateK on page 13-.

8hat are styles9


, st2le is a set or group of formats that you can apply to selected elements in a document to @uic0ly change their appearance. 3hen you apply a style* you apply a hole group of formats at the same time. 4any people manually format spreadsheet cells and pages ithout paying any attention to styles and are used to formatting documents according to ph2sical attributes. 5or e6ample* for the contents of a cell you might specify the font family* font siFe* and any character formatting such as bold or italic. /tyles are logical attributes. $sing styles means that you stop applying attributes and characteristics indi+idually &for e6ample* font siFe 1=pt* Times #e Homan* bold* centered) and start using a style* for e6ample Title. ,pplying attributes and characteristics is time consuming and prone to errors. In contrast* using a style* hich has been defined to include the attributes and characteristics you ant to use* ill sa+e you time and gi+e greater consistency in formatting. /tyles also ma0e maGor formatting changes easy. 5or e6ample* you may decide to change the appearance of all subtotals in your spreadsheet to be 10 pt ,rial instead of - pt Times #e Homan after you ha+e created a 1B.page spreadsheet. !ou can change all of the subtotals in the document by simply changing the properties for the subtotal style. ,nother type of style is a page style. %age styles allo you to define page margins* headers and footers* and other printing attributes gi+ing you consistency each time you print a spreadsheet.

+tyles
Calc style types
3hile some components of LibreOffice offer many style types* Calc offers only t o' cell styles and page styles. These style types are e6plained in the follo ing sections.

Cell st$les
Cell styles are similar to paragraph styles used in LibreOffice 3riter and are the most basic type of style in Calc. Cell styles are used for applying fonts* alignment* borders* bac0ground* number formats &for e6ample* currency* date* number)* and cell protection to format the data contained ithin the cells.
$hapter " Using St2les and (emplates in $alc #99

, basic range of cell styles is supplied ith LibreOffice. These styles are sho n in 5igure <3. Initially* the basic styles are configured so that if you change the font family of Default* then all of the other styles ill change to match. Creating* modifying* and accessing styles is e6plained in the follo ing sections.

'igure .3: )*amples of basic cell st2les

1a%e st$les
%age styles in Calc are applied to sheets. ,lthough one sheet may print on se+eral pages* only one page style can be applied to a sheet. If a spreadsheet file contains more than one sheet* then a different page style can be applied to each sheet. 5or e6ample* a spreadsheet might contain one sheet to be printed in landscape orientation and the other sheets in the spreadsheet are printed in portrait orientation. T o page styles are supplied ith Calc' Default and Heport. !ou can adGust many settings using page styles and you can also define as many page styles as you re@uire. /preadsheets are primarily used onscreen and not printed* therefore Calc does not display the page style on the screen. If you ant a spreadsheet to fit on a certain page siFe* you ha+e to carefully control the column idth and ro height using File < Page Preview and >iew < Page breaks preview on the main menu bar to guide you. Despite this limitation* it is recommended to define page styles for any spreadsheets that you are li0ely to print. This ill help pre+ent any lost time or paper astage due to trial and error. %age styles allo you to set page siFe and orientation* page margins* headers and footers* borders and bac0grounds* and the se@uence for printing sheets.

Applying cell styles


To apply cell styles in Calc* you can use the /tyles and 5ormatting dialog* 5ill 5ormat mode* the ,pply /tyle list* or assign styles to shortcut 0eys.

!t$les and For(attin% dialo%


1) "o to Format < +tyles and Formatting on the main menu bar* or press the '## 0ey* or clic0 the +tyles and Formatting icon 5ormatting dialog &5igure <=). on the 5ormatting toolbar to open the /tyles and

$hapter " Using St2les and (emplates in $alc

#93

'igure .": St2les and 'ormatting dialog 2) Clic0 on the Cell +tyles icon in the /tyles and 5ormatting dialog to open the list of cell styles. 3) 2ighlight the cell or group of cells here you ant to apply a cell style. =) Double.clic0 on the cell style name in the /tyles and 5ormatting dialog and the formatting attributes for that style are applied to the data contained in the cell or group of cells.
The /tyles and 5ormatting dialog can be doc0ed into the main Calc or0space. To doc0 or undoc0 the indo * hold do n the $trl 0ey and double.clic0 on the icon bar at the top of the dialog* or clic0 any here in the dialog and use the 0eyboard combination $trl5Shift5'#8.

?ote

Fill For(at (ode


The 5ill 5ormat mode is useful hen you ant to apply the same style to many scattered cells. 1) "o to Format < +tyles and Formatting on the main menu bar* or press the '## 0ey* or clic0 the +tyles and Formatting icon 5ormatting dialog &5igure <=). 2) /elect the style you ant to apply. on the 5ormatting toolbar to open the /tyles and

3) Clic0 on the Fill Format mode icon in the /tyles and 5ormatting dialog and the cursor changes to a similar shape as the 5ill 5ormat 4ode icon. =) Clic0 in each cell here you ant to apply the formatting attributes. B) 3hen you ha+e finished formatting cells* clic0 the 5ill 5ormat 4ode icon again or close the /tyles and 5ormatting dialog.
3hen this mode is acti+e* a right.clic0 any here in the document cancels the last 5ill 5ormat action. 7e careful not to accidentally right.clic0 and thus cancel any formatting actions you ant to 0eep.

?ote

)ppl$ !t$le list


The Apply +tyle drop.do n list used to select a style for selected cells is not normally included on the 5ormatting toolbar in Calc and has to be added as follo s' 1) Hight.clic0 in a blan0 space on the 5ormatting toolbar and select >isible 7uttons from the conte6t menu &5igure <B). 2) Clic0 on Apply +tyle and the conte6t menus close. The ,pply /tyle list no appears at the left end of the 5ormatting toolbar.

$hapter " Using St2les and (emplates in $alc

#9"

'igure .%: ,dding an ,ppl2 St2le list to the 'ormatting toolbar ,pply a style using the ,pply /tyles drop.do n list as follo s' 1) /elect a cell or a group of cells in your spreadsheet. 2) Clic0 the small triangle to open the drop.do n list for ,pply /tyles. 3) /elect the style you re@uire and the formatting attributes of the selected style are applied to the selected cells. =) Dach style in the drop.do n menu is displayed ith its pre+ie * but only fe styles are a+ailable. Clic0 on 4ore to go to the /tyles and 5ormatting dialog here all cell styles are a+ailable.

)ssi%nin% s"ortcut 0e$s


!ou can create 0eyboard shortcuts to apply commonly.used cell or page styles* including any custom styles that you ha+e created. /ee $hapter #" Setting up and $ustomi1ing $alc for more information.

Applying page styles


3hen a page style has been applied to a sheet ithin a spreadsheet* the page style being used is indicated on the /tatus 7ar as sho n in 5igure <A.

'igure .&: Page st2le indicated on Status Bar 1) /elect the sheet to be styled by clic0ing on its sheet tab at the bottom of the displayed spreadsheet. 2) "o to Format < +tyles and Formatting on the main menu bar* or press the '## 0ey* or clic0 the +tyles and Formatting icon 5ormatting dialog &5igure <=). on the 5ormatting toolbar to open the /tyles and .

3) In the /tyles and 5ormatting dialog* clic0 on the Page +tyles icon =) Double.clic0 on the re@uired page style.

$hapter " Using St2les and (emplates in $alc

#9%

Creating new or custom styles


!ou can create ne or custom styles using the /tyles and 5ormatting dialog or creating a ne style from a selection.
,ny ne or custom styles apply only to your spreadsheet and are not sa+ed in the template. To sa+e ne styles in a template* see JTemplatesK on page 13E for more information.

?ote

.ew st$le fro( st$les and For(attin% dialo%


1) "o to Format < +tyles and Formatting on the main menu bar* or press the '## 0ey* or clic0 the +tyles and Formatting icon 5ormatting dialog &5igure <=). on the 5ormatting toolbar to open the /tyles and in the /tyles and 5ormatting

2) To create a ne cell style* clic0 on the Cell +tyles icon dialog to open the list of cell styles.

3) To create a ne page style* clic0 on the Page +tyles icon in the /tyles and 5ormatting dialog to open the list of page styles. =) Hight.clic0 in the /tyles and 5ormatting dialog and select ?ew from the conte6t menu to open either the Cell /tyle dialog &5igure <E) or the %age /tyle dialog &5igure <-). B) $se the +arious tabbed pages in the dialogs to set the attributes for your ne style. /ee JCell style attributesK on page 12E and J%age style attributesK on page 131 for more information. A) Clic0 =6 to close the dialog and sa+e your ne style.

'igure .A: $ell St2le dialog E Organi1er page

'igure .-: Page St2le dialog E Organi1er page

$hapter " Using St2les and (emplates in $alc

#9&

.ew st$le fro( a selection


1) "o to Format < +tyles and Formatting on the main menu bar* or press the '## 0ey* or clic0 the +tyles and Formatting icon 5ormatting dialog &5igure <=). on the 5ormatting toolbar to open the /tyles and in the /tyles and 5ormatting

2) To create a ne cell style* clic0 on the Cell +tyles icon dialog to open the list of cell styles.

3) To create a ne page style* clic0 on the Page +tyles icon in the /tyles and 5ormatting dialog to open the list of page styles. =) /elect the style you ant to use as a base for your ne style. B) Clic0 the ?ew +tyle from +election icon to open the Create /tyle dialog &5igure <<). A) Type a name for the ne style. The list bo6 displays the names of any e6isting custom styles used in the spreadsheet. E) Clic0 =6 to sa+e the ne style. -) Hight.clic0 on the ne style and select 4odify from the conte6t menu to open a dialog here you can change the style attributes. /ee JCell style attributesK on page 12E and J%age style attributesK on page 131 for more information.

'igure ..: $reate St2le dialog


/tyle names are case sensiti+e. !ou can define* for e6ample* a style called red and another style called 3ed. 4a0e sure all style names are sufficiently different to pre+ent any confusion.

?ote

Cell style attributes


The follo ing attributes are a+ailable on the tabbed pages of the Cell /tyle dialog &5igure <E).

Or%ani-er ?ame X displays the name of the selected style. If you are creating or modifying a custom
style* enter a name for the style. !ou cannot change the name of a predefined style.

2inked with X select an e6isting style that you ant to base the ne style on* or select
none to define your o n style.

Category X displays the category for the current style. If you are creating or modifying a
ne style* select $ustom St2le from the list. !ou cannot change the category for a predefined style.

Contains X describes the rele+ant formatting used in the current style. .u(bers Category X select a category from the list and then select a formatting style in the 5ormat
bo6.

Format X select ho you ant the contents of the selected cell&s) to be displayed. The
code for the selected option is displayed in the Format Code bo6.
$hapter " Using St2les and (emplates in $alc #9A

3hen you select $urrenc2 as a category* you ha+e to select a currency from the drop.do n list and then select the format to use from the a+ailable options for that currency. The format code for currencies uses the form Vg666.nnnW* here 666 is the currency symbol* and nnn the country code. /pecial ban0ing symbols* such as D$H &for Duro)* do not re@uire the country code. The currency format is not dependent on the language that you select in the 2anguage bo6. The default currency format for a cell is determined by the regional settings of your operating system.

2anguage X specifies the language setting for the selected cells. 3ith the language set to
,utomatic* LibreOffice automatically applies the number formats associated ith the system default language. /elect any language to fi6 the settings for the selected cells. The language setting ensures that date and currency formats are preser+ed e+en hen the document is opened in an operating system that uses a different default language setting.

=ptions X specify the options for the selected format. Decimal places X enter the number of decimal places that you ant to display. Leading 1eroes X enter the ma6imum number of Feroes to display in front of the
decimal point.

@egative numbers in red X changes the font color of negati+e numbers to red. Use thousands separator X inserts a separator bet een thousands. The type of separator that is used depends on your language settings.

Format code X displays the number format code for the selected format. !ou can also
enter a custom format. The follo ing options are only a+ailable for user.defined number formats.

Preview Field X displays a pre+ie of the current selection. Font


The changes are applied to the current selection* to the entire ord that contains the cursor* or to the ne te6t that you type. Depending on your language settings* you can change the formatting for the follo ing font types'

3estern te6t font X Latin character sets ,sian te6t font X Chinese* 1apanese* or 8orean character sets Comple6 te6t layout font X right.to.left te6t direction ?ote
To enable support for comple6 te6t layout and ,sian character sets* go to ,ools < =ptions < 2anguage +ettings < 2anguages and select #nabled.

Font X enter the name of an installed font family that you ant to use* or select a font from
the list.

+tyle X select the formatting you ant to apply' 7old or 0talic. +i5e X enter or select the font siFe that you ant to apply. 5or scalable fonts* you can also
enter decimal +alues. If you are creating a style that is based on another style* you can enter a percentage +alue or a point +alue &for e6ample* X2pt or RBpt).

2anguage X sets the language that the spelling chec0er uses for the selected te6t or the
te6t that you type. The spelling chec0er for the selected language only functions hen you ha+e installed the corresponding language module. , language entry has a chec0 mar0 in front of it if the spelling chec0er is acti+ated for that language.

Preview X displays a pre+ie of the current selection.

$hapter " Using St2les and (emplates in $alc

#9-

Font Effects
The changes are applied to the current selection* to the entire ord that contains the cursor* or to the ne te6t that you type.

Font Color X sets the color for the selected te6t. If you select ,utomatic* the te6t color is
set to blac0 for light bac0grounds and to hite for dar0 bac0grounds.

3elief X select a relief effect to apply to the selected te6t. The )mbossed relief ma0es the
characters appear as if they are raised abo+e the page. The )ngraved relief ma0es the characters appear as if they are pressed into the page.

=utline X displays the outline of the selected characters. This effect does not or0 ith
e+ery font.

+hadow X adds a shado that casts belo and to the right of the selected characters. =verlining X select the o+erlining style that you ant to apply. To apply the o+erlining to
ords only* select ndividual words.

=verline color X select the color for the o+erlining. +trikethrough X select a stri0ethrough style for the selected te6t. ?ote
If you sa+e your document in 4/ 3ord format* all of the stri0ethrough styles are con+erted to the single line style.

*nderlining X select the underlining style that you ant to apply. To apply the underlining
to ords only* select ndividual words. If you apply underlining to a superscript te6t* the underlining is raised to the le+el of the superscript. If the superscript is contained in a ord ith normal te6t* the underlining is not raised.

*nderline color X select the color for the underlining. ndividual words X applies the selected effect only to ords and ignores spaces. Preview X displays a pre+ie of the current selection. )li%n(ent ,e.t alignment X sets the alignment options for the contents of the current cell* or the
selected cells.

+ori1ontal X select the horiFontal alignment option that you ant to apply to the cell contents. Default X aligns numbers to the right and te6t to the left. Left X aligns the contents of the cell to the left. 3ight X aligns the contents of the cell to the right. $enter X horiFontally centers the contents of the cell. Lustified X aligns the contents of the cell to the left and to the right cell borders. 'illed X repeats the cell contents &number and te6t) until the +isible area of the cell is filled. This feature does not or0 on te6t that contains line brea0s. Distributed X aligns contents e+enly across the hole cell. $nli0e Lustified* it also Gustifies the +ery last line of te6t. 0ndent X indents from the left edge of the cell by the amount that you enter. Hertical X select the +ertical alignment option that you ant to apply to the cell contents. Default X aligns the cell contents to the bottom of the cell.

$hapter " Using St2les and (emplates in $alc

#9.

(op X aligns the contents of the cell to the upper edge of the cell. Bottom X aligns the contents of the cell to the lo er edge of the cell. :iddle X +ertically centers the contents of the cell. Lustified X aligns the contents of the cell to the top and to the bottom cell borders. Distributed X aligns contents e+enly across the hole cell. $nli0e Lustified* it also Gustifies the +ery last line of te6t.

,e.t orientation X defines the te6t direction of cell contents. ,B$D wheel X clic0 any here in the heel to define the te6t orientation. The characters
U,7CDU on the heel correspond to the ne setting.

Herticall2 stac4ed X assigns +ertical te6t orientation for cell contents. Degrees X allo s you to manually enter the orientation angle. , positi+e number rotates the te6t to the left and a negati+e number rotates the te6t to the right. 3eference edge X specify the cell edge from hich to rite the rotated te6t. (e*t )*tension 'rom Lower $ell Border X rites the rotated te6t from the bottom cell edge out ards. (e*t )*tension 'rom Upper $ell Border X rites the rotated te6t from the top cell edge out ards. (e*t )*tension 0nside $ells X rites the rotated te6t only ithin the cell.

Properties X determine the te6t flo in a cell. <rap te*t automaticall2 X raps te6t onto another line at the cell border. The number of
lines depends on the idth of the cell. To enter a manual line brea0* press $trl5)nter in the cell.

+2phenation active X enables ord hyphenation for te6t

rapping to the ne6t line.

Shrin4 to fit cell si1e X reduces the apparent siFe of the font so that the contents of the cell fit into the current cell idth. !ou cannot apply this command to a cell that contains line brea0s.

:orders
/ets the border attributes for the selected cells.

2ine arrangement X select a predefined border style to apply. In a spreadsheet* you can
also add or remo+e predefined borders ith the 7orders icon on the Table toolbar.

2ine X select the border style* idth* and color that you ant to apply. The style is applied
to the borders selected in the pre+ie .

+pacing to contents X specify the amount of space that you ant to lea+e bet een the
border and the contents of the selection.

Left X enter the distance bet een the left border and the contents of the selection. 3ight X enter the distance bet een the right border and the contents of the selection. (op X enter the distance bet een the top border and the contents of the selection. Bottom X enter the distance that bet een the bottom border and the contents of the selection. S2nchroni1e X applies the same spacing to contents setting to all four borders hen you enter a ne distance. hen all four borders are +isible. "raphics or obGects that are anchored to a frame in

+hadow style X applies a shado effect to borders. 5or the best results* only apply this
effect

$hapter " Using St2les and (emplates in $alc

#38

the document cannot e6ceed the siFe of the frame. If you apply a shado to the borders of an obGect that fills an entire frame* the siFe of the obGect is reduced to display the shado s.

Position X select a shado style for the selected borders. Distance X enter the distance the shado e6tends from the obGect. $olor X select a color for the shado .

:ac0%round
/elect a color that you ant to use as a bac0ground for your selected cells. To remo+e a bac0ground color* select @o 'ill.

Cell protection ;ide all X hides formulas and contents of the selected cells. Protected X pre+ents the selected cells from being modified. This cell protection only ta0es
effect if you also protect the sheet.

;ide formula X hides formulas in the selected cells. ;ide when printing X pre+ents the selected cells from being printed.

Page style attributes


The follo ing attributes are a+ailable on the +arious tabbed pages of the %ages /tyle dialog &5igure <-).

Or%ani-er ?ame X displays the name of the selected style. If you are creating or modifying a custom
style* enter a name for the style. !ou cannot change the name of a predefined style.

2inked with X select an e6isting style that you ant to base the ne style on* or select
none to define your o n style.

Category X displays the category for the current style. If you are creating or modifying a
ne style* select $ustom St2le from the list. !ou cannot change the category for a predefined style.

Contains X describes the rele+ant formatting used in the current style. 1a%e
!ou can define page layouts for single and multiple.page documents* as ell as page numbering and paper formats.

Paper format X select from a list of predefined paper siFes* or define a custom paper
format.

'ormat X select a predefined paper siFe* or create a custom format by entering the dimensions for the paper in the +eight and <idth bo6es. <idth X displays the idth of the selected paper format. To define a custom format* enter a idth here. +eight X displays the height of the selected paper format. To define a custom format* enter a height here. Orientation: Portrait X displays and prints the current document +ertically. ith the paper oriented

$hapter " Using St2les and (emplates in $alc

#3#

Orientation: Landscape X displays and prints the current document oriented horiFontally.

ith the paper

Paper tra2 X select the paper source for your printer. If you ant* you can assign different paper trays to different page styles. 5or e6ample* you can assign a different tray for the first page style in your spreadsheet and load the tray ith your company letterhead paper.

4argins X specify the amount of space to lea+e bet een the edges of the page and the
document te6t.

Left 0nner X enter the amount of space to lea+e bet een the left edge of the page and the document te6t. If you are using :irrored page layout* enter the amount of space to lea+e bet een the inner te6t margin and the inner edge of the page. 3ight Outer X enter the amount of space to lea+e bet een the right edge of the page and the document te6t. If you are using :irrored page layout* enter the amount of space to lea+e bet een the outer te6t margin and the outer edge of the page. (op X enter the amount of space to lea+e bet een the upper edge of the page and the document te6t. Bottom X enter the amount of space to lea+e bet een the lo er edge of the page and the document te6t.

2ayout settings X select the page layout style to use in the current document. Page la2out: 3ight and left X sho s both odd and e+en pages ith left and right
margins as specified.

Page la2out: :irrored X sho s both odd and e+en pages ith inner and outer margins as specified. $se this layout if you ant to bind the printed pages li0e a boo0. Dnter the binding space as the 0nner margin. Page la2out: Onl2 right X sho s only odd &right) pages. D+en pages are sho n as blan0 pages. Page la2out: Onl2 left X sho s only e+en &left) pages. Odd pages are sho n as blan0 pages. 'ormat X select the page numbering format to use for the page style. (able alignment: +ori1ontal X centers the cells horiFontally on the printed page. (able alignment: Hertical X centers the cells +ertically on the printed page.

:orders and :ac0%round


/ee J7ordersK and J7ac0groundK in JCell style attributesK abo+e for information on ho to set the borders and bac0ground for page styles.

3eader
,dds a header to the page style. , header is an area in the top page margin here you can add te6t or graphics.

;eader on X adds a header to the page style. +ame content leftHright X e+en and odd pages share the same content. To assign a
different header to e+en and odd pages* deselect this option and then select #dit.

2eft margin X enter the amount of space to lea+e bet een the left edge of the page and
the left edge of the header.

3ight margin X enter the amount of space to lea+e bet een the right edge of the page and
the right edge of the header.

$hapter " Using St2les and (emplates in $alc

#39

+pacing X enter the amount of space to maintain bet een the bottom edge of the header
and the top edge of the document te6t.

;eight X enter the height that you ant for the header. AutoFit height X automatically adGusts the height of the header to fit the content. Preview X displays a pre+ie of the current selection. 4ore X defines a border* bac0ground color* or bac0ground pattern for the header. #dit X allo s you to add or edit header te6t.

Footer
,dds a footer to the page style. , footer is an area in the bottom page margin here you can add te6t or graphics. /ee J2eaderK abo+e for information on the a+ailable options you can use for a footer.

!"eet
/pecifies the elements to be included in the printout of all sheets ith the page style. ,dditionally* you can set the print order* the first page number* and the page scale.

Page =rder X defines the order in hich data in a sheet is numbered and printed hen it
does not fit on one printed page.

(op to bottom= then right X prints +ertically from the left column to the bottom of the sheet. Left to right= then down X prints horiFontally from the top ro column. 'irst page number X select this option if you other than 1. of the sheet to the right ith a number

ant the first page to start

Print X defines hich elements of the spreadsheet are to be printed. $olumn and row headers X specifies hether you ant the column and ro headers to
be printed.

Grid X prints the borders of the indi+idual cells as a grid. 5or the +ie on screen* ma0e your selection in ,ools < =ptions /<2ibre=ffice Calc /<>iew < (rid lines. $omments X prints the comments defined in your spreadsheet. They ill be printed on a separate page along ith the corresponding cell reference. ObIects graphics X includes all inserted obGects &if printable) and graphics ith the printed document. $harts X prints the charts that ha+e been inserted into your spreadsheet. Drawing obIects X includes all dra ing obGects in the printed document. 'ormulas X prints the formulas contained in the cells* instead of the results. ?ero values X specifies that cells ith a Fero +alue are printed.

+cale X defines a page scale for the printed spreadsheet. Scaling mode X select a scaling mode from the drop.do n list. ,ppropriate controls ill
be sho n belo this option.

3educe enlarge printout X specifies a scaling factor to scale all printed pages. Scaling factor X enter a percentage figure for scaling your spreadsheet for printing. The default setting is 100d.

$hapter " Using St2les and (emplates in $alc

#33

'it print range6s7 to width height X specifies the ma6imum number of pages horiFontally & idth) and +ertically &height) on hich e+ery sheet ith the same page style is to be printed. The print ranges are al ays scaled proportionally* so the resulting number of pages may be less than specified. !ou may deselect one of the options* then the unspecified dimension ill use as many pages as necessary. If you deselect both options* this ill result in a scaling factor of 100d. <idth in pages X enter the ma6imum number of pages to be printed horiFontally across. +eight in pages X enter the ma6imum number of pages to be printed +ertically stac0ed. 'it print range6s7 on number of pages X specifies the ma6imum number of pages on hich e+ery sheet ith the same page style is to be printed. The scale ill be reduced as necessary to fit the defined number of pages. @umber of pages X enter the ma6imum number of pages to be printed.

4odifying and updating styles


Modif$in% st$les
1) "o to Format < +tyles and Formatting on the main menu bar* or press the '## 0ey* or clic0 the +tyles and Formatting icon 5ormatting dialog &5igure <=). on the 5ormatting toolbar to open the /tyles and in the /tyles and 5ormatting dialog

2) To modify a cell style* clic0 on the Cell +tyles icon to open the list of cell styles.

3) To modify a page style* clic0 on the Page +tyles icon in the /tyles and 5ormatting dialog to open the list of page styles. =) Hight.clic0 on the style name you ant to modify and select 4odify from the conte6t menu to open either the Cell /tyle dialog &5igure <E) or the %age /tyle dialog &5igure <-). B) 4a0e the necessary changes to the style attributes. 5or more information on style attributes* see JCell style attributesK on page 12E and J%age style attributesK on page 131. A) Clic0 =6 to sa+e the changes and close the dialog.

?ote

The 4odify command is una+ailable if one or more sheets are protected* e+en if the style to be modified is being used in an unprotected sheet.

+pdatin% st$les
$pdating styles can only be carried out on cell styles as follo s' 1) "o to Format < +tyles and Formatting on the main menu bar* or press the '## 0ey* or clic0 the +tyles and Formatting icon 5ormatting dialog &5igure <=). on the 5ormatting toolbar to open the /tyles and

2) Clic0 on the Cell +tyles icon in the /tyles and 5ormatting dialog to open the list of cell styles. 3) /elect a cell on the spreadsheet that is using the cell style you ant to update and highlight the data in the cell. The cell style name ill be highlighted in the /tyles and 5ormatting dialog. =) 4a0e the necessary format changes to the data.
$hapter " Using St2les and (emplates in $alc #3"

B) Clic0 on the *pdate +tyle icon and the cell style attributes ill be updated ith your changes. ,ny other cells using the same cell style ill also be updated to ith your changes.

;iding$ showing and displaying styles


3idin% st$les
2iding styles can only be carried out on cell styles as follo s. Only styles that are not being used in the spreadsheet can be hidden. 1) "o to Format < +tyles and Formatting on the main menu bar* or press the '## 0ey* or clic0 the +tyles and Formatting icon 5ormatting dialog &5igure <=). on the 5ormatting toolbar to open the /tyles and

2) Clic0 on the Cell +tyles icon in the /tyles and 5ormatting dialog to open the list of cell styles. 3) Hight clic0 on an unused cell style and select ;ide from the conte6t menu. The style is then mo+ed to the +idden St2les category in the /tyles and 5ormatting dialog.

!"owin% st$les
1) "o to Format < +tyles and Formatting on the main menu bar* or press the '## 0ey* or clic0 the +tyles and Formatting icon on the 5ormatting toolbar to open the /tyles and 5ormatting dialog &5igure <=). 2) Clic0 on the drop.do n list at the bottom of the /tyles and 5ormatting dialog and select +idden St2les from the list. 3) Hight clic0 on the hidden style you ant to sho and select +how from the conte6t menu. The style ill then be displayed in the /tyles and 5ormatting dialog.

*ispla$in% st$les
The /tyles and 5ormatting dialog can display different categories of styles as follo s' 1) "o to Format < +tyles and Formatting on the main menu bar* or press the '## 0ey* or clic0 the +tyles and Formatting icon on the 5ormatting toolbar to open the /tyles and 5ormatting dialog &5igure <=). 2) Clic0 on the drop.do n list at the bottom of the /tyles and 5ormatting dialog. 3) /elect the style category you ant displayed in the /tyles and 5ormatting dialog. The categories are as follo s'

+ierarchical X lists the styles used in an outline and normally only applies to documents that use a hierarchical outline. ,ll St2les X lists all the styles that are a+ailable in Calc and in your spreadsheet* e6cept for +idden St2les. +idden St2les X lists all the styles that ha+e been hidden in a spreadsheet. ,pplied St2les X lists only the styles that ha+e been applied to the spreadsheet. $ustom St2les X lists only the styles that you ha+e created for use in a spreadsheet or a template.

$hapter " Using St2les and (emplates in $alc

#3%

Copying cell styles


To copy a cell style already in use to another cell in your spreadsheet or into a cell in another spreadsheet' 1) Clic0 one of the cells that has been assigned the style you ant to copy* and then copy the cell to the clipboard. 2) /elect the cells that are to recei+e the same formatting as the copied cell. 3) "o to #dit < Paste +pecial on the menu bar to open the %aste /pecial dialog &5igure 100). =) 4a0e sure that only Formats is selected and clic0 =6 to paste the style formatting attributes into the cell.

'igure #88: Paste Special dialog

%eleting styles
!ou can only delete styles that you ha+e created. The styles that are included ith LibreOffice as part of the soft are installation cannot be deleted. 1) "o to Format < +tyles and Formatting on the main menu bar* or press the '## 0ey* or clic0 the +tyles and Formatting icon 5ormatting dialog &5igure <=). on the 5ormatting toolbar to open the /tyles and in the /tyles and 5ormatting dialog

2) To delete a cell style* clic0 on the Cell +tyles icon to open the list of cell styles.

3) To delete a page style* clic0 on the Page +tyles icon in the /tyles and 5ormatting dialog to open the list of page styles. =) Hight.clic0 on the style you ant to delete and select %elete from the conte6t menu. B) /elect Ies on the arning message that opens to delete the style. ,ny data in a cell or a sheet in the spreadsheet that used the deleted style ill re+ert to the Default style included ith Calc.

$hapter " Using St2les and (emplates in $alc

#3&

,emplates
Creating templates
Templates are created from a ne or e6isting spreadsheet as follo s' 1) Open a ne or e6isting spreadsheet that you ant to use as a base for a template. 2) ,dd any necessary pre.defined content that you ant to appear in a spreadsheet each time you use the ne template. 5or e6ample* company logo and name* company information* page numbers* and so on. 3) Create all the cell and page styles that you ant to use in your ne template. =) "o to File < +ave as ,emplate on the main menu bar* or use the 0eyboard combination Shift5'## to open the Template 4anager dialog &5igure 101). B) Double.clic0 to open the folder here you ant to sa+e your template or create a ne folder for spreadsheet templates. It is recommended to use the 4y Templates folder for all your LibreOffice templates. A) Clic0 the +ave icon and type a memorable name for your template. E) Clic0 =6 to sa+e the ne template.

'igure #8#: (emplate :anager dialog

?ote

3hen you create and sa+e a spreadsheet template* it ill be automatically sa+ed in the /preadsheets section in the Template 4anager.

#diting templates
1) "o to File < ?ew < ,emplates on the main menu bar* or clic0 on the ,emplates button on the LibreOffice opening dialog to open the Template 4anager dialog. 7y default* the Template 4anager opens in the 4y Templates folder. 2) Clic0 on the /preadsheets tab or na+igate to the folder here you ha+e sa+ed your spreadsheet templates. 3) /elect the template that you ant to edit. 3hen you do this* a ro of icons appears abo+e the templates &see 5igure 102). =) Clic0 the #dit icon and the spreadsheet template opens in Calc. B) 4a0e all necessary to the template content* cell styles* and page styles Gust as you ith a spreadsheet. A) "o to File < +ave on the menu bar to sa+e your changes* or go to File < +ave As ,emplate on the main menu bar to sa+e the edited template as a ne template.
$hapter " Using St2les and (emplates in $alc #3A

ould

'igure #89: (emplate :anager dialog E )diting templates

Creating spreadsheets from templates


To create a spreadsheet from a template' 1) "o to File < ?ew < ,emplates on the main menu bar to open the Template 4anager dialog &5igure 102). 2) /elect the /preadsheets tab and na+igate to the folder here the template is located. The default folder for templates is 4y Templates. 3) /elect the template you ant to use and clic0 on the =pen icon * or double.clic0 on the template to open it. The Template 4anager closes and a ne spreadsheet opens in Calc. =) "o to File < +ave As on the main menu bar* or use the 0eyboard combination $trl5Shift5S and sa+e your ne spreadsheet ith the filename you ant to use.

*pdating styles from a changed template


If you ma0e any changes to a template and its styles* the ne6t time you open a spreadsheet that as created before you changed the template* a confirmation message is displayed. 1) Clic0 *pdate +tyles to apply the changed styles in the template to the spreadsheet. 2) Clic0 6eep =ld +tyles if you do not ant to apply the changed styles in the template to the spreadsheet.

?ote

If you select 6eep =ld +tyles* the confirmation message ill not appear again the ne6t time you open the spreadsheet using the same changed template.

+etting default template


If you create a ne spreadsheet using File < ?ew < +preadsheet on the main menu bar* Calc creates the document from the default template for spreadsheets. !ou can* ho e+er* set any template as the default template. !ou can also reset the default template to the Calc default template at a later date if you ant to.

$hapter " Using St2les and (emplates in $alc

#3-

!ettin% a te(plate as default


!ou can set any template to be the default* but the template must be located in one of the folders displayed in the Template 4anager dialog. 1) "o to File < ?ew < ,emplates on the main menu bar to open the Template 4anager dialog &5igure 102). 2) #a+igate to the folder containing the template that you ant to set as the default. 3) /elect the template. =) Clic0 on the +et As %efault icon ill be created from this template. . The ne6t time that you create a ne spreadsheet* it

&esettin% default te(plate


To set the default spreadsheet template bac0 to the default template supplied ith Calc' 1) "o to File < ?ew < ,emplates on the main menu bar to open the Template 4anager dialog &5igure 102). 2) Clic0 on the Action 4enu icon. 3) /elect 3eset %efault ,emplate < +preadsheet from the conte6t menu. The ne6t time that you create a ne spreadsheet* it ill be created using the Calc default template.

?ote

Hesetting the default template bac0 to the Calc default template is only a+ailable if the default has been changed pre+iously.

Associating spreadsheets with a different template


,t times you might ant to use or associate a spreadsheet ith a different template. The main ad+antage of associating a spreadsheet ith a different template is that it ma0es it easier to update the styles if the re@uirement arises. 5or best results hen associating spreadsheets ith another template is to ma0e sure that the style names in the spreadsheet and in the template are the same. If the names are not the same* you ill need to use /earch and Heplace function in Calc to replace the old styles ith ne ones. /ee $hapter 9 )ntering= )diting= and 'ormatting Data for more information about finding and replacing styles. 1) "o to File < ?ew < ,emplates on the main menu bar to open the Template 4anager dialog &5igure 102). 2) #a+igate to the folder containing the template that you ant to use. 3) Double clic0 on the template and a ne blan0 spreadsheet is created. =) Open the spreadsheet you ant to associate ith the template. B) "o to #dit < +elect All on the main menu bar* or use the 0eyboard combination $trl5, to select e+erything in the spreadsheet you ant to change. A) "o to #dit < Copy on the main menu bar* or use the 0eyboard combination $trl5$ to copy the spreadsheet data to the clipboard. E) Close the old spreadsheet ithout sa+ing. -) In the ne blan0 spreadsheet* go to #dit < Paste on the main menu bar* or use the 0eyboard combination $trl5H to paste the data into the spreadsheet. <) "o to File < +ave As on the main menu bar* or use the 0eyboard combination $trl5Shift5S to sa+e this ne spreadsheet ith the filename as the old spreadsheet. 10) 3hen as0ed* confirm that you ant to o+er rite the old file.
$hapter " Using St2les and (emplates in $alc #3.

=rgani5ing templates
LibreOffice can only use templates that are in its template folders. !ou can create ne template folders and use them to organiFe your templates and import templates into these folders. 5or e6ample* you might ha+e one template folder for sales templates and another for in+oice templates. !ou can also e6port templates.
The location of template folders in LibreOffice depends on the operating system of your computer. If you ant to 0no here the template folders are located* go to ,ools < =ptions < 2ibre=ffice < Paths.

,ip

Creatin% te(plate folders


1) "o to File < ?ew < ,emplates on the main menu bar to open the Template 4anager dialog. If necessary* clic0 on ,ll (emplates to display the +ie sho n in 5igure 101. 2) Clic0 the ?ew Folder icon . 3) In the pop.up dialog* type a name for the ne folder and clic0 =6. The ne folder no appears in the list of folders.

Deleting template folders


!ou cannot delete template folders supplied ith LibreOffice. !ou can only delete template folders that you ha+e created. 1) "o to File < ?ew < ,emplates on the main menu bar to open the Template 4anager dialog &5igure 102). 2) /elect the folder that you ant to delete. 3) Clic0 the %elete icon .

=) Clic0 Ies to confirm the deletion and the folder and templates inside the folder are deleted.

Movin% te(plates
To mo+e a template from one template folder to another template folder' 1) "o to File < ?ew < ,emplates on the main menu bar to open the Template 4anager dialog &5igure 102). 2) #a+igate to the folder containing the template that you ant to mo+e to another folder. 3) /elect the template you ant to mo+e. =) Clic0 the 4ove to folder icon and select the folder you ant to use from the conte6t menu. The selected template is mo+ed to the folder.

*eletin% te(plates
!ou cannot delete templates supplied ith LibreOffice. !ou can only delete templates that you ha+e created or imported. 1) "o to File < ?ew < ,emplates on the main menu bar to open the Template 4anager dialog &5igure 102). 2) /elect the folder that you ant to delete. 3) Clic0 the %elete icon .

=) Clic0 Ies to confirm the deletion and the folder and templates inside the folder are deleted.

$hapter " Using St2les and (emplates in $alc

#"8

(portin% te(plates
!ou can import and add templates to your collection as follo s' 1) Open your bro ser soft are and locate the eb page here the template is located. It is recommended to use the lin0 http'((templates.libreoffice.org(template.center hich ill ta0e you to the LibreOffice Template Center here you ill find se+eral templates that are fully compatible ith LibreOffice. 2) Do nload the template you ant to use. 3) In Calc* go to File < ?ew < ,emplates to open the Template 4anager dialog &5igure 103). =) Clic0 on the mport icon and na+igate to the folder here the do nloaded template is located on your computer. B) /elect the template and clic0 =pen. ,fter import* the template becomes a+ailable in the Template 4anager.

'igure #83: (emplate :anager dialog E 0mporting templates

?ote

It is recommended to import templates using the abo+e procedure as this places the templates into the correct location for LibreOffice to locate the templates.

Exportin% te(plates
To e6port a template from a template folder to another location' 1) "o to File < ?ew < ,emplates on the main menu bar to open the Template 4anager dialog &5igure 102). 2) #a+igate to the folder containing the template that you ant to e6port. 3) /elect the template that you ant to e6port. =) Clic0 the #.port icon and the /a+e ,s dialog opens. #a+igate to the location here you ant to e6port the template and clic0 +ave. If necessary* you can also rename the template.

$hapter " Using St2les and (emplates in $alc

#"#

$hapter % Using Graphics in $alc

(raphics in Calc
Calc is often used to present data* and to ma0e forecasts and predictions. "raphics can turn an a+erage spreadsheet into a more professional and memorable spreadsheet. Calc can import +arious +ector &line dra ing) and raster &bitmap) file formats. The most commonly used graphic formats are "I5* 1%"* %#"* and 74%. /ee LibreOffice 2elp for a full list of the formats that Calc can import. "raphics in Calc are of three basic types'

Image files* such as photographs* dra ings* and scanned images Diagrams created using LibreOffice dra ing tools Charts and graphs created using LibreOffice Chart facility* see $hapter 3 $reating $harts
and Graphs for more information ,lthough using graphics in Calc is +ery similar to using graphics in any other component of LibreOffice* this chapter e6plains some of the differences in their use. It also co+ers some of the more ad+anced graphics functions and ho they can further enhance your spreadsheet.
The term graphics refers to both pictures and dra ing obGects. Often the ord images is used hen referring to pictures and other graphics that are not dra ing obGects.

?ote

Adding graphics KimagesL


"raphics or images &sometimes called pictures in LibreOffice)* such as corporate logos and photographs* are probably the most common types of graphics added to a Calc spreadsheet. They may be* for e6ample* do nloaded from the Internet* scanned* created ith a graphics programN or photographs ta0en ith a digital camera. Images can be inserted in three ays'

$sing the Insert %icture dialog 5rom the gallery 5rom the clipboard by copying and pasting

nserting image files


The most common source of graphics is e6isting files and to insert an image from a file as follo s' 1) Clic0 in the cell in the spreadsheet here you ant the image to appear. Do not orry too much about the position of the file as positioning can be changed* see J%ositioning* resiFing and arranging imagesK on page 1BB for more information. 2) "o to nsert < Picture < From File on the main menu bar* or clic0 the From File icon on the Insert toolbar to open the Insert %icture dialog &5igure 10=). If the Insert toolbar is not open* go to >iew < ,oolbars < nsert on the main menu bar. 3) On the Insert %icture dialog* na+igate to the file to be inserted and select it. =) If re@uired* select Preview to +ie a thumbnail of the selected image on the right of the dialog so you can +erify that you ha+e the correct file. B) Clic0 nsert as 2ink or 2ink &depending on computer setup) if you ant to lin0 the file to the original file &see JLin0ing filesK belo for more information). If you do not select nsert as 2ink or 2ink* the file is embedded into the spreadsheet &see JDmbedding image filesK belo for more information).

$hapter % Using Graphics in $alc

#""

'igure #8": 0nsert Picture dialog A) Clic0 =pen and the file is inserted into the spreadsheet as a floating image and is anchored to the cell in hich the cursor as placed.
The Insert %icture dialog may loo0 different from the one sho n in 5igure 10=* depending on your operating system and hether you ha+e selected to use the LibreOffice Open(/a+e dialogs in ,ools < =ptions < 2ibre=ffice < (eneral.

?ote

2inking files
To create a lin0 to a file containing an image instead of embedding the image into a spreadsheet* use the Insert picture dialog and select the nsert as 2ink or 2ink option. 3hen you clic0 Open* a arning dialog &5igure 10B) opens informing you of the haFards of lin0ing a file and as0s you to confirm hether you ant to 6eep 2ink or change to #mbed (raphic.

'igure #8%: Lin4ing warning dialog


$hapter % Using Graphics in $alc #"%

Clic0 6eep 2ink and the image is displayed in the document* but hen the document is sa+ed* it contains only a reference to the image file and not the image itself. The document and the image remain as t o separate files* hich are temporarily merged only hen you open the spreadsheet again. Clic0 #mbed (raphic and the image is displayed in the spreadsheet. The image file is embedded into the spreadsheet and the t o files become one file. /ee JDmbedding image filesK belo for more information.

Advantage X you can modify the image file separately ithout changing the spreadsheet
because the lin0 to the file remains +alid and the modified image ill appear hen you ne6t open the spreadsheet. This can be a big ad+antage if you &or someone else* perhaps a graphic artist) is updating images.

Advantage X lin0ing can reduce the file siFe of the spreadsheet hen it is sa+ed* because
the image file itself is not included. 2o e+er* file siFe is usually not a problem on modern computers ith a reasonable amount of memory* unless the spreadsheet includes many large graphics files. Calc can easily handle large files.

%isadvantage X if you send the document to someone else* or mo+e it to a different


computer* you must also send the image files and 0eep the same file structure. This pre+ents the lin0 from being bro0en and blan0 areas appearing in the spreadsheet because Calc cannot find the lin0ed file. 5or e6ample* you might 0eep image files in a subfolder named Images inside the same folder containing the Calc document. ,ny recipient of the Calc spreadsheet needs to put the image files in a subfolder ith the same name in the same named folder as the Calc spreadsheet.
3hen inserting the same image se+eral times in the document* it might appear beneficial to create lin0s. 2o e+er* this is not necessary* as LibreOffice embeds only one copy of the image file in the document. Deleting one or more of the copies does not affect the other copies of the same file.

?ote

#mbedding image files


Dmbedding a image into your spreadsheet ma0es the image a permanent part of your spreadsheet. ,ny changes you ma0e to an embedded image ill only appear in your spreadsheet and the original image file ill not affected. Dmbedding happens hen you insert an image into your spreadsheet using copying and pasting* or clic0ing #mbed (raphic hen inserting files ith the Insert %icture dialog.

Advantage X embedding graphics into your spreadsheet is that the graphic is al ays
a+ailable no matter hat computer is used to open the spreadsheet.

%isadvantage X embedding graphics is that it creates large file siFes* hich may not be
desirable if you ha+e limited capacity for storing computer files. ,lso* if the original graphic is altered* then your dra ing ill not ha+e an up to date +ersion each time you open your dra ing.

?ote

3hen a raster graphic is embedded into a LibreOffice spreadsheet* the format of that graphic is automatically changed to %#" format.

$hapter % Using Graphics in $alc

#"&

#mbedding linked image files


If you originally lin0ed the image files* you can easily embed and sa+e in a Calc spreadsheet at a later time if you so ish. 1) Open the spreadsheet in Calc. 2) "o to #dit < 2inks on the main menu bar to open the Ddit Lin0s dialog &5igure 10A) sho s all the lin0ed files.

'igure #8&: )dit Lin4s dialog 3) /elect the files you ant to change from lin0ed to embedded. =) Clic0 7reak 2ink and confirm you ant to remo+e the selected lin0. The file then becomes embedded into the spreadsheet.
"oing from embedded to lin0ed files is not so easy. !ou must delete each embedded file and* one at a time* selecting the nsert as 2ink or 2ink option hen you reinsert each file.

?ote

Copying and pasting


$sing the clipboard* you can copy and paste images from one Calc spreadsheet into another Calc spreadsheet* or from another component of LibreOffice &3riter* Dra * and so on) into a spreadsheet* or from other programs into a Calc spreadsheet. Copying and pasting embeds the image file 1) Open both the source document and the Calc spreadsheet into hich you ant to copy the image. 2) In the source document* select the image to be copied. 3) "o to #dit < Copy on the main menu bar* or clic0 the Copy icon on the /tandard toolbar* or use the 0eyboard shortcut $trl5$ to copy the image to the clipboard. =) / itch to the Calc spreadsheet and clic0 in the cell here the image is to be inserted. B) "o to #dit < Paste on the main menu bar* or clic0 the Paste icon on the /tandard toolbar* or use the 0eyboard shortcut $trl5H to paste the image into the spreadsheet.

$hapter % Using Graphics in $alc

#"A

?ote

!ou can also right.clic0 and select Copy from the conte6t menu to copy the image to the clipboard. !ou then right.clic0 in the cell you ant to use for an anchor and select Paste from the conte6t menu to embed the image into your spreadsheet. 2o e+er* this method only or0s for image files hen you are copying and pasting bet een modules of LibreOffice.

*sing the (allery


The "allery &5igure 10E) pro+ides a con+enient ay to ma0e a+ailable reusable obGects such as images and sounds that you can insert into your documents. The "allery is a+ailable in all components of LibreOffice and has se+eral images grouped together in collections or themes* for e6ample 5inance* Computer* %eople and so on. 2o e+er* you can add your o n images by using 4y Theme or creating a theme. The "allery is e6plained in more detail in the Getting Started Guide $hapter ## Graphics= the Galler2= and 'ontwor4.

'igure #8A: Galler2 dialog 1) Clic0 on the (allery icon on the /tandard toolbar or go to ,ools < (allery on the main menu bar to open the "allery. 2) #a+igate through the "allery to find the re@uired image. 3) Hight.clic0 on the re@uired image and select nsert < Copy from the conte6t menu or clic0 and drag the image from the "allery into the Calc spreadsheet. 7y default* the "allery is doc0ed abo+e the Calc spreadsheet. To e6pand the "allery* position the cursor o+er the line that di+ides it from the top of the spreadsheet. 3hen the cursor changes to parallel lines ith arro s* clic0 and drag do n ard. The spreadsheet automatically re.siFes in response. To e6pand the "allery ithout affecting the or0space* undoc0 it so it floats o+er the or0space. 2old do n the $trl 0ey and double.clic0 on the "allery title bar* or use the 0eyboard shortcut $trl5Shift5'#8. The "allery then becomes a floating dialog on top of the spreadsheet. To doc0 the "allery in its default position abo+e the spreadsheet* hold do n the $trl 0ey and double.clic0 on the "allery title bar. 3hen the "allery is doc0ed* you can hide it and +ie the full Calc spreadsheet. Clic0 the ;ideH+how button &highlighted in 5igure 10E) in the bar separating the "allery from the spreadsheet. To sho the "allery again* clic0 the ;ideH+how button again. To close the "allery* go to ,ools < (allery on the main menu bar and unchec0 (allery* or clic0 on the (allery icon again.

$hapter % Using Graphics in $alc

#"-

4odifying images
3hen you insert a ne image* you may need to modify it to suit the document. This section describes ho to resiFe* crop* rotate and adGust an image in Calc. ,ny changes made in Calc do not affect the original image* hether it is an embedded or lin0ed image file. Calc pro+ides se+eral tools for or0ing ith images and these tools are sufficient for most re@uirements. 2o e+er* for professional results it is generally better to use a soft are designed to modify image files* for e6ample "I4%* and then insert the result into Calc. "I4% is an open.source graphics program that can be do nloaded from http'(( .gimp.org(do nloads(.

'igure #8-: Picture toolbar and available tools

*sing the Picture toolbar


3hen you insert an image or select one already present in your spreadsheet* the %icture toolbar opens &5igure 10-). If it does not open* go to >iew < ,oolbars < Picture on the main menu bar. The tools a+ailable from left to right on the %icture toolbar are as follo s'

Filter X opens the "raphic 5ilter toolbar* hich is described in J$sing graphic filtersK on
page 1B1.

(raphics mode X changes the display of the graphic from color to grayscale* blac0 and
hite* or a atermar0. This setting affects only the display and printing of the pictureN the original picture file remains unchanged.

Default X the graphic is displayed unaltered in color. Gra2scale X the graphic is displayed in 2BA shades of gray. Blac4 <hite X the graphic is displayed in blac0 and hite. <atermar4 X the brightness and contrast of the graphic are reduced to the e6tent that the graphic can be used as a atermar0 &bac0ground).

$hapter % Using Graphics in $alc

#".

Color X opens the Color toolbar &5igure 10<) to adGust the +alues of the H"7 colors*
brightness* contrast and "amma. These adGustments do not affect the original picture* but the +alues are stored in LibreOffice as a separate formatting set.

3ed= Green= Blue X select +alues bet een .100d &no color) to R100d &full intensity)N 0d represents the original color +alue of the graphic. Brightness X select a +alue bet een X100d &totally blac0) and R100d &totally hite). $ontrast X select a +alue bet een X100d &minimum) and R100d &ma6imum). Gamma X this affects the brightness of the middle color tones. /elect a +alue bet een 0.10 &minimum) to 10 &ma6imum) Try adGusting this +alue if changing brightness or contrast does not gi+e you the re@uired result.

'igure #8.: $olor toolbar

,ransparency X adGust the degree of transparency of the picture bet een 0d &opa@ue)
and 100d &fully transparent).

2ine X opens the Line dialog so you can adGust the border style of the selected image. /ee
the Draw Guide for more information on ho to modify lines.

Area X opens the ,rea dialog allo ing you to edit color* gradient* hatching and fills of the
bac0ground area that contains the image c not the image itself. To see the bac0ground* you must set the transparency of the image to a suitably high +alue. /ee the Draw Guide for more information on ho to modify areas.

+hadow X sets the default shado effect around the image. To adGust the shado effect*
open the ,rea dialog and clic0 on the +hadow tab. /ee the Draw Guide for more information on ho to modify shado s.

Crop Picture X opens the Crop dialog and allo s you to crops or trims the selected image.
5or more information* see JCropping imagesK on page 1B2.

Anchor X allo s you to toggle bet een anchoring the image to a cell or to a page. 5or
more information* see J,nchoring imagesK on page 1B-.

7ring to Front X brings the selected image to the front of the stac0 hen there is more
than one image in the spreadsheet. 5or more information* see J,rranging imagesK on page 1B-.

+end to 7ack X sends the selected image to the rear of the stac0 hen there is more than
one image in the spreadsheet. 5or more information* see J,rranging imagesK on page 1B-.

,o Foreground X allo s the image to float in front of the spreadsheet cells. 5or more
information* see J,rranging imagesK on page 1B-.

,o 7ackground X mo+es the selected image into the bac0ground so that appears behind
the spreadsheet cells. 5or more information* see J,rranging imagesK on page 1B-.

%isplay (rid X displays or hides grid lines that you can use to align images on a page. +nap to (rid X automatically aligns images to +ertical and horiFontal grid lines. To o+erride
this feature* hold do n the ,lt 0ey hen you drag an obGect.

;elplines 8hile 4oving X displays guides or helplines hen dragging an image to a ne


position.

Alignment X if t o or more images are selected* adGusts the horiFontal and +ertical
alignment of the images in relation to each other. 5or more information* see J,ligning imagesK on page 1B<.

$hapter % Using Graphics in $alc

#%8

*sing graphic filters


,pplying graphic filters to any image consecuti+ely ill progressi+ely degrade the @uality of the image. The graphic filters used in Calc utiliFe hat is 0no n as a destructi+e editing algorithm* hereby each filter is applied to the image immediately* changing the original data of the image. /uccessi+e transformations result in less and less original data remaining* thus compromising the @uality of the inserted picture. 3hile this might be acceptable for use in simple documents* it is still recommended that dedicated photo or image editing soft are be used to perform anything but the simplest of manipulations.

?ote

'igure ##8: Graphic 'ilter toolbar and tools ,fter selecting an image and the %icture toolbar &5igure 10-) has opened* clic0 on the Filter icon to open the "raphic 5ilter toolbar &5igure 110). 5ilters or0 on the current +ie of a graphic and they can be combined. 5ilters al ays apply to the entire graphic and it is not possible to use filters to edit only a part of the obGect.

nvert X in+erts or re+erses the color +alues of a color image &similar to a color negati+e)* or the brightness +alues of a grayscale image. ,pply the filter again to re+ert to the original image. bet een neighboring pi6els and produces a slight lac0 of sharpness. ,lso opens the /mooth dialog here you can set the Smooth 3adius parameter used for the /mooth filter hen you clic0 =6.

+mooth X softens or blurs the image by applying a lo pass filter reducing the contrast

+harpen X sharpens the image by applying a high pass filter increasing the contrast
bet een neighboring pi6els emphasiFing the difference in brightness. This ill accentuate the outlines and the effect ill be strengthened if you apply the filter se+eral times.

3emove ?oise X remo+es noise by applying a median filter by comparing e+ery pi6el ith
its neighbors. It then replaces e6treme +alues of those pi6els that de+iate in color by a large amount from a mean +alue by a pi6el ith a mean color +alue. The amount of picture information does not increase* but because there are fe er contrast changes resulting in a graphic that loo0s smoother.

$hapter % Using Graphics in $alc

#%#

+olari5ation X solariFation is a phenomenon in photography in hich the image recorded


on a negati+e or on a photographic print is holly or partially re+ersed in tone. Dar0 areas appear light or light areas appear dar0. /olariFation as originally a photochemical effect used during photographic film de+elopment and is no used in the digital orld of computing to create a change or re+ersal of color. Clic0ing /olariFation opens the /olariFation dialog allo ing you to define the threshold +alue for solariFation. Dntering a (hreshold value abo+e E0d re+erses the color +alues. /electing the 0nvert option* all the colors are in+erted.

Aging X aging creates a loo0 that resembles photographs de+eloped in the early days of
photography. ,ll pi6els are set to their gray +alues and then the green and blue color channels are reduced by the amount specified in the ,ging dialog hile the red color channel is not changed. Clic0ing ,ging opens the ,ging dialog allo ing you to define the ,ging degree and create an old loo0 for your graphic.

Posteri5e X posteriFing reduces the number of colors in a graphic ma0ing it loo0 flatter.
3hen used on a photograph* posteriFing can ma0e the photograph loo0 li0e a painting. Clic0ing %osteriFe opens the %osteriFe dialog allo ing you to define the number of Poster colors to produce the effect you ant.

Pop Art X changes the colors of an image to a pop.art format. Charcoal +ketch X displays the image as a charcoal s0etch. The contours of the graphic
are dra n in blac0 and the original colors are suppressed.

3elief X this filter calculates the edges of an image in relief as if the image is illuminated by
a light source. Clic0ing Helief opens the Helief dialog here you can select the position of the Light source producing shado s that differ in direction and magnitude.

4osaic X this filter Goins groups of pi6els and con+erts them into a rectangular tile in a
single color creating an image that appears to be a mosaic. The larger the indi+idual rectangles created* the fe er details the mosaic graphic has. Clic0ing 4osaic opens the 4osaic dialog allo ing you to set the number of pi6els used to create the <idth and +eight of each tile created. /electing )nhanced edges ill enhance the edges of each tile to create a sharper definition.

Cropping images
3hen you only ant to display a section of an image in your spreadsheet* you may can crop or hide parts of an image. If you ant to remo+e or delete areas of an image then it is recommended to use LibreOffice Dra or another graphics pac0age before inserting the image into your spreadsheet. 1) /elect the image in your spreadsheet. 2) Clic0 the Crop Picture icon on the %icture toolbar to open the Crop dialog &5igure 111). 3) $sing the options a+ailable in the Crop dialog and described belo * specify ho the image is cropped. It is not possible to use the mouse for cropping an image in Calc. The thumbnail sho n in the dialog pre+ie displays the image area that ill remain after cropping ith an inner rectangle. =) Clic0 =6 to close the dialog and your cropped image is displayed in your spreadsheet.
If you crop an image in Calc* the original image file is not affected. 2o e+er* if you e6port the spreadsheet to 2T4L format* the full original image is e6ported* not the cropped image.

?ote

$hapter % Using Graphics in $alc

#%9

'igure ###: $rop dialog


The cropped shape is al ays a rectangle. 4ore comple6 cropped shapes are not possible in Calc. To create more comple6 shapes hen cropping* use a dedicated photograph or image editing soft are* then import the resulting image into Calc.

?ote

The options a+ailable in the Crop dialog are as follo s'

Crop X allo s you to trim or scale the selected image* or to add hite space around the
image.

Deep scale X maintains the original scale of the image siFe of the image changes.

hen cropping so that only the

Deep image si1e X maintains the original siFe of the image hen you crop so that only the scale of the image changes. To reduce the scale of the image* select this option and enter negati+e +alues in the cropping bo6es. To increase the scale of the image* enter positi+e +alues in the cropping bo6es. Left and 3ight X if Deep Scale is selected* enter a positi+e amount to trim the left or right edge of the image* or a negati+e amount to add hite space to the left or right of the image. If Deep image si1e is selected* enter a positi+e amount to increase the horiFontal scale of the image* or a negati+e amount to decrease the horiFontal scale of the image. (op and Bottom X if Deep Scale is selected* enter a positi+e amount to trim the top or bottom of the image* or a negati+e amount to add hite space abo+e or belo the image. If Deep image si1e is selected* enter a positi+e amount to increase the +ertical scale of the image* or a negati+e amount to decrease the +ertical scale of the image.

+cale X allo s you to change the scale of the selected image. In the <idth and +eight
fields enter a +alue for the idth or height of the selected image as a percentage.

mage si5e X allo s you to change the siFe of the selected image. In the <idth and +eight fields enter a +alue for the idth or height of the selected image.

Preview field X displays a pre+ie of the selected image. =riginal +i5e X returns the selected image to its original image siFe hich is indicated
abo+e the =riginal +i5e button. The bitmap image density is sho n alongside the original siFe of the image.

$hapter % Using Graphics in $alc

#%3

Adding te.t
To add te6t to an image you ha+e inserted into your spreadsheet. ,ny te6t added to an image becomes an integral part of that image and ill mo+e ith the image hen the image is repositioned. 5or more information on adding te6t to images* see the Draw Guide. 1) /elect the image you ant to add te6t to. 2) Double.clic0 on the image and the te6t cursor flashes in the center of the image. The Te6t 5ormatting toolbar automatically opens at the top of the spreadsheet. 3) Dnter your te6t and ma0e any formatting adGustments to the te6t using the tools on the Te6t 5ormatting toolbar. =) 3hen finished* clic0 outside the image to cancel the te6t editing mode and your te6t ill appear in the default position at the center of the image.

'igure ##9: (e*t dialog B) To adGust the position of the te6t or ho it appears in the image* right.clic0 on the image and select ,e.t from the conte6t to open the Te6t dialog &5igure 112). A) 4a0e any necessary changes and clic0 =6 to close the dialog. The +arious options a+ailable are described belo . If an option is grayed out in the Te6t dialog* then it is not a+ailable for use in Calc. The options in the Te6t dialog are as follo s'

,e.t X sets the layout and anchoring properties for te6t in the selected image. The te6t is
positioned relati+e to the edges of the image.

'it width to te*t X e6pands the idth of the image to the idth of the te6t* if the image is smaller than the te6t. 'it height to te*t X e6pands the height of the obIect to the height of the te6t* if the obIect is smaller than the te6t. 'it to frame X resiFes the te6t to fit the entire area of the image. ,dIust to contour X adapts the te6t flo so that it matches the contours of the selected image. <ord wrap te*t in shape X raps the te6t that you add after double.clic0ing a custom shape to fit inside the shape.

$hapter % Using Graphics in $alc

#%"

3esi1e shape to fit te*t X resiFes a custom shape to fit the te6t that you enter after double.clic0ing the shape.

+pacing to borders X specify the amount of space to lea+e bet een the edges of the
image and the borders of the te6t.

Left X enter the amount of space to lea+e bet een the left edge of the image and the left border of the te6t. 3ight X enter the amount of space to lea+e bet een the right edge of the image and the right border of the te6t. (op X enter the amount of space to lea+e bet een the top edge of the image and the upper border of the te6t. Bottom X enter the amount of space to lea+e bet een the bottom edge of the image and the lo er border of the te6t.

,e.t anchor X set the anchor position. Clic0 here you ant to place the anchor for the
te6t.

Full width X anchors the te6t to the full idth of the image.

Positioning$ resi5ing and arranging images


*sing the mouse
1ositionin%
To mo+e an image to a ne position in your spreadsheet* clic0 on the image and drag it to a ne position. Helease the mouse button hen you are satisfied. The image ill still be anchored to the cell or page the image as originally anchored to.

&esi-in%
1) Clic0 on the image to display the colored selection handles. 2) %osition the cursor o+er one of the colored selection handles. The cursor changes shape gi+ing a graphical representation of the direction of the resiFing. The corner handles resiFe both the idth and the height of the image simultaneously. The top* bottom* left and right handles only resiFe one dimension at a time. 3) Clic0 and drag to resiFe the image. =) Helease the mouse button hen satisfied ith the ne siFe.

,ip

To retain the original proportions of the image* Shift5clic4 one of the corner handles* then drag.

Position and +i5e dialog


If you ant to accurately position and siFe an image in your spreadsheet* go to Format < (raphic < Position and +i5e on the main menu bar* or right.clic0 on an image and select Position and +i5e from the conte6t menu &5igure 113).

1osition and !i-e


Open the %osition and /iFe dialog and clic0 on the Position and Si1e tab &5igure 113) to set the appropriate +alues.
$hapter % Using Graphics in $alc #%%

Position X specify the location of the selected image on the spreadsheet. Position ; X enter the horiFontal distance that you ant to mo+e the obGect relati+e to
the base point selected in the grid.

Position F X enter the +ertical distance that you ant to mo+e the obGect relati+e to the base point selected in the grid. Base point X select a base point in the grid and then enter the amount that you ant to shift the image relati+e to the base point that you selected in the Position F and Position ; bo6es. The base points correspond to the selection handles on an image.

'igure ##3: Position and Si1e dialog

+i5e X specify the amount by hich you ant to resiFe the selected image ith respect to
the selected base point.

<idth X enter a idth for the selected image. +eight X enter a height for the selected image. Deep ratio X maintains proportions hen you resiFe the selected image. Base point X select a base point in the grid* and then enter the ne siFe dimensions for the selected image in the <idth and +eight bo6es.

Protect Position X pre+ents changes to the position or the siFe of the selected image. Si1e X pre+ents you from resiFing the image. Adapt X specifies* if the siFe of a dra ing image should be adGusted to fit the siFe of
entered te6t.

'it width to te*t X e6pands the idth of the image to the idth of the te6t* if the image is smaller than the te6t. 'it height to te*t X e6pands the height of the image to the height of the te6t* if the image is smaller than the te6t.

The units of measurement used for Q((! coordinates and the idth and height of the image are set by going to ,ools < =ptions < 2ibre=ffice %raw < (eneral.

$hapter % Using Graphics in $alc

#%&

The default location of the base points for position and siFe is the upper left corner of the spreadsheet. !ou can temporarily change this base point to ma0e positioning or dimensioning simpler by clic0ing on a position corresponding to the location of the base point you ant to use. This change in base point is only +alid for single use and the base point is reset to the standard position of top left corner hen you close the %osition and /iFe dialog.

&otatin% i(a%es
To accurately rotate an image* clic0 on the 3otation tab of the %osition and /iFe dialog &5igure 11=). $se this dialog to define the rotation angle and the location of the pi+ot point.

'igure ##": Position and Si1e dialog E 3otation page

Pivot point X the selected image is rotated around a pi+ot point that you specify. The
default pi+ot point is at the center of the image. If you set a pi+ot point too far outside of the image boundaries* the image could be rotated off the page.

Position ; X enter the horiFontal distance from the left edge of the page to the pi+ot point. Position F X enter the +ertical distance from the top edge of the page to the pi+ot point. Default settings X select here you ant to place the pi+ot point. Default position is the center of the image. Changing the rotation pi+ot point is only +alid for single use. The pi+ot point is reset to default settings hen you close the %osition and /iFe dialog.

3otation angle X specify the number of degrees that you ant to rotate the selected
image* or clic0 in the rotation grid.

,ngle X enter the number of degrees that you ant to rotate the selected image. Default settings X clic0 on the indicator to rotate the image. The number of degrees is sho n in the ,ngle bo6 as you rotate the indicator.

!lant and corner radius


To accurately set the corner radius or slant angle of an image* clic0 on the Slant > $orner 3adius tab of the %osition and /iFe dialog &5igure 11B).

$hapter % Using Graphics in $alc

#%A

'igure ##%: Position and Si1e dialog E Slant > $orner 3adius page

Corner 3adius X you can only round the corners of a rectangular image. If this section is
grayed out* then you cannot set a corner radius.

3adius X enter the radius of the circle that you ant to use to round the corners. The larger the +alue for corner radius set* the rounder the corners of an image become.

+lant X slants the selected image along the bottom edge of the image. ,ngle X enter the angle of the slant a6is. The slant angle relates to ho much an image
inclines or slants from its normal +ertical position on a dra ing.

Arranging images
Dach image that you place in your spreadsheet is successi+ely stac0ed on the preceding image. $se the arrange commands to change the stac0ing order of images in your spreadsheet. !ou cannot change the stac0ing order of te6t. 1) /elect the image you ant to rearrange. 2) "o to Format < Arrange on the main menu bar* or right.clic0 on the image and select one of the arrange options described belo . 3) ,lternati+ely* clic0 on the 7ring to Front icon or the +end to 7ack icon %icture toolbar to @uic0ly mo+e your image to the front or rear of the stac0. The options a+ailable for arranging images are as follo s' front of other images. on the

7ring to Front X mo+es the selected image to the top of the stac0ing order* so that it is in 7ring Forward X mo+es the selected image up one le+el* so that it is closer to top of the
stac0ing order. #ot a+ailable on the %icture toolbar.

+end 7ackward X mo+es the selected image do n one le+el* so that it is closer to the
bottom of the stac0ing order. #ot a+ailable on the %icture toolbar.

+end to 7ack X mo+es the selected image to the bottom of the stac0ing order* so that it is
behind the other images.

,o Foreground X mo+es the selected image in front of te6t. ,o 7ackground X mo+es the selected image behind te6t. To select a bac0ground image so
that you can modify or replace it* you ha+e to use the #a+igator. Other methods of selection* such as clic0ing or double.clic0ing* do not or0.

Anchoring images
To anchor an image or change the type of anchor used' 1) "o to Format < Anchor < ,o Page or ,o Cell on the main menu bar* or right clic0 on the image and select ,o Page or ,o Cell from the conte6t menu.

$hapter % Using Graphics in $alc

#%-

2) ,lternati+ely* clic0 on the Change Anchor icon on the %icture toolbar and the anchor type ill toggle bet een ,o Page or ,o Cell. ,nchors are used for images so that they stay in their position in relation to other items.

,o Page X anchoring an image to the page allo s it to be positioned in a specific place on


the page. The image does not mo+e hen cells are added or deleted and is e@ui+alent to an absolute reference. The image ill al ays stay in the same position on the page here it is placed.

,o Cell X anchoring an image to a cell ensures that the graphic al ays stays ith the
content it is originally anchored to. If an image is anchored to cell 710* and a ne ro is inserted* the graphic ill then be anchored to cell 711 and is e@ui+alent to a relati+e reference.

Aligning images
3hen you ha+e more than one image in your spreadsheet* you can align these images to gi+e your spreadsheet a more professional loo0. 1) /elect all of the graphics to be aligned. 2) "o to Format < Alignment on the main menu bar* or right clic0 on the image and select Alignment from the conte6t menu* or clic0 on the Alignment icon on the %icture toolbar. 3) /elect one of the si6 options a+ailable for alignment and your images ill be aligned. The si6 options include three for aligning the images horiFontally &left* centered* right) and three for aligning the images +ertically &top* center* bottom).

2eft X horiFontally aligns the left edges of the selected images. Centered X horiFontally centers the selected images. 3ight X horiFontally aligns the right edges of the selected images. ,op X +ertically aligns the top edges of the selected images. Center X +ertically centers the selected images. 7ottom X +ertically aligns the bottom edges of the selected images.

(rouping and ungrouping images


Groupin%
!ou can group se+eral images so that they become obGect in your spreadsheet. 1) /elect the images you ant to group. 2) "o to Format < (roup < (roup on the main menu bar* or right.clic0 on the selected images and select (roup < (roup from the conte6t menu.

+n%roupin%
1) /elect the image group you ant to ungroup. 2) "o to Format < (roup < *ngroup on the main menu bar* or right.clic0 on the selected images and select (roup < *ngroup from the conte6t menu.

Editin% %rouped i(a%es


1) /elect the image group here you ant to edit an image ithin the group. 2) "o to Format < (roup < #nter (roup on the main menu bar* or right.clic0 on the selected images and select (roup < #dit (roup from the conte6t menu.
$hapter % Using Graphics in $alc #%.

3) /elect the image you ant to ma0e changes to and carry out those changes. =) "o to Format < (roup < #.it (roup on the main menu bar* or right.clic0 on the selected images and select (roup < #.it (roup from the conte6t menu.

Calc drawing tools


Calc* li0e all other components of LibreOffice* has a range of tools to create dra ings and this chapter co+ers the default options in Calc. 5or a more detailed e6planation of the dra ing tools and their uses* see the Draw Guide. 2o e+er* if you need to create comple6 dra ings for your spreadsheet* it is recommended to use LibreOffice Dra or another dra ing program and then insert the dra ing into your spreadsheet.

%rawing toolbar
To begin using the dra ing tools* go to >iew < ,oolbars < %rawing to open the Dra ing toolbar* hich appears in its default position at the bottom of the spreadsheet. !ou can ma0e this toolbar a floating toolbar and mo+e it to a con+enient position. 3hen the Dra ing toolbar opens* it opens ith a default set of tools as sho n in 5igure 11A.

'igure ##&: Drawing toolbar The dra ing tools a+ailable for use hen the Dra ing toolbar is opened are sho n in and these are indicated by a border around the tool icon. ,ny not on the Dra ing toolbar does not ha+e a border around the tool icon. To add tools to the Dra ing toolbar* right.clic0 in an empty area on the toolbar and select >isible 7uttons from the conte6t menu.

%rawing tools
Heferring to 5igure 11E* the dra ing tools are e6plained as follo s'

+election X hen selected* lets you select obGects in the current document. To select more
than one obGect* drag a selection frame around the obGects. To add an obGect to a selection* press Shift and then clic0 the obGect.

'igure ##A: ,vailable drawing tools

$hapter % Using Graphics in $alc

#&8

2ine X dra s a straight line here you drag in the current spreadsheet. To constrain the
line to =B degrees* hold do n Shift hile you drag. To enter te6t on a line* double.clic0 the line and type or paste your te6t. The te6t direction corresponds to the direction you dragged to dra the line. To hide the line* select ?one from the drop.do n list for Line /tyle on the Dra ing ObGect %roperties toolbar &5igure 11on page 1A3).

3ectangle X dra s a rectangle in the current spreadsheet. Clic0 here you ant to place a
corner of the rectangle* and drag to the siFe you ant. To dra a s@uare* hold do n Shift hile you drag.

#llipse X dra s an o+al in the current spreadsheet. Clic0 here you ant to dra the o+al*
and drag to the siFe you ant. To dra a circle* hold do n Shift hile you drag.

Polygon X dra s a line composed of a series of straight line segments. Drag to dra a line
segment* clic0 to define the endpoint of the line segment* and then drag to dra a ne line segment. Double.clic0 to finish dra ing the line. To create a closed shape* double.clic0 the starting point of the line. 2old the Shift 0ey hile dra ing a polygon to position ne points at =B degree angles. The Ddit %oints mode enables you to interacti+ely modify the indi+idual points of the polygon.

Curve X dra s a smooth 7eFier cur+e. Clic0 here you ant the cur+e to start* drag*
release* and then mo+e the pointer to here you ant the cur+e to end and clic0. 4o+e the pointer and clic0 again to add a straight line segment to the cur+e. Double.clic0 to finish dra ing the cur+e. To create a closed shape* double clic0 the starting point of the cur+e. The arc of the cur+e is determined by the distance you drag.

Freeform 2ine X dra s a freeform line here you drag in the current spreadsheet. To end
the line* release the mouse button. To dra the starting point of the line. a closed shape* release the mouse button near

Arc X dra s an arc in the current spreadsheet. To dra an arc* drag an o+al to the siFe you
ant* and then clic0 to define the starting point of the arc. 4o+e the cursor to here you ant to place the endpoint and clic0. !ou do not need to clic0 on the o+al. To dra an arc that is based on a circle* hold do n Shift hile you drag.

#llipse Pie X dra s a filled shape that is defined by the arc of an o+al and t o radius lines
in the current spreadsheet. To dra an ellipse pie* drag an o+al to the siFe you ant* and then clic0 to define the first radius line. 4o+e the cursor to here you ant to place the second radius line and clic0. !ou do not need to clic0 on the o+al. To dra a circle pie* hold do n Shift hile you drag.

Circle +egment X dra s a filled shape that is defined by the arc of a circle and a diameter
line in the current spreadsheet. To dra a circle segment* drag a circle to the siFe you ant* and then clic0 to define the starting point of the diameter line. 4o+e the cursor to here you ant to place the endpoint of the diameter line and clic0. !ou do not need to clic0 on the circle. To dra an ellipse segment* hold do n Shift hile you drag.

,e.t X dra s a te6t bo6 ith horiFontal te6t direction here you drag in the current
spreadsheet. Drag a te6t bo6 to the siFe you ant any here in the spreadsheet and then type or paste your te6t. Hotate the te6t bo6 to get rotated te6t.

>ertical ,e.t X dra s a te6t bo6 ith +ertical te6t direction here you clic0 or drag in the
current spreadsheet. Drag a te6t bo6 to the siFe you ant any here in the spreadsheet and then type or paste your te6t. Only a+ailable hen ,sian language support is enabled in ,ools < =ptions < 2anguage +ettings < 2anguages.

,e.t Animation X inserts animated te6t ith horiFontal te6t direction into the current
spreadsheet.

$hapter % Using Graphics in $alc

#&#

Callouts X dra s a line that ends in a rectangular callout ith horiFontal te6t direction from
here you drag in the current spreadsheet. Drag a handle of the callout to resiFe the callout. To add te6t* clic0 the edge of the callout and then type or paste your te6t. To change a rectangular callout to a rounded callout* drag the largest corner handle hen the cursor changes shape.

>ertical Callouts X dra s a line that ends in a rectangular callout ith +ertical te6t direction
from here you drag in the current spreadsheet. Drag a handle of the callout to resiFe the callout. To add te6t* clic0 the edge of the callout* and then type or paste your te6t. To change a rectangular callout to a rounded callout* drag the largest corner handle hen the pointer changes shape. Only a+ailable hen ,sian language support is enabled in ,ools < =ptions < 2anguage +ettings < 2anguages.

7asic +hapes X opens the 7asic /hapes toolbar hich you can use to insert shapes into
your spreadsheet.

+ymbol +hapes X opens the /ymbol /hapes toolbar from hich you can insert symbols
into your spreadsheet.

7lock Arrows X opens the 7loc0 ,rro s toolbar from hich you can insert bloc0 arro s
into your spreadsheet.

Flowchart X opens the 5lo chart toolbar from hich you can insert flo chart symbols into
your spreadsheet.

Callouts X opens the Callouts toolbar from hich you can insert callout shapes into your
spreadsheet.

+tars and 7anners X opens the /tars and 7anners toolbar from hich you can insert star
and banner shapes into your spreadsheet.

Points X enables you to edit points on the dra ing you are creating in your spreadsheet. Fontwork (allery X opens the 5ont or0 "allery from hich you can insert graphical te6t
art into your spreadsheet.

From File X inserts a picture or image into the current spreadsheet. #.trusion =nH=ff X s itches the 3D effects on and off for selected obGects.

*sing drawing tools


1) Clic0 in the spreadsheet here you ant the dra ing to be anchored. !ou can change the anchor type later* if necessary. 2) /elect the tool from the Dra ing toolbar &5igure 11A on page 1A0). 3) 4o+e the cursor to here you ant the graphic to appear* then clic0.and.drag to create the dra ing obGect. /ome tools ha+e other re@uirementsN see the 2elp or the Draw Guide for details. The selected dra ing function remains acti+e* so you can dra another obGect of the same type. =) To cancel the selected dra ing function* press the )sc 0ey or clic0 on the +elect icon on the Dra ing toolbar.

%rawing obCect properties


5or more information on the properties of dra ing obGects* see the Draw Guide.

$hapter % Using Graphics in $alc

#&9

!ettin% properties
!ou can set the default properties for a dra ing obGect before you dra an obGect. These default properties are applied only to the current spreadsheet and are are not retained hen you close the spreadsheet. The properties only apply to dra ing obGects. 1) Clic0 /elect on the Dra ing toolbar &5igure 11A on page 1A0). 2) On the Dra ing ObGect %roperties toolbar &5igure 11-)* set the +alues or options you ant to use for each property. 3hen you select area or line properties* dialogs open here you can set the +alues used for area or line

'igure ##-: Drawing ObIect Properties toolbar

C"an%in% properties
!ou can change the properties of an e6isting dra ing obGect &fill color* line type and eight* anchoring* and so on) using either the Dra ing ObGect %roperties toolbar &5igure 11-)* or the options a+ailable on the main menu bar or the conte6t menu hen you right.clic0 on the dra ing obGect.

3esi5ing drawing obCects


/elect the obGect and clic0 on one of the selection handles then drag the obGect to its ne siFe. 5or a scaled resiFing* select one of the corner handles and 0eep the Shift 0ey pressed hile dragging the handle. 5or more information* see J%ositioning* resiFing and arranging imagesK on page 1BB.

(rouping and ungrouping drawing obCects


"rouping* ungrouping and editing grouped dra ing obGects* see J"rouping and ungrouping imagesK on page 1B< for more information.

Additional tools
/ome additional tools are only a+ailable for images or graphics hen the you right clic0 on an image or graphic and open the conte6t menu.

%escription
!ou can add metadata in the form of a title and description to an image. This information is used by accessibility tools &such as screen reader soft are) and as ,LT &alternati+e) attributes if you e6port the document to 2T4L.

?ame
!ou can add a custom name to be assigned to an image and this ill ma0e an image easier to find in the #a+igator. ,lso* assigning names to an image allo s it to be easily identified hen teams of personnel are or0ing on the same multi page spreadsheet.

Flip
5lips the image either horiFontally or +ertically. ,ny te6t added to the image also changes orientation ith the image* but only hen the image is flipped +ertically.

$hapter % Using Graphics in $alc

#&3

Assign 4acro
Opens the ,ssign 4acro dialog &5igure 11<) so you can add programmable functionality to the graphic. Calc has a +ery good macro functionality and more information on macros can be found in $hapter #9 $alc :acros.

'igure ##.: ,ssign :acro dialog

;yperlink
5or images and graphics* you can define a hyperlin0 at another location in your spreadsheet* another document or eb page. To do this* select the graphic* right.clic0 and select ;yperlink from the conte6t menu to open the 2yperlin0 dialog &5igure 120). /ee $hapter #8 Lin4ing $alc Data for more information on hyperlin0s.

'igure #98: +2perlin4 dialog

$hapter % Using Graphics in $alc

#&"

Compress graphic
!ou can compress a graphic to reduce the file siFe of your spreadsheet. To do this* select the graphic* right.clic0 and select Compress (raphic from the conte6t menu to open a dialog &5igure 121) here you can set the compression options. The dialog sho s the type* original siFe* +ie siFe* rand image capacity of the graphic. $se the dialog to select the type of compression and the resolution of the reduced image. 3hen you ha+e made your changes* clic0 Calculate and the siFe of the compressed graphic is displayed in @ew $apacit2. If you are satisfied ith the ne capacity* clic0 =6 and the graphic is compressed.

'igure #9#: $ompress Graphic dialog

#dit with e.ternal tool


!ou can edit a graphic ith an e6ternal tool to use more ad+anced tools. To do this* select the graphic* right.clic0 and select #dit with #.ternal ,ool from the conte6t menu. The dialog that opens ill depend on your computer setup.

mage maps
,n image map is a reference.sensiti+e graphic or te6t frame. In Calc* you $trl5clic4 on defined areas &also 0no n as hotspots) in the graphic or te6t frame to go to a target or lin0ed reference such as a $HL. The reference areas* along ith any lin0ed $HLs and corresponding te6t are displayed hen resting the cursor on these areas that ha+e been defined in the Image4ap Dditor.

$hapter % Using Graphics in $alc

#&%

mage map types


There are t o types of Image4aps.

+erver +ide mage4ap X is e+aluated on the ser+er computer and appear for the reader
as a picture or frame on the page. Clic0 on the Image4ap ith the mouse* and the coordinates of the relati+e position are sent to the ser+er. The ser+er then determines the ne6t step to ta0e. There are se+eral incompatible methods to define this process* the t o most common being 33C &CDH#) 2TT% /er+er &5ormat type' 4,% X CDH#) and #C/, 2TT% /er+er &5ormat type' 4,% X #C/,) LibreOffice creates Image4aps for both methods. /elect the format from the 5ile type list in the /a+e ,s dialog in the Image4ap Dditor. /eparate map files are created hich you must upload to the ser+er. !ou ill need to as0 your pro+ider or net or0 administrator hich type of Image4aps are supported by the ser+er and ho to access the e+aluation program.

Client +ide mage4ap X is e+aluated on the client computer. The area of the picture or
frame here the reader can clic0 is indicated by the appearance of a lin0ed $HL hen the cursor passes o+er the area. The Image4ap is stored in a layer belo the picture and contains information about the referenced regions. The only disad+antage of Client /ide Image4aps is that older 3eb bro sers cannot read themN a disad+antage that ill* ho e+er* resol+e itself in time. 3hen sa+ing the Image4ap* select the file type /I% X /tarCie Image4ap. This sa+es the Image4ap directly in a format hich can be applied to e+ery acti+e picture or frame in your document. 2o e+er* if you Gust ant to use the Image4ap on the current picture or te6t frame* you do not ha+e to sa+e it in any special format. ,fter defining the regions* simply clic0 Apply. Client /ide Image4aps sa+ed in 2T4L format are inserted directly into the page in 2T4L code.

Creating image maps


1) %osition the cursor here you ant the Image4ap in your spreadsheet. 2) Insert an image or graphic you ant to use into your spreadsheet. 3) 4a0e sure the image or graphic is selected and go to #dit/< mage4ap on the main menu bar to open the Image4ap Dditor &5igure 122). The Image4ap Dditor displays the image or graphic as a bac0ground. =) $se the tools in the Image4ap Dditor to dra a hotspot shape* for e6ample a rectangle* o+er the image at the bac0ground. , hotspot is highlighted in 5igure 122. B) Dnter the $HL in the ,ddress te6t bo6 that ill open a eb bro ser hen the user clic0s the hotspot. A) Optionally* enter te6t in the (e*t bo6 that ill sho as a tip hen the user ho+ers the cursor o+er the hotspot. E) Clic0 the Apply icon to apply your changes to the hotspot. -) If necessary* clic0 the +ave icon to sa+e the image or graphic for future use in Image4ap file format in the file location that you ant to use. <) To chec0 if the hotspot or0s correctly* deselect the graphic or image in Calc and then $trl5clic4 on the hotspot to open your bro ser at the correct ebpage or file location. 10) /a+e the spreadsheet before closing the spreadsheet and LibreOffice.

?otes

It is recommended not to use the hole image or graphic as a hotspot hen defining a single lin0. If you ha+e to use the hole image or graphic* then right.clic0 on the image or graphic and select ;yperlink from the conte6t menu.

$hapter % Using Graphics in $alc

#&&

'igure #99: 0mage:ap )ditor dialog

mage4ap tools
The toolbar at the top of the Image4ap Dditor dialog contains the follo ing tools and bo6es. Depending on the type of hotspot being added to the image map* some tools ill not become acti+e until you change the type of hotspot being added.

Apply X applies the changes that you made to the image map. =pen X loads and e6isting image map in the 4,%.CDH#* 4,%.#C/, or /I% /tarCie file
format.

+ave X sa+es the image map in the 4,%.CDH#* 4,%.#C/, or /I% /tarCie file format. +elect X selects a hotspot in the image map so you can edit it. 3ectangle X dra s a rectangular hotspot on the selected image or graphic. 2old the Shift
0ey do n to dra a s@uare hotspot.

#llipse X dra s an elliptical hotspot on the selected image or graphic. 2old the Shift 0ey
do n to dra a circular hotspot.

Polygon X dra s a polygonal hotspot on the selected image or graphic. Clic0 and drag in
the image or graphic and then clic0 to define one side of the polygon. 4o+e the cursor to here you ant to place the end of the ne6t side of the polygon and then clic0. Hepeat until you ha+e dra n all the sides of the polygon. 3hen you are finished* double clic0 to close the polygon.

Freeform Polygon X dra s a hotspot that is based on a freeform polygon. /elect and
mo+e the cursor to here you close the shape. points. ant to dra the hotspot. Drag a freeform line and release to

#dit Points X lets you change the shape of the selected hotspot by editing the anchor 4ove Points X lets you mo+e indi+idual anchor points of the selected hotspot. nsert Points X inserts an anchor point here you clic0 on the outline of the selected
hotspot.

%elete Points X deletes the selected anchor point from the outline of the selected hotspot
$hapter % Using Graphics in $alc #&A

*ndo X re+erses the last command or last entry you typed. 3edo X re+erses the last $ndo command. Active X disable or enables the hyperlin0 for the selected hotspot. , disabled hotspot is
transparent.

4acro... X assigns a macro that runs hen clic0 the selected hotspot. Properties... allo s you to define the properties of the selected hotspot. Address X enter the $HL for the file that you ant to open hen you clic0 the selected
hotspot.

,e.t X enter the te6t that you ant to display hen the cursor rests on the hotspot. Frame X enter the name of the target frame that you ant to open the $HL in. !ou can also
select a standard frame name from the list. The +alue Mself for the target frame ill or0 in the +ast maGority of occasions. It is not recommended to use the other types of frames unless absolutely necessary.

Mself X file opens in the current frame. Mblan4 X file opens in a ne page. Mparent X file opens in the parent frame of the current frame. If there is no parent frame* the current frame is used. Mtop X file opens in the topmost frame in the hierarchy.

#diting image maps


1) /elect the image or graphic and go to #dit/< mage4ap on the main menu bar to open the Image4ap Dditor &5igure 122). The Image4ap Dditor displays the image or graphic as a bac0ground. 2) /elect the hotspot you ant to edit. , hotspot is highlighted in 5igure 122. 3) Clic0 on the %roperties icon to open the %roperties dialog &5igure 123).

'igure #93: Properties dialog for 0mage:ap )ditor =) 4a0e the necessary changes in the te6t bo6es for U3L* 'rame* @ame* ,lternative te*t and Description. B) Clic0 =6 to sa+e the changes and close the dialog. A) Clic0 the Apply icon to apply your changes to the hotspot in the selected graphic or image.
$hapter % Using Graphics in $alc #&-

E) If necessary* clic0 the +ave icon to sa+e the image or graphic for future use in Image4ap file format in the file location that you ant to use. -) To chec0 if the hotspot or0s correctly* deselect the graphic or image in Calc and then $trl5clic4 on the hotspot to open your bro ser at the correct ebpage or file location. <) /a+e the spreadsheet before closing the spreadsheet and LibreOffice.

$hapter % Using Graphics in $alc

#&.

$hapter & Printing= )*porting= and )!mailing

Muick printing
Clic0 the Print File %irectly icon to send the entire document to the default printer defined for your computer.
!ou can change the action of the Print File %irectly icon* to send the document to the printer defined for the document* instead of the default printer for the computer. Choose ,ools < =ptions < 2oadH+ave < (eneral and select the 2oad printer settings with the document option.

?ote

Controlling printing
5or more control o+er printing* use the %rint dialog &File < Print or $trl5P).

'igure #9". (he Print dialog The %rint dialog has four tabs* from follo ing sections. hich you can choose a range of options* as described in the

The options selected on the %rint dialog apply to this printing of this document only.

?ote

To specify default printing settings for LibreOffice* go to ,ools < =ptions < 2ibre=ffice A Print and ,ools < =ptions < 2ibre=ffice Calc A Print. 5or details* see $hapter #" Setting Up and $ustomi1ing $alc.

$hapter & Printing= )*porting= and )!mailing

#A9

+electing general printing options


On the General tab of the %rint dialog &5igure 12=)* you can choose'

The printer &from the printers a+ailable) 3hich sheets and pages to print* the number of copies to print* hether to print in re+erse
page order and hether to collate multiple copies &3ange and copies section) Clic0 the Properties button to display a printer.specific dialog here you can choose portrait or landscape orientation* hich paper tray to use* and the paper siFe to print on. To print a range of pages* separate the range ith a hyphenN for e6ample* enter '/- to print pages 3 to A. To print single pages* use a semi.colon to separate the pagesN for e6ample* enter 7P0P11 to print pages E* <* and 11. !ou can also print a combination of page ranges and single pages by combining these methodsN for e6ample* enter '/-P)P11P1" to print pages 3* =* B* A* -* 10* and 12. On the Options tab of the %rint dialog &5igure 12B)* you can choose to print to a file &instead of to a printer) and to create a single print Gob containing se+eral copies of the document &instead of a separate print Gob for each copy).

'igure #9%: General print options

Printing multiple pages on a single sheet of paper


!ou can print multiple pages of a document on one sheet of paper. To do this' 1) In the %rint dialog* select the Page La2out tab &5igure 12A).

'igure #9&: Printing multiple page per sheet of paper 2) In the La2out section* select the number of pages to print per sheet. The pre+ie panel on the left of the %rint dialog sho s ho the printed document ill loo0. 3hen printing more than 2 pages per sheet* you can choose the order in hich they are printed across and do n the paper. The pictures abo+e and belo sho the difference.

$hapter & Printing= )*porting= and )!mailing

#A3

3) !ou can choose to dra a border around each page. =) In the 'rom which print choices on the General tab &5igure 12E)* select pages or only some pages. B) Clic0 the =6 button to print.

hether to print all

+electing sheets to print


In addition to printing a full document* you can choose to print indi+idual sheets* ranges of sheets* or a selection of cells in a document.

'igure #9A: $hoosing what to print in $alc %rinting an indi+idual sheet' 1) In the spreadsheet* clic0 on the sheet tab to select the sheet you ant to print. 2) Choose File < Print from the menu bar. 3) In the 3anges and copies section of the %rint dialog* choose the Selected sheets option. =) Clic0 the =6 button. %rinting a range of sheets' 1) In the spreadsheet* select the sheets to print. a) /elect the first sheet. b) 2old do n the $trl 0ey. c) Clic0 on the additional sheet tabs. d) Helease the $trl 0ey hen all re@uired sheets are selected. 2) Choose File < Print from the menu bar. 3) In the 3anges and copies section of the %rint dialog* choose the Selected sheets option. =) Clic0 the =6 button. %rinting a selection of cells' 1) In the document* select the section of cells to print. 2) Choose File < Print from the menu. 3) In the 3anges and copies section of the %rint dialog* select the Selected cells option. =) Clic0 the =6 button. The Print in reverse page order option can be selected ith any of the abo+e options.

Caution

,fter printing* be sure to deselect the e6tra sheets. If you 0eep them selected* the ne6t time you enter data on one sheet* you enter data on all the selected sheets. This might not be hat you ant.

$hapter & Printing= )*porting= and )!mailing

#A"

*sing print ranges


%rint ranges ha+e se+eral uses* including printing only a specific part of the data or printing selected ro s or columns on e+ery page.

%efining a print range


To set a user.defined print range* hich ill replace any e6isting defined print range' 1) 2ighlight the range of cells that are to comprise the print range. 2) Choose Format < Print 3anges < %efine from the menu bar. The automatic page brea0 lines are then displayed on the screen.
!ou can chec0 the print range by using File < Page Preview in the menu bar* or by clic0ing the Page Preview icon in the /tandard toolbar. Calc ill only display the cells in the print range. !ou can also use the >iew < Page break preview mode to see the print range ithout going to the page pre+ie . /ee JCie ing print rangesK on page 1EA.

,ip

Adding to the print range


,fter defining a print range* you can add more cells to it. This allo s multiple* separate areas of the same sheet to be printed* hile not printing the hole sheet. ,fter you ha+e defined a print range' 1) 2ighlight the range of cells to be added to the print range. 2) Choose Format < Print 3anges < Add from the menu bar. This adds the e6tra cells to the print range. The page brea0 lines display on the screen around this ne addition.

?ote

The additional print range ill print as a separate page* e+en if both ranges are on the same sheet.

3emoving print ranges


It may become necessary to remo+e a user.defined print range* for e6ample if the hole sheet needs to be printed later* or you no longer ish to print some of the added ranges. Choose Format < Print 3anges < 3emove from the menu bar. This remo+es all defined print ranges on the sheet* e6cept those in named ranges. ,fter the print range is remo+ed* the default page brea0 lines ill appear on the screen. To remo+e only certain print ranges* see JDditing a print rangeK belo .

#diting a print range


,t any time* you can directly edit the print range* for e6ample to add to* remo+e* or resiFe part of the print range. Choose Format < Print 3anges < #dit from the menu bar. If you ha+e already selected a print range* the Ddit %rint Hanges dialog loo0s something li0e 5igure 12-. In this e6ample* three rectangles are selected* each separated by a comma. The first is bounded by cell ,3 &g,g3) in the top left and cell C< &gCg<) in the bottom right corner. The others being D12'523 and 22='I2B.

$hapter & Printing= )*porting= and )!mailing

#A%

If only a single range is defined* then clic0ing any here in the te6t entry bo6 sho s the selected print range on the screen* bounded in blue* as sho n in 5igure 12<. To directly add ne cells to the print range' 1) Type a comma in the te6t bo6 as the separator for the ranges. 2) /elect the cell range using the mouse cursor* or directly type in the cell references using the format of the selection already in the te6t bo6. Hemember to separate the cell references ith a colon. To remo+e a print range* select the range in the te6t bo6 and delete it. 4a0e sure the remaining ranges only ha+e a single comma as a separator and that there is not a comma at the end of the se@uence. To resiFe a print range* edit the data in the te6t bo6 for the range.

'igure #9-: )dit a print range

'igure #9.: Print range mar4ed b2 colored bo*N page brea4 lines visible around the selection

>iewing print ranges


7ecause defined print ranges are formatted ith automatic page brea0s* they can be +ie ed by using the %age 7rea0 %re+ie screen* select >iew < Page 7reak Preview from the menu bar.

$hapter & Printing= )*porting= and )!mailing

#A&

igure #38: (he defined print range

igure #3#: (he preview screen for the defined print range. The print ranges are outlined by default ith a blue border* and contain a centered page number in gray. The nonprinting area has a gray bac0ground. To e6it the %age 7rea0 %re+ie screen* select >iew < ?ormal from the menu bar.

Printing rows or columns on every page


If a sheet is printed on multiple pages* you can set up certain ro s or columns to repeat on each printed page. 5or e6ample* if the top t o ro s of the sheet as ell as column , need to be printed on all pages* do the follo ing' 1) Choose Format < Print 3anges < #dit from the menu bar. On the Ddit %rint Hanges dialog* type the ro s in the te6t entry bo6 under 3ows to repeat. 5or e6ample* to repeat ro s 1* 2 and 3* type $1:$3. This automatically changes 3ows to repeat from / none / to / user defined /. 2) To repeat columns* type the columns in the te6t entry bo6 under $olumns to repeat. 5or e6ample* to repeat column ,* type $A. This automatically changes $olumns to repeat from / none / to / user defined /. 3) Clic0 =6.
!ou can also use the mouse to select the ro s or columns to repeat. To do this* clic0 the corresponding te6t entry bo6 and select the desired cell range in the sheet. !ou do not need to select the entire range of the ro s to be repeatedN simply select one cell in each ro .

?ote

$hapter & Printing= )*porting= and )!mailing

#AA

'igure #39: Specif2ing repeating rows Ho s to repeat and Columns to repeat can also be defined as named ranges using the method described belo * but by selecting 3epeat column or 3epeat row* instead of selecting Print range &see 5igure 133). These may then be selected from the list bo6 entries in the Ddit %rint Hanges dialog sho n in 5igure 132.

%efining a named print range


In addition to highlighting a print range for each print Gob* you can define a range of cells to be used repeatedly. This may be useful if different areas of a large spreadsheet need to be printed for different reports. /e+eral named print ranges can be defined to meet this need. 1) To define a named print range* highlight the cells you ant to define as a print range and select nsert < ?ames < %efine from the menu bar* to open the Define #ames dialog &5igure 133). ,lternati+ely the cells can be highlighted after opening the Define #ames dialog. 2) Type a name for the range in the ?ame bo6. ,he name of the range cannot contain any spaces. 3) Ddit or set the cell selection range for the print range in the 3ange bo6 if needed. =) Dnsure %ocument K(lobalL is selected in the /cope bo6.

'igure #33: Define @ames dialog B) Clic0 the plus symbol by 3ange =ptions to sho more choices. /elect the Print range option to define the settings as a print range. Clic0 the Add button to accept the data and close the dialog.

$hapter & Printing= )*porting= and )!mailing

#A-

To select this range to print' 1) Choose Format < Print 3anges < #dit from the menu bar &5igure 12-). The pre+iously defined name no appears in the Print range list bo6. 2) /elect the defined print range and clic0 =6. This method can be useful to @uic0ly change the print range ithout highlighting a large area of cells e+ery time.

%eleting a named print range


To delete a named print range if it is no longer re@uired' 1) /elect nsert < ?ames < 4anage from the menu bar or use $trl5'3. 2) In the 4anage #ames dialog hich opens* select the named range you 3) Clic0 the %elete button. =) Clic0 =6 to close the dialog.

ant to delete.

!ou can clic0 the 3ange =ptions button in the 4anage #ames dialog to confirm that the selected name is a print range before clic0ing %elete.

Page breaks
3hile defining a print range can be a po erful tool* it may sometimes be necessary to manually adGust CalcMs printout. To do this* you can use a manual brea4. , manual brea0 helps to ensure that your data prints properly. !ou can insert a horiFontal page brea0 abo+e* or a +ertical page brea0 to the left of* the acti+e cell.

nserting a page break


To insert a page brea0' 1) #a+igate to the cell here the page brea0 ill begin. 2) /elect nsert < Page 7reak from the menu bar. 3) /elect 3ow 7reak or Column 7reak depending on your need. The brea0 is no set.

&ow brea0
/electing 3ow Brea4 creates a page brea0 abo+e the selected cell. 5or e6ample* if the acti+e cell is 21B* then the brea0 is created bet een ro s 1= and 1B.

Colu(n brea0
/electing $olumn Brea4 creates a page brea0 to the left of the selected cell. 5or e6ample* if the acti+e cell is 21B* then the brea0 is created bet een columns " and 2.

,ip

To see page brea0 lines more easily on screen* you can change their color. Choose ,ools < =ptions < 2ibre=ffice < Appearance and scroll do n to the /preadsheet section.

$hapter & Printing= )*porting= and )!mailing

#A.

%eleting a page break


To remo+e a page brea0' 1) #a+igate to a cell that is ne6t to the brea0 you ant to remo+e. 2) /elect #dit < %elete 4anual 7reak. 3) /elect 3ow 7reak or Column 7reak depending on your need. The brea0 is remo+ed.

3emoving multiple page breaks


4ultiple manual ro and column brea0s can e6ist on the same page. 3hen you ant to remo+e all of them* do as follo s' 1) On the menu bar* select >iew < Page 7reak Preview. 2) Hight.clic0 in the document and select %elete All 4anual 7reaks from the conte6t menu. ,ll manual brea0s are remo+ed. 3) /elect >iew < ?ormal to return to the standard document +ie .

Printing options setup in page styles


/e+eral printing options are set in the page style for sheets. These include the page order* details* and scale to be printed* 7ecause these options are set in the page style* different page styles can be set up to @uic0ly change the print properties of the sheets in the spreadsheet. /ee $hapter " Using St2les and (emplates in $alc for more about page styles. The Sheet tab of the %age /tyle dialog &5igure 13=) pro+ides the follo ing options.

'igure #3". (he Sheet tab of the Page St2le dialog

$hapter & Printing= )*porting= and )!mailing

#-8

Page =rder !ou can set the order in hich pages print. This is especially useful in a large documentN for e6ample* controlling the print order can sa+e time if you ha+e to collate the document a certain ay. 3here a sheet prints to more than one piece of paper* it can be printed either by column* here the first column of pages prints* and then the second column and so on* or by ro as sho n in the graphic on the top right of the dialog in 5igure 13=. Print !ou can specify hich details to print. These details include'

Ho and column headers /heet gridcprints the borders of the cells as a grid Commentscprints the comments defined in your spreadsheet on a separate page* along ith the corresponding cell reference ObGects and graphics Charts Dra ing obGects 5ormulascprints the formulas contained in the cells* instead of the results Tero +aluescprints cells ith a Fero +alue

+cale $se the scale features to control the number of pages the data ill print on.

3educeH#nlarge printoutcscales the data in the printout either larger or smaller. 5or e6ample* if a sheet ould normally print out as four pages &t o high and t o ide)* a scaling of B0d ould print as one page &both idth and height are hal+ed). Fit print rangeKsL on number of pagescdefines e6actly ho many pages the printout ill ta0e up. This option ill only reduce a printoutN it ill not enlarge it. To enlarge a printout* the reduce(enlarge option must be used. Fit print rangeKsL to widthHheightcdefines ho high and ide the printout number of pages. ill be* in

;eaders and footers


2eaders and footers are predefined pieces of te6t that are printed at the top or bottom of a sheet outside of the sheet area. 2eaders are set the same ay as footers. !ou can choose to ha+e different content on left and right pages of the same page style. 2eaders and footers are assigned to a page style. !ou can define more than one page style for a spreadsheet and assign different page styles to different sheets. 5or more about page styles* see Chapter =.

+etting a header or a footer


To set a header or footer' 1) #a+igate to the sheet for hich you ant to set the header or footer. /elect Format < Page from the menu bar. 2) /elect the 2eader &or 5ooter) tab. 3) /elect the ;eader on option. =) 4a0e other selections according to your re@uirements* using the 4ore button to re+eal other options. Clic0 =6.
$hapter & Printing= )*porting= and )!mailing #-#

'igure #3%: +eader dialog !ou can set the margins* the spacing* and height for the header or footer. To automatically adGust the height of the header or footer* select the AutoFit height bo6. !ou can also select to ha+e different content for left and right pages. 4argin Changing the siFe of the left or right margin adGusts ho far the header or footer is from that side of the page. +pacing /pacing affects ho far abo+e or belo the sheet the header or footer ill print. /o* if spacing is set to 1.00U* then there ill be 1 inch bet een the header or footer and the sheet. ;eight 2eight affects ho big the header or footer ill be.

;eader or footer appearance


To change the appearance of the header or footer* clic0 the 4ore button in the dialog. This opens the 7order(7ac0ground dialog. 5rom this dialog you can set the bac0ground and border style of the header or footer. /ee $hapter " Using St2les and (emplates in $alc for more information.

$hapter & Printing= )*porting= and )!mailing

#-9

'igure #3&: +eader 'ooter Border Bac4ground dialog

+etting the contents of the header or footer


The header or footer of a Calc spreadsheet has three columns for te6t. Dach column can be empty or ha+e different contents. To set the contents of the header or footer* clic0 the #dit button in the header or footer dialog sho n in 5igure 13B to display the dialog sho n in 5igure 13E.

'igure #3A: )dit contents of header or footer Areas Dach area in the header or footer is independent and can ha+e different information in it. ;eader !ou can select from se+eral preset choices in the 2eader drop.do n list* or specify a custom header using the buttons belo the area bo6es. &To format a footer* the choices are the same.)
$hapter & Printing= )*porting= and )!mailing #-3

Custom header Clic0 in the area &Left* Center* Hight) that you elements or change te6t attributes. Opens the Te6t ,ttributes dialog. Inserts the 5ile #ame field. Inserts the /heet #ame field. Inserts the current page number. Inserts the total number of pages. Inserts the Date field. Inserts the Time field.

ant to customiFe* then use the buttons to add

#.porting to P%F
Calc can e6port documents to %D5 &%ortable Document 5ormat). This industry.standard file format is ideal for sending the file to someone else to +ie using ,dobe Header or other %D5 +ie ers.

Muick e.port to P%F


Clic0 the #.port %irectly as P%F icon to e6port the entire document using your default %D5 settings. !ou are as0ed to enter the file name and location for the %D5 file* but you do not get a chance to choose a page range* the image compression* or other options.

Controlling P%F content and @uality


5or more control o+er the content and @uality of the resulting %D5* use File < #.port as P%F from the menu bar. The %D5 Options dialog opens. This dialog has fi+e pages &"eneral* Initial Cie * $ser Interface* Lin0s* and /ecurity). /elect the appropriate settings on each page* and then clic0 #.port. !ou are then as0ed to enter the location and file name of the %D5 to be created. Clic0 +ave to e6port the file.

General pa%e of 1*F Options dialo%


On the General page* you can choose hich pages to include in the %D5* the type of compression to use for images & hich affects the @uality of images in the %D5)* and other options. 3ange section All' D6ports the entire document if no print range has been defined or other ise the print range content.

Pages' To e6port a range of pages* use the format '/- &pages 3 to A). To e6port single
pages* use the format 7P0P11 &pages E* <* and 11). !ou can also e6port a combination of page ranges and single pages* by using a format li0e '/-P)P11P1".

Caution

The numbers used abo+e are related to the page numbers and not the sheet numbers in your spreadsheet. To find these page numbers* select all the sheets in your spreadsheet and clic0 the Preview button.

+election' D6ports hate+er content is selected.


$hapter & Printing= )*porting= and )!mailing #-"

'igure #3-: General page of PD' Options dialog mages section 2ossless compression' Images are stored ithout any loss of @uality. Tends to ma0e large files hen used ith photographs.

NP#( compression' ,llo s for +arying degrees of @uality. , setting of <0d or0s ell ith
photographs &small file siFe* little perceptible loss).

3educe image resolution' Lo er D%I &dots per inch) images ha+e lo er @uality. 2igher
D%I settings greatly increase the siFe of the e6ported file. The end.purpose of the file ill dictate the resolution you find acceptable.
D%/ &Dncapsulated %ost/cript) images ith embedded pre+ie s are e6ported only as pre+ie s. D%/ images ithout embedded pre+ie s are e6ported as empty placeholders.

?ote

8atermark section +ign with 8atermark: 3hen this option is selected* a transparent o+erlay of the te6t you enter into the 8atermark ,e.t bo6 ill appear on each page of the %D5 file. (eneral section #mbed =pen%ocument file' This setting enables you to e6port the document as a %D5 file containing t o file formats' .pdf and .odf. In %D5 +ie ers it beha+es li0e a normal .pdf file and it remains fully editable in LibreOffice. /electing this option inhibits the use of the 3ange options and grays them out.

P%FHA/1a' %D5(, is an I/O standard for long.term preser+ation of documents* by


embedding all the information necessary for faithful reproduction &such as fonts) hile forbidding other elements &including forms* security* and encryption). %D5 tags are ritten. If you select %D5(,.1a* the forbidden elements are grayed.out &not a+ailable).

,agged P%F' Tagged %D5 contains information about the structure of the documentMs
contents. This can help to display the document on de+ices ith different screens* and
$hapter & Printing= )*porting= and )!mailing #-%

hen using screen reader soft are. /ome tags that are e6ported are table of contents* hyperlin0s* and controls. This option can increase file siFes significantly.

Create P%F form / +ubmit format: Choose the format for submitting forms from ithin the
%D5 file. This setting o+errides the controlMs $HL property that you set in the document. There is only one common setting +alid for the hole %D5 document' %D5 &sends the hole document)* 5D5 &sends the control contents)* 2T4L* and Q4L. 4ost often you ill choose the %D5 format.

#.port bookmarks: D6ports sheet names in Calc documents as Jboo0mar0sK &a table of
contents list displayed by most %D5 readers* including ,dobe Header).

#.port comments' D6ports comments in Calc documents as %D5 notes. !ou may not
ant this.

#.port automatically inserted blank pages' #ot a+ailable in Calc. #mbed standard fonts: Dnable this option to embed the standard fonts that are installed
on your system and that are used in the document. $se this option if you e6pect to ha+e a better loo0ing or more useful standard font than the font that is a+ailable in the recipients? %D5 reader soft are.

>iew P%F after #.port: 3hen this option is selected* the e6ported %D5 document ill be
opened in a %D5 +ie er.

nitial ;iew pa%e of 1*F Options dialo%


On the 0nitial Hiew page &5igure 13<)* you can choose ho the %D5 opens by default in a %D5 +ie er. The selections are self.e6planatory.

'igure #3.: 0nitial Hiew page of PD' Options dialog

+ser nterface pa%e of 1*F Options dialo%


On the User 0nterface page &5igure 1=0)* you can choose more settings to control ho a %D5 +ie er displays the file. /ome of these choices are particularly useful hen you are creating a %D5 to be used as a presentation or a 0ios0.type display. 8indow options section 3esi5e window to initial page: Causes the %D5 +ie er indo to resiFe to fit the first page of the %D5.

Center window on screen: Causes the %D5 +ie er indo to be centered on the
computer screen.
$hapter & Printing= )*porting= and )!mailing #-&

=pen in full screen mode: Causes the %D5 +ie er to open full.screen instead of in a
smaller bar. indo .

%isplay document title: Causes the %D5 +ie er to display the documentMs title in the title

'igure #"8: User 0nterface page of PD' Options dialog *ser interface options section ;ide menubar: Causes the %D5 +ie er to hide the menu bar.

;ide toolbar: Causes the %D5 +ie er to hide the toolbar. ;ide window controls: Causes the %D5 +ie er to hide other indo controls.
,ransitions #ot a+ailable in Calc. 7ookmarks Only one boo0mar0 le+el &sheet names) is a+ailable in Calc* regardless of the setting selected here.

Lin0s pa%e of 1*F Options dialo%


On this page you can choose ho lin0s are e6ported to %D5.

'igure #"#: Lin4s page of PD' Options dialog #.port bookmarks as named destinations If you ha+e defined 3riter boo0mar0s* Impress or Dra slide names* or Calc sheet names* this option e6ports them as Jnamed destinationsK to hich 3eb pages and %D5 documents can lin0. Convert document references to P%F targets If you ha+e defined lin0s to other documents ith OpenDocument e6tensions &for e6ample* .odt* .ods* and .odp)* this option con+erts the e6tensions of file names to .pdf in the e6ported %D5 document.
$hapter & Printing= )*porting= and )!mailing #-A

#.port *32s relative to file system If you ha+e defined relati+e lin0s in a document* this option e6ports those lin0s to the %D5. Cross/document links Defines the beha+ior of lin0s clic0ed in %D5 files.

!ecurit$ pa%e of 1*F Options dialo%


%D5 e6port includes options to encrypt the %D5 &so it cannot be opened ithout a pass ord) and apply some digital rights management &DH4) features.

3ith an open password set* the %D5 can only be opened ith the pass ord. Once opened*
there are no restrictions on hat the user can do ith the document &for e6ample* print* copy* or change it).

3ith a permissions password set* the %D5 can be opened by anyone* but its permissions
can be restricted. /ee 5igure 1=2. ,fter you set a pass ord for permissions* the other choices on the /ecurity page become a+ailable.

3ith both the open password and permission password set* the %D5 can only be opened
ith the correct pass ord* and its permissions can be restricted.
%ermissions settings are effecti+e only if the userMs %D5 +ie er respects the settings.

?ote

5igure 1=3 sho s the dialog displayed hen you clic0 the +et passwords button on the /ecurity page of the %D5 Options dialog.

'igure #"9: Securit2 page of PD' Options dialog

$hapter & Printing= )*porting= and )!mailing

#--

'igure #"3: Setting a password to encr2pt a PD'

#.porting to other formats


LibreOffice uses the term Je6portK for some file operations in+ol+ing a change of file type. /elect File < +ave As from the menu bar* loo0 in the 'ile t2pe list bo6 in the /a+e ,s dialog for a ide range of file types.

#.porting to O;,42
Calc can e6port spreadsheets to Q2T4L. Choose File < #.port from the menu bar. On the D6port dialog* specify a file name for the e6ported document* then select the Q2T4L in the 'ile format list and clic0 the #.port button.

#/mailing spreadsheets
LibreOffice pro+ides se+eral @uic0 and easy ays to send spreadsheets as an e.mail attachment in one of three formats' OpenDocument /preadsheet &LibreOfficeMs default format)* 4icrosoft D6cel* or %D5. To send the current document in OpenDocument format' 1) Choose File < +end < %ocument as #/mail from the menu bar. LibreOffice opens your default e.mail program ith the spreadsheet &Z.ods) document attached. 2) In your e.mail program* enter the recipient* subGect* and any te6t you ant to add* then send the e.mail. File < +end < #/mail as =pen%ocument +preadsheet has the same result. If you choose #/mail as 4icrosoft #.cel* LibreOffice first creates a file in D6cel format and then opens your e.mail program ith the &Z.6ls) file attached. If you choose #/mail as P%F$ LibreOffice opens the %D5 Options dialog for you to select the parameters you ant* as pre+iously described for e6porting to %D5* clic0ing +end on the dialog then opens your email program ith the %D5 file attached.

#/mailing a spreadsheet to several recipients


To e.mail a document to se+eral recipients* you can use the features in your e.mail program or you can use LibreOffice 3riterMs mail merge facilities to e6tract email addresses from an address boo0. 5or details* see $hapter #8 Printing= )*porting= and )!mailing in the Getting Started guide.

$hapter & Printing= )*porting= and )!mailing

#-.

%igital signing of documents


To sign a document digitally* you need a personal 0ey* also 0no n as a certificate. , personal 0ey is stored on your computer as a combination of a pri+ate 0ey* hich must be 0ept secret* and a public 0ey* hich you add to your documents hen you sign them. !ou can get a certificate from a certification authority* hich may be a pri+ate company or a go+ernmental institution. 3hen you apply a digital signature to a document* a chec0sum is computed from the documentMs content plus your personal 0ey. The chec0sum and your public 0ey are stored together ith the document. 3hen someone later opens the document on any computer ith a recent +ersion of LibreOffice* the program ill compute the chec0sum again and compare it ith the stored chec0sum. If both are the same* the program ill signal that you see the original* unchanged document. In addition* the program can sho you the public 0ey information from the certificate. !ou can compare this 0ey ith the public 0ey that is published on the eb site of the certificate authority. 3hene+er someone changes something in the document* this change brea0s the digital signature. On 3indo s operating systems* the 3indo s features of +alidating a signature are used. On Linu6 systems* files that are supplied by 4oFilla Thunderbird or 5irefo6 are used. 5or a more detailed description of ho to get and manage a certificate* and signature +alidation* see J$sing Digital /ignaturesK in the LibreOffice 2elp. To sign a document' 1) Choose File < %igital +ignatures. 2) If the document contains comments* a arning dialog appears stating this and as0ing if you ish to continue. Clic0 Ies if you ish to continue* or clic0 ?o to e6it and ta0e appropriate action to remo+e them and restart this procedure from step 1. 3) If you ha+e not sa+ed the document since the last change* a message bo6 appears. Clic0 Ies to sa+e the file. If you clic0 ?o* the procedure e6its. =) ,fter sa+ing* you see the Digital /ignatures dialog. Clic0 Add to add a public 0ey to the document. B) In the /elect Certificate dialog* select your certificate and clic0 =6. A) !ou see again the Digital /ignatures dialog* here you can add more certificates if you ant. Clic0 =6 to add the public 0ey to the sa+ed file. , signed document sho s an icon certificate. in the status bar. !ou can double.clic0 the icon to +ie the

3emoving personal data


!ou may ish to ensure that personal data* +ersions* notes* hidden information* or recorded changes are remo+ed from files before you send them to other people or create %D5s from them. In ,ools < =ptions < 2ibre=ffice < +ecurity < =ptions* you can set Calc to remind & arn) you hen files contain certain information and remo+e personal information automatically on sa+ing. To remo+e personal and some other data from a file* go to File < Properties. On the General tab* unchec0 Apply user data and then clic0 the 3eset button. This remo+es any names in the created and modified fields* deletes the modification and printing dates* and resets the editing time to Fero* the creation date to the current date and time* and the +ersion number to 1. To remo+e +ersion information* either go to File < >ersions* select the +ersions from the list and clic0 %elete* or use +ave As and sa+e the file ith a different name.

$hapter & Printing= )*porting= and )!mailing

#.8

$hapter A Using 'ormulas and 'unctions

ntroduction
In pre+ious chapters* e ha+e been entering one of t o basic types of data into each cell' numbers and te6t. 2o e+er* e ill not al ays 0no hat the contents should be. Often the contents of one cell depends on the contents of other cells. To handle this situation* e use a third type of data' the formula. 5ormulas are e@uations using numbers and +ariables to get a result. In a spreadsheet* the +ariables are cell locations that hold the data needed for the e@uation to be completed. , function is a predefined calculation entered in a cell to help you analyFe or manipulate data in a spreadsheet. ,ll you ha+e to do is add the arguments* and the calculation is automatically made for you. 5unctions help you create the formulas needed to get the results that you are loo0ing for.

+etting up a spreadsheet
If you are setting up more than a simple one. or0sheet system in Calc* it is orth planning ahead a little. ,+oid the follo ing traps'

Typing fi6ed +alues into formulas #ot including notes and comments describing hat the system does* including hat input
is re@uired and here the formulas come from &if not created from scratch)

#ot incorporating a system of chec0ing to +erify that the formulas do hat is intended

,he trap of fi.ed values


4any users set up long and comple6 formulas ith fi6ed +alues typed directly into the formula. 5or e6ample* con+ersion from one currency to another re@uires 0no ledge of the current con+ersion rate. If you input a formula in cell C1 of =0.75*B1 &for e6ample to calculate the +alue in Duros of the $/D dollar amount in cell 71)* you ill ha+e to edit the formula hen the e6change rate changes from 0.EB to some other +alue. It is much easier to set up an input cell ith the e6change rate and reference that cell in any formula needing the e6change rate. <hat!if type calculations are also simplified' hat if the e6change rate +aries from 0.EB to 0.E0 or 0.-0> #o formula editing is needed and it is clear hat rate is used in the calculations. 7rea0ing comple6 formulas do n into more manageable parts* described belo * also helps to minimiFe errors and aid troubleshooting.

2ack of documentation
Lac0 of documentation is a +ery common failing. 4any users prepare a simple or0sheet hich then de+elops into something much more complicated o+er time. 3ithout documentation* the original purpose and methodology is often unclear and difficult to decipher. In this case it is usually easier to start again from the beginning* asting the or0 done pre+iously. If you insert comments in cells* and use labels and headings* a spreadsheet can later be modified by you or others and much time and effort ill be sa+ed.

#rror/checking formulas
,dding up columns of data or selections of cells from a or0sheet often results in errors due to omitting cells* rongly specifying a range* or double.counting cells. It is useful to institute chec0s in your spreadsheets. 5or e6ample* set up a spreadsheet to calculate columns of figures* and use /$4 to calculate the indi+idual column totals. !ou can chec0 the result by including &in a non. printing column) a set of ro totals and adding these together. The t o figurescro total and column totalcmust agree. If they do not* you ha+e an error some here.

$hapter A Using 'ormulas and 'unctions

#.9

'igure #"": )rror chec4ing of formulas !ou can e+en set up a formula to calculate the difference bet een the t o totals and report an error in case a non.Fero result is returned &see 5igure 1==).

Creating formulas
!ou can enter formulas in t o ays* either by using the 5unction 3iFard* or by typing directly into the cell or into the input line. , formula must begin ith an Y symbol* so hen typing in directly* you need to start a formula ith one of the follo ing symbols' Y* R or X. Calc automatically adds the Y symbol for the formula* hen starting ith the R or P character. /tarting ith anything else causes the formula to be treated as if it ere te6t.

=perators in formulas
Dach cell on the or0sheet can be used as a data holder or a place for data calculations. Dntering data is accomplished simply by typing in the cell and mo+ing to the ne6t cell or pressing )nter. 3ith formulas* the e@uals sign indicates that the cell ill be used for a calculation. , mathematical calculation li0e 1B R =A can be accomplished as sho n in 5igure 1=B. 3hile the calculation on the left as accomplished in only one cell* the real po er is sho n on the right here the data is placed in cells and the calculation is performed using references bac0 to the cells. In this case* cells 73 and 7= ere the data holders* ith 7B the cell here the calculation as performed. #otice that the formula as sho n as Y73R7=. The plus sign indicates that the contents of cells 73 and 7= are to be added together and then ha+e the result in the cell holding the formula. ,ll formulas build upon this concept. Other ays of using formulas are sho n in Table =. These cell references allo formulas to use data from any here in the or0sheet being or0ed on or from any other or0sheet in the or0boo0 that is opened. If the data needed as in different or0sheets* they ould be referenced by referring to the name of the or0sheet* for e6ample =SUM(Sheet2.B12+Sheet3.A11).

$hapter A Using 'ormulas and 'unctions

#.3

?ote

To enter the Y symbol for a purpose other than creating a formula as described in this chapter* type an apostrophe or single @uotation mar0 before the Y. 5or e6ample* in the entry JO means different things to different people* Calc treats e+erything after the single @uotation mar0cincluding the Y signcas te6t.

!i(ple Calculation in 1 Cell

Calculation b$ &eference

'igure #"%: , simple calculation (able ": $ommon wa2s to use formulas For(ula
Y,1R10 Y,1Z1Ad Y,1Z,2 YHO$#D&,1*1) YD55DCTICD&Bd*12) Y7-./$4&710'71=) Y/$4&7-*/$4&710'71=)) Y/$4&71'710=-BEA)

*escription
Displays the contents of cell ,1 plus 10. Displays 1Ad of the contents of ,1. Displays the result of multiplying the contents of ,1 and ,2. Displays the contents of cell ,1 rounded to one decimal place. Calculates the effecti+e interest for Bd annual nominal interest ith 12 payments a year. Calculates 7- minus the sum of the cells 710 to 71=. Calculates the sum of cells 710 to 71= and adds the +alue to 7-. /ums all numbers in column 7.

$hapter A Using 'ormulas and 'unctions

#."

For(ula
Y,CDH,"D&7lood/ugar) YI5&C31e1=0* U2I"2U* UO8U)

*escription
Displays the a+erage of a named range defined under the name 7lood/ugar. Displays the results of a conditional analysis of data from t o sources. If the contents of C31 is greater than 1=0* then 2I"2 is displayed* other ise O8 is displayed.

?ote

$sers of Lotus 1.2.3* Iuattro %ro and other spreadsheet soft are may be familiar ith formulas that begin ith R* .* Y* &* ;* .* g* or h. , mathematical formula ould loo0 li0e RD2RC2 or R2Z3. 5unctions begin ith the ; symbol such as ;/$4&D2..DE)* ;CO/&;DD"TOH,D&30)) and ;IHH&"$D//*C,/25LO3/). Hanges are identified such as ,1..D3.

5unctions can be identified in Table = by a ord* for e6ample HO$#D* follo ed by parentheses enclosing references or numbers. It is also possible to establish ranges for inclusion by naming them using nsert < ?ames* for e6ample 7lood/ugar representing a range such as 73'710. Logical functions can also be performed as represented by the I5 statement hich results in a conditional response based upon the data in the identified cell* for e6ample =IF(A2>=0,"Pos t ve","!e"#t ve") , +alue of 3 in cell ,2 ould return the result Positive* a +alue of X< the result @egative.

=perator types
!ou can use the follo ing operator types in LibreOffice Calc' arithmetic* comparati+e* te6t* and reference.

)rit"(etic operators
The addition* subtraction* multiplication and di+ision operators return numerical results. The #egation and %ercent operators identify a characteristic of the number found in the cell* for e6ample .3E. The e6ample for D6ponentiation illustrates ho to enter a number that is being multiplied by itself a certain number of times* for e6ample 23 Y 2Z2Z2. (able %: ,rithmetical operators Operator
R &%lus) X &4inus) X &4inus) Z &asteris0) ( &/lash) d &%ercent) i &Caret)

.a(e
,ddition /ubtraction #egation 4ultiplication Di+ision %ercent D6ponentiation

Exa(ple
Y1R1 Y2X1 XB Y2Z2 Y10(B 1Bd 2i3

$hapter A Using 'ormulas and 'unctions

#.%

Co(parative operators
Comparati+e operators are found in formulas that use the I5 function and return either a true or false ans erN for e6ample* =IF(B$>%12, 12&, 0) hich* loosely translated* means if the contents of cell 7A are greater than the contents of cell "12* then return the number 12E* other ise return the number 0. , direct ans er of TH$D or 5,L/D can be obtained by entering a formula such as =B$>B12. If the numbers found in the referenced cells are accurately represented* the ans er TH$D is returned* other ise 5,L/D is returned. (able &: $omparative operators Operator
Y e f eY fY fe

.a(e
D@ual "reater than Less than "reater than or e@ual to Less than or e@ual to Ine@uality

Exa(ple
,1Y71 ,1e71 ,1f71 ,1eY71 ,1fY71 ,1fe71

If cell ,1 contains the numerical +alue = and cell 71 the numerical +alue B* the abo+e e6amples ould yield results of 5,L/D* 5,L/D* TH$D* 5,L/D* TH$D* and TH$D.

/ext operators
It is common for users to place te6t in spreadsheets. To pro+ide for +ariability in hat and ho this type of data is displayed* te6t can be Goined together in pieces coming from different places on the spreadsheet. 5igure 1=A sho s an e6ample.

'igure #"&: (e*t concatenation In this e6ample* specific pieces of the te6t ere found in three different cells. To Goin these segments together* the formula also adds re@uired spaces and punctuation enclosed ithin @uotation mar0s* resulting in a formula of =B2 ' " " ' (2 ' ", " ' )2. The result is the concatenation into a date formatted in a particular se@uence. Calc has a CO#C,TD#,TD function hich performs the same operation.

$hapter A Using 'ormulas and 'unctions

#.&

Ta0ing this e6ample further* if the result cell is defined as a name* then te6t concatenation is performed using this defined name. This process is demonstrated in 5igures 1=E* 1=-* and 1=< here the cell ith the date is named J3iFardDayK and subse@uently used in a formula in another cell.

'igure #"A: Defining a name for a range of cells

$hapter A Using 'ormulas and 'unctions

#.A

'igure #"-: @aming a cell or range of cells for inclusion in a formula The defined name <i1ardDa2 in D2.

Te6t entered into ,=* the formula into ,A.

The result displayed in ,A.

'igure #".: Using @ames in a formula

&eference operators
,n indi+idual cell is identified by the column identifier &letter) located along the top of the columns and a ro identifier &number) found along the left.hand side of the spreadsheet. On spreadsheets read from left to right* the reference for the upper left cell is ,1. Thus in its simplest form a reference refers to a single cell* but references can also refer to a rectangle or cuboid range or a reference in a list of references. To build such references you need reference operators.
$hapter A Using 'ormulas and 'unctions #.-

3ange operator The range operator is ritten as a colon. ,n e6pression using the range operator has the follo ing synta6'
*e+e*e,ce -..e* /e+t 0 *e+e*e,ce /o1e* * "ht The range operator builds a reference to the smallest range including both the cells referenced ith the left reference and the cells referenced ith the right reference.

'igure #%8: 3eference Operator for a range In the upper left corner of 5igure 1B0 the reference ,1'D12 is sho n* corresponding to the cells included in the drag operation ith the mouse to highlight the range. #.amples ,2'7= Heference to a rectangle range ith A cells* 2 column idth j 3 ro height. 3hen you clic0 on the reference in the formula in the input line* a border indicates the rectangle. Heference to a rectangle range ith cell ,2 top left and cell C< bottom right. /o the range contains 2= cells* 3 column idth j ro height. This method of addressing e6tends the initial range from ,2'7= to ,2'C<. Heference to a cuboid range height j 3 sheets depth. ith 2= cells* = column idth j 2 ro

&,2'7=)'C<

/heet1.,3'/heet3.D=

3hen you enter 7=',2 or ,='72 directly* then Calc ill turn it to ,2'7=. /o the left top cell of the range is left of the colon and the bottom right cell is right of the colon. 7ut if you name the cell 7= for e6ample ith 2st#*t and ,2 ith 2e,d* you can use 2st#*t02e,d ithout any error. Calc can not reference a hole column of unspecified length using ,', or a hole ro using 1'1 hich you might be familiar ith in other spreadsheet programs.

3eference concatenation operator The concatenation operator is ritten as a tilde. ,n e6pression using the concatenation operator has the follo ing synta6'
*e+e*e,ce /e+t 3 *e+e*e,ce * "ht The result of such an e6pression is a reference list* hich is an ordered list of references. /ome functions can ta0e a reference list as an argument* /$4* 4,Q or I#DDQ for e6ample.
$hapter A Using 'ormulas and 'unctions #..

The reference concatenation is sometimes called ?union?. 7ut it is not the union of the t o sets ?reference left? and ?reference right? as normally understood in set theory. CO$#T&,1'C3k72'D2) returns 12 &Y<R3)* but it has only 10 cells hen considered as the union of the t o sets of cells. #otice that /$4&,1'C3*72'D2) is different from /$4&,1'C3k72'D2) although they gi+e the same result. The first is a function call ith 2 parameters* each of them is reference to a range. The second is a function call ith 1 parameter* hich is a reference list.

ntersection operator The intersection operator is ritten as an e6clamation mar0. ,n e6pression using the intersection operator has the follo ing synta6'
*e+e*e,ce /e+t 4 *e+e*e,ce * "ht If the references refer to single ranges* the result is a reference to a single range* containing all cells* hich are both in the left reference and in the right reference. If the references are reference lists* then each list item from the left is intersected ith each one from the right and these results are concatenated to a reference list. The order is to first intersect the first item from the left ith all items from the right* then intersect the second item from the left ith all items from the right* and so on. D6amples A20B5 4 B30)$ This results in a reference to the range 73'7=* because these cells are inside ,2'7= and inside 73'D=. (A20B53B10(2) 4 (B20($3(10)3) 5irst the intersections ,2'7=l72'CA* ,2'7=lC1'D3* 71'C2l72'CA and 71'C2lC1'D3 are calculated. This results in 72'7=* empty* 72'C2* and C1'C2. Then these results are concatenated* dropping empty parts. /o the final result is the reference list 72'7= k 72'C2 k C1'C2. !ou can use the intersection operator to refer a cell in a cross tabulation in an understandable ay. If you ha+e columns labeled ?Temperature? and ?%recipitation? and the ro s labeled ?1anuary?* ?5ebruary?* ?4arch?* and so on* then the follo ing e6pression 6Fe7*-#*86 4 69e:.e*#t-*e6 ill reference to the cell containing the temperature in 5ebruary. The intersection operator &l) has a higher precedence than the concatenation operator &k)* but do not rely on precedence.

,ip

,l ays put in parentheses the part that is to be calculated first.

3elative and absolute references


Heferences are the ay that e refer to the location of a particular cell in Calc and can be either relati+e &to the current cell) or absolute &a fi6ed amount).

&elative referencin%
,n e6ample of a relati+e reference ill illustrate the difference bet een a relati+e reference and absolute reference using the spreadsheet from 5igure 1B1. 1) Type the numbers = and 11 into cells C3 and C= respecti+ely of that spreadsheet.

$hapter A Using 'ormulas and 'unctions

988

2) Copy the formula in cell 7B &Y73R7=) to cell CB. !ou can do this by using a simple copy and paste or clic0 and drag 7B to CB as sho n belo . The formula in 7B calculates the sum of +alues in the t o cells 73 and 7=. 3) Clic0 in cell CB. The formula bar sho s YC3RC= rather than Y73R7= and the +alue in CB is 1B* the sum of = and 11 hich are the +alues in C3 and C=. In cell 7B the references to cells 73 and 7= are relati+e references. This means that Calc interprets the formula in 7B* applies it to the cells in the 7 column* and puts the result in the cell holding the formula. 3hen you copied the formula to another cell* the same procedure as used to calculate the +alue to put in that cell. This time the formula in cell CB referred to cells C3 and C=.

'igure #%#: 3elative references !ou can thin0 of a relati+e address as a pair of offsets to the current cell. Cell 71 is 1 column to the left of Cell CB and = ro s abo+e. The address could be ritten as HV.1WCV.=W. In fact earlier spreadsheets allo ed this notation method to be used in formulas. 3hene+er you copy this formula from cell 7B to another cell the result ill al ays be the sum of the t o numbers ta0en from the t o cells one and t o ro s abo+e the cell containing the formula. Helati+e addressing is the default method of referring to addresses in Calc.

)bsolute referencin%
!ou may ant to multiply a column of numbers by a fi6ed amount. , column of figures might sho amounts in $/ Dollars. To con+ert these amounts to Duros it is necessary to multiply each dollar amount by the e6change rate. g$/10.00 ould be multiplied by 0.EB to con+ert to Duros* in this case DurE.B0. The follo ing e6ample sho s ho to input an e6change rate and use that rate to con+ert amounts in a column form $/D to Duros. 1) Input the e6change rate Dur'$/D &0.EB) in cell D1. Dnter amounts &in $/D) into cells D2* D3 and D=* for e6ample 10* 20* and 30. 2) In cell D2 type the formula YD2ZD1. The result is E.B* correctly sho n. 3) Copy the formula in cell D2 to cell D3. The result is 200* clearly rongl Calc has copied the formula using relati+e addressing' the formula in D3 is YD3ZD2 and not hat e ant* hich is YD3ZD1. =) In cell D2 edit the formula to be YD2ZgDg1. Copy it to cells D3 and D=. The results are no 1B and 22.B hich are correct. The g signs before the D and the 1 con+ert the reference to cell D1 from relati+e to absolute or fi6ed. If the formula is copied to another cell the second part ill al ays sho gDg1. The

$hapter A Using 'ormulas and 'unctions

98#

interpretation of this formula is Jta0e the +alue in the cell one column to the left in the same ro and multiply it by the +alue in cell D1K.

Dntering the con+ersion formula into D2* correct result* then copying it to D3.

D3 result is clearly

rong* change the formula in D2 to read absolute reference.

,pplying the correct formula from D2 to D3 to get the correct ans er.

'igure #%9: ,bsolute references Cell references can be sho n in four &eference
D1 gDg1 gD1 Dg1

ays.

Explanation
Helati+e* from cell D3 it is the cell one column to the left and t o ro s abo+e ,bsolute* from cell D3 it is the cell D1 %artially absolute* from cell D3 it is the cell in column D and t o ro s abo+e %artially absolute* from cell D3 it is the cell one column to the left and in ro 1

,ip

To change references in formulas* highlight the cell and press Shift!'" to cycle through the four types of references. This method is of limited +alue in more complicated formulasN it is usually @uic0er to edit the formula by hand.

8no ledge of the use of relati+e and absolute references is essential if you ant to copy and paste formulas and to lin0 spreadsheets.

$hapter A Using 'ormulas and 'unctions

989

=rder of calculation
Order of calculation refers to the se@uence in hich numerical operations are performed. Di+ision and multiplication are performed before addition or subtraction. There is a common tendency to e6pect calculations to be made from left to right as the e@uation ould be read in Dnglish. Calc e+aluates the entire formula* then based upon programming precedence brea0s the formula do n e6ecuting multiplication and di+ision operations before other operations. Therefore* hen creating formulas you should test your formula to ma0e sure that the correct result is being obtained. 5ollo ing is an e6ample of the order of calculation in operation. (able A: Order of $alculation Left /o &i%"t Calculation
1R3Z2R3 Y 11 1R3 Y =* then = Q 2 Y -* then -R3 Y 11 ,nother possible intention could be' 1R3Z2R3 Y 20 1R3 Y =* then 2R3 Y B* then = Q BY20

Ordered Calculation
Y1R3Z2R3 result 10 3Z2 Y A* then 1RAR3 Y 10 The program resol+es the multiplication of 3 Q 2 before dealing ith the numbers being added.

If you intend for the result to be either of the t o possible solutions on the left* the ay to achie+e these results ould be to order the formula as'

&&1R3) Z 2)R3 Y 11 ?ote

&1R3) Z &2R3) Y 20

$se parentheses to group operations in the order you intendN for e6ample* =B5+%12*(5;M12 might become =((B5+%12)*(5);M12.

Calculations linking sheets


,nother po erful feature of Calc is the ability to lin0 data through se+eral or0sheets. The naming of or0sheets can be helpful to identify here specific data may be found. , name such as %ayroll or 7oise /ales is much more meaningful than /heet1. The function named /2DDT&) returns the sheet number &position) in the collection of or0sheets. There may be se+eral or0sheets in each boo0 and they may be numbered from the left' /heet1* /heet2* and so forth. If you drag the or0sheets around to different locations among the tabs* the function returns the number referring to the current position of this or0sheet. In a ne instance of Calc* the default is a single or0sheet. 5or e6ample* if the formula Y/2DDT&) is put into ,1 on /heet 1 it returns the +alue 1. If you drag /heet 1 to be positioned bet een sheets 2 and 3 then the +alue changes to 2* it is no the second sheet in the order. ,n e6ample of calculations obtaining data from other or0 can be seen in a business setting here a business combines re+enues and costs of each of its branch operations into a single combined or0sheet.

$hapter A Using 'ormulas and 'unctions

983

/heet containing data for 7ranch 1.

/heet containing data for 7ranch 2.

$hapter A Using 'ormulas and 'unctions

98"

/heet containing data for 7ranch 3.

/heet containing combined data for all branches.

'igure #%3: $ombining data from several sheets into a single sheet The spreadsheets ha+e been set up ith identical structures. The easiest ay to do this is to open a ne spreadsheet* set up the first 7ranch spreadsheet* input data* format cells* and prepare the formulas for the +arious sums of ro s and columns. 1) On the or0sheet tab* right.clic0 and select 3ename +heet. Type Branch1. Hight.clic0 on the tab again and select 4oveHCopy +heet. 2) In the 4o+e(Copy /heet dialog* select the Copy option &automatically selected if there is only one sheet in the spreadsheet) and select !move to end position! in the 0nsert before indo . Change the entry in ?ew name to 7ranch2. Clic0 =6. Hepeat to produce the 7ranch3 and Combined or0sheets.

$hapter A Using 'ormulas and 'unctions

98%

'igure #%": $op2ing a wor4sheet 3) Dnter the data for 7ranch 2 and 7ranch 3 into the respecti+e sheets. Dach sheet stands alone and reports the results for the indi+idual branches. =) In the Combined or0sheet* clic0 on cell 8E. Type Y* clic0 on the tab 7ranch1* clic0 on cell 8E* press R* repeat for sheets 7ranch2 and 7ranch3 and press Dnter. !ou no ha+e a formula in cell 8E hich adds the re+enue from "reenery /ales for the 3 7ranches.

'igure #%%: $ombined wor4sheet showing lin4ing between branch sheets

$hapter A Using 'ormulas and 'unctions

98&

B) Copy the formula* highlight the range 8E'#1E* clic0 #dit < Paste +pecial* unchec0 the Paste all and Formats bo6es in the /election area of the dialog bo6 and clic0 =6. !ou ill see the follo ing message'

'igure #%&: Lin4ing sheets: pasting a formula to a cell range A) Clic0 Ies. !ou ha+e no copied the formulas into each cell hile maintaining the format you set up in the original or0sheet. Of course* in this e6ample you ould ha+e to tidy the or0sheet up by remo+ing the Feros in the non.formatted ro s.

'igure #%A: Lin4ing Sheets: $op2 Paste Special from DA:@#A


LibreOffice default is to paste all the attributes of the original cell&s) . formats* notes* obGects* te6t strings and numbers.

?ote

The 5unction 3iFard can also be used to accomplish the lin0ing. $se of this 3iFard is described in detail in the section on 5unctions.

*nderstanding functions
Calc includes o+er 3B0 functions to help you analyFe and reference data. 4any of these functions are for use ith numbers* but many others are used ith dates and times* or e+en te6t. , function may be as simple as adding t o numbers together* or finding the a+erage of a list of numbers. ,lternati+ely* it may be as comple6 as calculating the standard de+iation of a sample* or a hyperbolic tangent of a number. Typically* the name of a function is an abbre+iated description of hat the function does. 5or instance* the 5C function gi+es the future +alue of an in+estment* hile 7I#22DQ con+erts a binary
$hapter A Using 'ormulas and 'unctions 98A

number to a he6adecimal number. 7y tradition* functions are entered entirely in upper case letters* although Calc ill read them correctly if they are in lo er or mi6ed case* too. , fe basic functions are some hat similar to operators. D6amples' R Z This operator adds t o numbers together for a result. /$4&) on the other hand adds groups of contiguous ranges of numbers together. This operator multiplies t o numbers together for a result. %HOD$CT&) does the same for multiplying that /$4&) does for adding.

Dach function has a number of arguments used in the calculations. These arguments may or may not ha+e their o n name. !our tas0 is to enter the arguments needed to run the function. In some cases* the arguments ha+e predefined choices* and you may need to refer to the online help or ,ppendi6 7 &Description of 5unctions) in this boo0 to understand them. 4ore often* ho e+er* an argument is a +alue that you enter manually* or one already entered in a cell or range of cells on the spreadsheet. In Calc* you can enter +alues from other cells by typing in their name or range* or cunli0e the case in some spreadsheetscby selecting cells ith the mouse. If the +alues in the cells change* then the result of the function is automatically updated. 5or compatibility* functions and their arguments in Calc ha+e almost identical names to their counterparts in 4icrosoft D6cel. 2o e+er* both D6cel and Calc ha+e functions that the other lac0s. Occasionally* functions ith the same names in Calc and D6cel ha+e different arguments* or slightly different names for the same argumentcneither of hich can be imported to the other. 2o e+er* the maGority of functions can be used in both Calc and D6cel ithout any change. , comparison list may be found on the LibreOffice i0i* lin0ed from the Documentation(%ublications page.

*nderstanding the structure of functions


,ll functions ha+e a similar structure. If you use the right tool for entering a function* you can escape learning this structure* but it is still orth 0no ing for troubleshooting. To gi+e a typical e6ample* the structure of a function to find cells that match entered search criteria is' = )(<U!9 ()#t#7#se,)#t#7#se + e/d,Se#*ch2c* te* #) /ince a function cannot e6ist on its o n* it must al ays be part of a formula. Conse@uently* e+en if the function represents the entire formula* there must be an Y sign at the start of the formula. Hegardless of here in the formula a function is* the function ill start ith its name* such as DCO$#T in the e6ample abo+e. ,fter the name of the function comes its arguments. ,ll arguments are re@uired* unless specifically listed as optional. ,rguments are added ithin the parentheses and are separated by commas* bet een the arguments and the commas. ith no space

4any arguments are numbers. , Calc function can ta0e up to thirty numbers as an argument. That may not sound li0e much at first. 2o e+er* hen you realiFe that the number can be not only a number or a single cell* but also an array or range of cells that contain se+eral or e+en hundreds of cells* then the apparent limitation +anishes. Depending on the nature of the function* arguments may be entered as follo s' Ute6t dataU < U<U ,1 The @uotes indicate te6t or string data is being entered. The number nine is being entered as a number. The number nine is being entered as te6t The address for hate+er is in Cell ,1 is being entered

$hapter A Using 'ormulas and 'unctions

98-

?ested functions
5unctions can also be used as arguments ithin other functions. These are called nested functions. =SUM(2,P=<)U(9(>,&)) To get an idea of hat nested functions can do* imagine that you are designing a self.directed learning module. During the module* students do three @uiFFes* and enter the results in cells ,1* ,2* and ,3. In ,=* you can create a nested formula that begins by a+eraging the results of the @uiFFes ith the formula =A?@=A%@(A10A3). The formula then uses the IF function to gi+e the student feedbac0 that depends upon the a+erage grade on the @uiFFes. The entire formula ould read' =IF(A?@=A%@(A10A3) >A>, "(o,"*#t-/#t o,s4 Bo- #*e *e#d8 to #dv#,ce to the ,ext :od-/e", "F# /ed. P/e#se *ev e1 the :#te* #/ #"# ,. I+ ,ecess#*8, co,t#ct 8o-* ,st*-cto* +o* he/.") Depending on the a+erage* the student ould recei+e the message for either congratulations or failure. #otice that the nested formula for the a+erage does not re@uire its o n e@ual sign. The one at the start of the e@uation is enough for both formulas. If you are ne to spreadsheets* the best ay to thin0 of functions is as a scripting language. 3e?+e used simple e6amples to e6plain the concept more clearly* but* through nesting of functions* a Calc formula can @uic0ly become comple6.

?ote

Calc 0eeps the synta6 of a formula displayed in a tool tip ne6t to the cell as a handy memory aid as you type.

, more reliable method is to use the 'unction List &5igure 1B-). ,+ailable from the nsert menu* the 5unction List automatically doc0s as a pane on the right side of the Calc editing indo . If you ish* you can $ontrol5double!clic4 on a blan0 space at the top of the pane to undoc0 this pane and ma0e it a floating indo . The 5unction List includes a brief description of each function and its argumentsN highlight the function and loo0 at the bottom of the pane to see the description. If necessary* ho+er the cursor o+er the di+ision bet een the list and the descriptionN hen the cursor becomes a t o.headed arro * drag it up ards to increase the space for the description. Double.clic0 on a functionMs name to add it to the current cell* together ith placeholders for each of the functionMs arguments. Clic0ing on the bar here the B dots and arro s are sho n &sho n by the ellipse in 5igure 1B-) ill hide the list on the right hand side of the screen. Clic0ing this area again ill sho the list* ma0ing it easy to 0eep the list a+ailable for easy reference. $sing the 5unction List is almost as fast as manual entry* and has the ad+antage of not re@uiring that you memoriFe a formula that you ant to use. In theory* it should also be less error.prone. In practice* though* some users may fumble hen replacing the placeholders ith +alues. ,nother feature is the ability to display the last formulas used.

$hapter A Using 'ormulas and 'unctions

98.

'igure #%-: 'unction List doc4ed to right side of $alc window

Function 8i5ard
The most commonly used input method is the 'unction <i1ard &5igure 1A0). To open the 5unction 3iFard* choose nsert < Function* or clic0 the f* button on the 5ormula bar* or press $trl5'9. Once open* the 5unction 3iFard pro+ides the same help features as the 5unction List* but adds fields in hich you can see the result of a completed function* as ell as the result of any larger formula of hich it is part. /elect a category of functions to shorten the list* then scroll do n through the named functions and select the re@uired one by double.clic0ing on it. 3hen you select a function its description appears on the right.hand side of the dialog. The 3iFard no displays an area to the right here you can enter data manually in te6t bo6es or clic0 the /hrin0 button to shrin0 the iFard so you can select cells from the or0sheet.

'igure #%.: 'unction <i1ard after shrin4ing

$hapter A Using 'ormulas and 'unctions

9#8

'igure #&8: 'unctions page of 'unction <i1ard. To select cells* either clic0 directly upon the cell or hold do n the left mouse button and drag to select the re@uired area. 3hen the area has been selected* clic0 the +hrink button again to return to the iFard. If multiple arguments are needed select the ne6t te6t bo6 belo the first and repeat the selection process for the ne6t cell or range of cells. Hepeat this process as often as re@uired. The 3iFard ill accept up to 30 ranges or arguments in the /$4 function. Clic0 =6 to accept the function and add it to the cell and get the result.
If you select a function by double.clic0ing it in the list* and then change your mind and select a different one by double.clic0ing again* then the second choice formula is added into the first choice formula in the 5ormula te6t bo6. !ou must clear the formula bo6 and then double.clic0 the function to add it to the bo6. This additi+e facility allo s you to create comple6 formulas by building them up in the 5ormula bo6.

Caution

!ou can also select the Structure tab &5igure 1A1) to see a tree +ie of the parts of the formula. The main ad+antage o+er the 5unction List is that each argument is entered in its o n field* ma0ing it easier to manage. The price of this reliability is slo er input* but this is often a small price to pay* since precision is generally more important than speed hen creating a spreadsheet.
%ressing the dialog ;elp button after selecting certain functions ith either a single. or double.clic0 ill cause LibreOffice to crash. This early bug may be corrected for later releases in the Cersion =.1. series. ,ffected functions are' ,CDH,"DI5N ,CDH,"DI5/N /$4I5/N CO$#TI5/N I5DHHOHN I5#,N QOHN #$47DHC,L$DN /8D3%

Caution

$hapter A Using 'ormulas and 'unctions

9##

'igure #&#: Structure page of 'unction <i1ard 5unctions can be entered into the Input line. ,fter you enter a function on the Input line* press the )nter 0ey or clic0 the Accept button on the 5ormula toolbar to add the function to the cell and get its result.

1 " '

#ame 7o6 sho ing list of common functions 5unction 3iFard & ,ccept Cancel ! Input Line

'igure #&9: (he 'unction toolbar If you see the formula in the cell instead of the result* then 'ormulas are selected for display in ,ools < =ptions < 2ibre=ffice Calc < >iew < %isplay. Deselect 'ormulas* and the result ill display. 2o e+er* you can still see the formula in the Input line.

+trategies for creating formulas and functions


5ormulas that do more than a simple calculation or summation of ro s or columns of +alues usually ta0e a number of arguments. 5or e6ample* the classic e@uation of motion s = s0+ vt C D#t2 calculates the position of a body 0no ing its original position* its final +elocity* its acceleration* and the time ta0en to mo+e from the initial state to the final state. 5or ease of presentation* it is good practice to set up a spreadsheet in a manner similar to that sho n in 5igure 1A3. In this e6ample* the indi+idual +ariables are input into cells on the sheet and no editing of the formula &in cell 7<) is re@uired.

$hapter A Using 'ormulas and 'unctions

9#9

'igure #&3: Setting up a formula with arguments !ou can ta0e se+eral broad approaches hen creating a formula. In deciding hich approach to ta0e* consider ho many other people ill need to use the or0sheets* the life of the or0sheets* and the +ariations that could be encountered in use of the formula. If people other than yourself ill use the spreadsheet* ma0e sure that it is easy to see hat input is re@uired and here. D6planation of the purpose of the spreadsheet* basis of calculation* input re@uired and output&s) generated are often placed on the first or0sheet. , spreadsheet that you build today* ith many complicated formulas* may not be @uite so ob+ious in its function and operation in A or 12 months time. $se comments and notes liberally to document your or0. !ou might be a are that you cannot use negati+e +alues or Fero +alues for a particular argument* but if someone else inputs such a +alue ill your formula be robust or simply return a standard &and often not too helpful) Drr' message> It is a good idea to trap errors using some form of logic statements or ith conditional formatting.

Place a uni@ue formula in each cell


The most basic strategy is to +ie hate+er formulas are needed as simple and ith a limited useful life. The strategy is then to place a uni@ue formula in each appropriate cell. This can be recommended only for +ery simple or Jthro a ayK &single use) spreadsheets.

7reak formulas into parts and combine the parts


The second strategy is similar to the first* but instead you brea0 do n longer formulas into smaller parts and then combine the parts into the hole. 4any e6amples of this type e6ist in comple6 scientific and engineering calculations here interim results are used in a number of places in the or0sheet. The result of calculating the flo +elocity of ater in a pipe may be used in estimating losses due to friction* hether the pipe is flo ing full or partially empty* and in optimiFing the diameter for the gi+en flo regime. In all cases you should adopt the basic principles of formula creation described pre+iously.

$hapter A Using 'ormulas and 'unctions

9#3

*se the 7asic editor to create functions


, third strategy is to use the 7asic editor and create your o n functions and macros. This approach ould be used here the result ould greatly simplify the use of the spreadsheet by the end user and 0eep the formulas simple ith a better chance of a+oiding errors. This approach also can ma0e the maintenance easier by ha+ing corrections or updates 0ept in one central location. The use of macros is described in Chapter 12 of this boo0 and is a specialiFed topic in itself. The danger of o+erusing macros and custom functions is that the principles upon hich the spreadsheet is based become much more difficult to see by a user other than the original author &and sometimes e+en by the authorl).

Finding and fi.ing errors


It is common to find situations here errors are displayed. D+en ith all the tools a+ailable in Calc to help you to enter formulas* ma0ing mista0es is easy. 4any people find inputting numbers difficult and many may ma0e a mista0e about the 0ind of entry that a functionMs argument needs. In addition to correcting errors* you may ant to find the cells used in a formula to change their +alues or to chec0 the ans er. Calc pro+ides three tools for in+estigating formulas and the cells that they reference' error messages* color coding* and the Detecti+e.

#rror messages
The most basic tool is error messages. Drror messages display in a formulaMs cell or in the 5unction 3iFard instead of the result. ,n error message for a formula is usually a three.digit number from B01 to B2E* or sometimes an unhelpful piece of te6t such as h#,4D>* hHD5* or hC,L$D. The error number appears in the cell* and a brief e6planation of the error on the right side of the status bar. 4ost error messages indicate a problem ith ho the formula as input* although se+eral indicate that you ha+e run up against a limitation of either Calc or its current settings. Drror messages are not user.friendly* and may intimidate ne users. 2o e+er* they are +aluable clues to correcting mista0es. !ou can find detailed e6planations of them in the help* by searching for Drror codes in LibreOffice Calc. , fe of the most common are sho n in the follo ing table. h#,4D> hHD5 hC,L$D Instead of displaying Drr'B2B. #o +alid reference e6ists for the argument. Instead of displaying Drr'B2=. The column* ro * or sheet for the referenced cell is missing. Instead of displaying Drr'B1<. The +alue for one of the arguments is not the type that the argument re@uires. The +alue may be entered incorrectlyN for e6ample* double.@uotation mar0s may be missing around the +alue. ,t other times* a cell or range used may ha+e the rong format* such as te6t instead of numbers. Instead of displaying Drr'B32. Di+ision by Fero , calculation results in an o+erflo of the defined +alue range. ,n operator such as an e@uals sign is missing from the formula. , +ariable is missing from the formula.

hDIC0l h#$4l B0< B10

$hapter A Using 'ormulas and 'unctions

9#"

#.amples of common errors


<* ;,=> *ivision b$ -ero
This error is the result of di+iding a number by either the number Fero &0) or a blan0 cell. There is an easy ay to a+oid this type of problem. 3hen you ha+e a Fero or blan0 cell displayed* use a conditional function. 5igure 1A= depicts di+ision of column 7 by column C yielding 2 errors arising from a Fero and a blan0 cell sho ing in column C.

'igure #&": )*amples of PD0H 8Q= Division b2 1ero error It is +ery common to find an error such as this arising from a situation here data as not reported or reported incorrectly. 3hen such an occurrence is possible* an I5 function can be used to display the data correctly. The formula =IF((3>0, B3;(3, "!o =e.o*t") can be entered. The formula is then copied o+er the remainder of Column D. The meaning of this formula roughly ould be' JIf C3 is greater than 0* then compute 73 di+ided by C3* other ise enter L#o HeportMK. It is also possible for the last parameter to use double @uotes for a blan0 &no +alue) to be entered* or a different formula ith a standardiFed number being substituted for the lo er number. ,n e6ample is sho n in 5igure 1AB.

'igure #&%: Division b2 1ero solution

$hapter A Using 'ormulas and 'unctions

9#%

<;)L+E .o result and <&EF ncorrect references


The hCalue error is also +ery common.

'igure #&&: 0ncorrect entr2 causing PH,LU) error , common occurrence of this error arises hen a cell contains an incorrect +alue type. In the e6ample of 5igure 23* te6t J#oneK has been entered in C-* here our formula in column D is e6pecting a number. The hHD5 error is caused by a missing reference. In the e6ample belo * the formula references a sheet hich has been deleted.

Color coding for input


,nother useful tool hen re+ie ing a formula is the color coding for input. 3hen you select a formula that has already been entered* the cells or ranges used for each argument in the formula are outlined in color.

Calc uses eight colors for outlining referenced cells* starting ith blue for the first cell* and continuing ith red* magenta* green* dar0 blue* bro n* purple and yello before cycling through the se@uence again.

$hapter A Using 'ormulas and 'unctions

9#&

,he %etective
In a long or complicated spreadsheet* color coding becomes less useful. In these cases* consider using the submenu under ,ools < %etective. The Detecti+e is a tool for chec0ing hich cells are used as arguments by a formula &precedents) and hich other formulas it is nested in &dependents)* and trac0ing errors. It can also be used for tracing errors* mar0ing in+alid data &that is* information in cells that is not in the proper format for a functionMs argument)* or e+en for remo+ing precedents and dependents. To use the Detecti+e* select a cell ith a formula* then start the Detecti+e. On the spreadsheet* you ill see lines ending in circles to indicate precedents* and lines ending in arro s for dependents. The lines sho the flo of information. $se the Detecti+e to assist in follo ing the precedents referred to in a formula in a cell. 7y tracing these precedents* you fre@uently can find the source of the errors. %lace the cursor in the cell in @uestion and then choose ,ools < %etective < ,race Precedents from the menu bar or press Shift5'A. 5igure 1AE sho s a simple e6ample of tracing precedents. This allo s us to chec0 the source cells & hich may be a range) for any errors hich ha+e caused us to @uery the calculation result. If a source is a range* then that range is highlighted in blue. In other instances e may ha+e to trace an error. 5or this e use the Trace Drror function* found under ,ools < %etective < ,race #rror, to find the cells that caused the error.

a7 $ell containing formula selected. 'igure #&A: (racing precedents using the Detective

$hapter A Using 'ormulas and 'unctions

9#A

b7 0nitiate trace b2 clic4ing (race Precedents

c7 Source cells indicated with blue dots= with arrow pointing to the calculation cell 6continued7: (racing precedents using the Detective

#.amples of functions
5or no+ices* functions are one of the most intimidating features of LibreOffice?s Calc. #e users @uic0ly learn that functions are an important feature of spreadsheets* but there are hundreds* and many re@uire input that assumes specialiFed 0no ledge. 5ortunately* Calc includes doFens of functions that anyone can use.

$hapter A Using 'ormulas and 'unctions

9#-

7asic arithmetic and statistics


The most basic functions create formulas for basic arithmetic or for e+aluating numbers in a range of cells.

:asic arit"(etic
The simple arithmetic functions are addition* subtraction* multiplication* and di+ision. D6cept for subtraction* each of these operations has its o n function'

/$4 for addition %HOD$CT for multiplication I$OTID#T for di+ision


Traditionally* subtraction does not ha+e a function. /$4* %HOD$CT* and I$OTID#T are useful for entering ranges of cells in the same ay as any other function* ith arguments in brac0ets after the function name. 2o e+er* for basic e@uations* many users prefer the time.honored computer symbols for these operations* using the plus sign &R) for addition* the hyphen &X) for subtraction* the asteris0 &Z) for multiplication and the for ard slash &() for di+ision. These symbols are @uic0 to enter ithout re@uiring your hands to stray from the 0eyboard. , similar choice is also a+ailable if you ant to raise a number by the po er of another. Instead of entering Y%O3DH&,1*2)* you can enter Y,1i2. 4oreo+er* they ha+e the ad+antage that you enter formulas ith them in an order that more closely appro6imates human readable format than the spreadsheet.readable format used by the e@ui+alent function. 5or instance* instead of entering Y/$4 &,1',2)* or possibly Y/$4 &,1*,2)* you enter Y,1R,2. This almost.human readable format is especially useful for compound operations* here riting Y,1Z&,2R,3) is briefer and easier to read than Y%HOD$CT&,1*/$4&,2',3)). The main disad+antage of using arithmetical operators is that you cannot directly use a range of cells. In other ords* to enter the e@ui+alent of Y/$4 &,1',3)* you ould need to type Y,1R,2R,3. Other ise* hether you use a function or an operator is largely up to youce6cept* of course* hen you are subtracting. 2o e+er* if you use spreadsheets regularly in a group setting such as a class or an office* you might ant to standardiFe on an entry format so that e+eryone ho handles a spreadsheet becomes accustomed to a standard input.

!i(ple statistics
,nother common use for spreadsheet functions is to pull useful information out of a list* such as a series of test scores in a class* or a summary of earnings per @uarter for a company. !ou can* of course* scan a list of figures if you ant basic information such as the highest or lo est entry or the a+erage. The only trouble is* the longer the list* the more time you aste and the more li0ely you are to miss hat you are loo0ing for. Instead* it is usually @uic0er and more efficient to enter a function. /uch reasons e6plain the e6istence of a function li0e CO$#T* hich does no more than gi+e the total number of entries in the designated cell range. /imilarly* to find the highest or lo est entry* you can use 4I# or 4,Q. 5or each of these formulas* all arguments are either a range of cells* or a series of cells entered indi+idually. Dach also has a related function* 4I#, or 4,Q,* hich performs the same function* but also treats a cell formatted for te6t as ha+ing a +alue of 0 &The same treatment of te6t occurs in any +ariation of another function that adds an U,U to the end). Dither function gi+es the same result* and

$hapter A Using 'ormulas and 'unctions

9#.

could be useful if you used a te6t notation to indicate* for e6ample* if any student ere absent hen a test as ritten* and you anted to chec0 hether you needed to schedule a ma0eup e6am. 5or more fle6ibility in similar operations* you could use L,H"D or /4,LL* both of hich add a specialiFed argument of ran0. If the ran0 is 1 used ith L,H"D* you get the same result as you ould ith 4,Q. 2o e+er* if the ran0 is 2* then the result is the second largest result. /imilarly* a ran0 of 2 used ith /4,LL gi+es you the second smallest number. 7oth L,H"D and /4,LL are handy as a permanent control* since* by changing the ran0 argument* you can @uic0ly scan multiple results. !ou ould need to be an e6pert to ant to find the %oisson Distribution of a sample* or to find the s0e or negati+e binomial of a distribution &and* if you are* you ill find functions in Calc for such things). 2o e+er* for the rest of us* there are simpler statistical functions that you can @uic0ly learn to use. In particular* if you need an a+erage* you ha+e a number of functions to choose from. !ou can find the arithmetical meancthat is* the result hen you add all entries in a list then di+ided by the number of entries* by entering a range of numbers hen using ,CDH,"D* or ,CDH,"D , to include te6t entries and to gi+e them a +alue of Fero. In addition* you can get other information about the data set'

4DDI,#' The entry that is e6actly half ay bet een the highest and lo est number in a
list.

4ODD' The most common entry in a list of numbers. I$,HTILD' The entry at a set position in the array of numbers. 7esides the cell range* you
enter the type of Iuartile' 0 for the lo est entry* 1 for the +alue of 2Bd* 2 for the +alue of B0d* 3 for EBd* and = for the highest entry. #ote that the result for types 1 through 3 may not represent an actual item entered.

H,#8' The position of a gi+en entry in the entire list* measured either from top to bottom or
bottom to top. !ou need to enter the cell address for the entry* the range of entries* and the type of ran0 &1 for the ran0 from the highest* or 1 for the ran0 from the bottom. /ome of these functions o+erlapN for e6ample* 4I# and 4,Q are both co+ered by I$,HTILD. In other cases* a custom sort or filter might gi+e much the same result. 3hich you use depends on your temperament and your needs. /ome might prefer to use 4I# and 4,Q because they are easy to remember* hile others might prefer I$,HTILD because it is more +ersatile.

+sin% t"ese functions


In some cases* you may be able to get similar results to some of these functions by setting up a filter or a custom sort. 2o e+er* in general* functions are more easily adGusted than filters or sorts* and pro+ide a ide range of possibilities. ,t times* you may Gust ant to enter one or more formulas temporarily in a con+enient blan0 cell* and delete it once you ha+e finished. 2o e+er* if you find yourself using the same functions constantly* you should consider creating a template and including space for all the functions you use* ith the cell to their left used as a label for them. Once you ha+e created the template* you can easily update each formula as entries change* either automatically and on.the.fly or pressing the '. 0ey to update all selected cells. #o matter ho you use these functions* you ill probably find them simple to use and adaptable for many purposes. 7y the time you ha+e mastered this handful* you ill be ready to try more comple6 functions.

$hapter A Using 'ormulas and 'unctions

998

3ounding off numbers


5or statistical and mathematical purposes* Calc includes a +ariety of ays to round off numbers. If you are a programmer* you may also be familiar ith some of these methods. 2o e+er* you do not need to be a specialist to find some of these methods useful. !ou may ant to round off for billing purposes* or because decimal places do not translate ell into the physical orldcfor instance* if the parts you need come in pac0ages of 100* then the fact you only need AA is irrele+ant to youN you need to round up for ordering. 7y learning the options for rounding up or do n* you can ma0e your spreadsheets more immediately useful. 3hen you use a rounding function* you ha+e t o choices about ho to set up your formulas. If you choose* you can nest a calculation ithin one of the rounding functions. 5or instance* the formula YHO$#D&&/$4&,1*,2)) adds the figures in cells ,1 and ,2* then rounds them off to the nearest hole number. 2o e+er* e+en though you do not need to or0 ith e6act figures e+ery day* you may still ant to refer to them occasionally. If that is the case* then you are probably better off separating the t o functions* placing Y/$4&,1*,2) in cell ,3* and YHO$#D &,3) in ,=* and clearly labeling each function.

&oundin% (et"ods
The most basic function for rounding numbers in Calc is HO$#D. This function ill round off a number according to the usual rules of symmetric arithmetic rounding' a decimal +alue of .= or less gets rounded do n* hile one of .B or more gets rounded up. 2o e+er* at times* you may not ant to follo these rules. 5or instance* if you are one of those contractors ho bills a full hour for any fraction of an hour you or0* you ould ant to al ays round up so you did not lose any money. Con+ersely* you might choose to round do n to gi+e a slight discount to a long.established customer. In these cases* you might prefer to use HO$#D$% or HO$#DDO3#* hich* as their names suggest* round a number to the nearest integer abo+e or belo it. ,ll three of these functions re@uire the single argument of numbercthe cell or number to be rounded. $sed ith only this argument* all three functions round to the nearest hole number* so that =A.B ould round to =E ith HO$#D or HO$#D$% and =A ith HO$#DDO3#. 2o e+er* if you use the optional count argument* you can specify the number of decimal places to include. 5or instance* if number as set to 1* then =-.AB ould round to =-.E ith HO$#D or HO$#D$% and to =-.A ith HO$#DDO3#. ,s an alternati+e to HO$#DDO3# hen or0ing ith decimals* you can use TH$#C &short for truncate). It ta0es e6actly the same arguments as HO$#DDO3#* so hich function you use is a matter of choice. If you are not or0ing ith decimals* you might choose to use I#T &short for integer)* hich ta0es only the number argument. ,nother option is the ODD and DCD# pair of functions. ODD rounds up to the nearest odd number if hat is entered in the number argument is a positi+e number* and rounds do n if it is a negati+e number* hile DCD# does the same for an e+en number. 5urther options are the CDILI#" and 5LOOH functions. ,s you can guess from the names* CDILI#" rounds up and 5LOOH rounds do n. 5or both functions* the number that they round to is determined by the closest multiple of the number that you enter as the significance argument hich is abo+e or belo the +alue being tested. 5or instance* if your business insurance is billed by the or0 ee0* the fact that you ere only open three days one ee0 ould be irrele+ant to your costsN you ould still be charged for an entire ee0* and therefore might ant to use CDILI#" in your monthly e6penses. If cell D1 contains the +alue =A.E* YCDILI#"&D1*E) ill return the +alue =<* this being the closest multiple of E abo+e the +alue. Con+ersely* if you are building customiFed computers and completed =.B in a day* your client ould only be interested in the number ready to ship* so you might use 5LOOH in a report of your progress.
$hapter A Using 'ormulas and 'unctions 99#

If cell D1 contains the +alue =A.E* Y5LOOH&D1*E) multiple of E belo the +alue.

ill return the +alue =2* this being the closest

7esides number and significance* both CDILI#" and 5LOOH include an optional argument called mode* hich ta0es a +alue of 0 or 1. If mode is set to 0* and both the number and the significance are negati+e numbers* then the result of either function is rounded upN if it is set to 1* and both the number and the significance are negati+e numbers* then the results are rounded do n. In other ords* if the number is .11 and the significance is .B* then the result is .10 hen the mode is set to 0* but .1B hen set to 1. 2o e+er* if you are e6changing spreadsheets bet een Calc and 4/ D6cel* remember that the mode argument is not supported by D6cel. If you ant the ans ers to be consistent bet een the t o spreadsheets* lea+e the optional mode argument out of your formulas. , function some hat similar to CDILI#" and 5LOOH is 4HO$#D. Li0e CDILI#" ,#D 5LOOH* 4HO$#D re@uires t o arguments* although* some hat confusingly* the second one is called multiple rather than significance* e+en though the t o are identical. The difference bet een 4HO$#D and CDILI#" and 5LOOH is that 4HO$#D rounds up or do n using symmetric arithmetic rounding. 5or e6ample* if the number is EE and the multiple is B* then 4HO$#D gi+es a result of EB. 2o e+er* if the multiple is changed to E* then the result of 4HO$#D becomes EE. Once you become familiar ith CalcMs long* undifferentiated list of functions* you can start to decide hich is most useful for your purposes. 2o e+er* one last point is orth mentioning' If you are or0ing ith more than t o decimal places* do not be surprised if you do not see the same number of decimal places on the spreadsheet in unformatted cells* as you do on the function iFard. If you do not* the reason may be that ,ools < =ptions < 2ibre=ffice Calc < Calculate < 2imit decimals for general number format has been enabled and the default changed from 0. Dither deselect this option to return it to the default setting* or change the number of decimal places* and* if necessary* unchec0 the Precision as shown bo6 on the same page* and the spreadsheet ill display as e6pected.

*sing regular e.pressions in functions


, number of functions in Calc allo the use of regular e6pressions' /$4I5* CO$#TI5* 4,TC2* /D,HC2* LOO8$%* 2LOO8$%* CLOO8$%* DCO$#T* DCO$#T,* D/$4* D%HOD$CT* D4,Q* D4I#* D,CDH,"D* D/TDDC* D/TDDC%* DC,H* DC,H%* D"DT. 3hether or not regular e6pressions are used is selected on the ,ools < =ptions < 2ibre=ffice Calc < Calculate dialog. It is enabled in a default installation.

$hapter A Using 'ormulas and 'unctions

999

'igure #&-: Default settings for $alculate page 5or e6ample YCO$#TI5&,1',A*Ur.dU) ith #nable regular e.pressions in formulas selected ill count cells in ,1',A hich contain red and 3OD. ,dditionally if +earch criteria Q and R< must apply to whole cells is not selected* then 'red* bride* and 3idge ill also be counted. If that setting is selected* then it can be o+ercome by rapping the e6pression thus' YCO$#TI5&,1',A*U.Zr.d.ZU).

'igure #&.: Using the $OU@(0' function Hegular e6pression searches within functions are al ays case insensiti+e* irrespecti+e of the setting of the Case sensitive chec0bo6 on the dialog in 5igure 1A-cso red and 3OD ill al ays be matched in the abo+e e6ample. This case.insensiti+ity also applies to the regular e6pression structures &V'lo er'W) and &V'upper'W)* hich match characters irrespecti+e of case. Hegular e6pressions ill not or0 in simple comparisons. 5or e6ample' ,1YUr.dU ill al ays return 5,L/D if ,1 contains red* e+en if regular e6pressions are enabled. It ill only return TH$D if ,1 contains r.d &r then a dot then d). If you ish to test using regular e6pressions* try the CO$#TI5 function' CO$#TI5&,1*Ur.dU) ill return 1 or 0* interpreted as TH$D or 5,L/D in formulas li0e YI5&CO$#TI5&,1*Ur.dU)*UhoorayU*UbooU).

$hapter A Using 'ormulas and 'unctions

993

,cti+ating the #nable regular e.pressions in formulas option means all the abo+e functions ill re@uire any regular e6pression special characters &such as parentheses) used in strings ithin formulas* to be preceded by a bac0slash* despite not being part of a regular e6pression. These bac0slashes ill need to be remo+ed if the setting is later deacti+ated.

Advanced functions
,s is common ith other spreadsheet programs* LibreOffice Calc can be enhanced by user. defined functions or add.ins. /etting up user.defined functions can be done either by using the 7asic IDD or by riting separate add.ins or e6tensions. The basics of riting and running macros is co+ered in Chapter 12* Calc 4acros. 4acros can be lin0ed to menus or toolbars for ease of operation or stored in template modules to ma0e the functions a+ailable in other documents. Calc ,dd.ins are specialiFed office e6tensions hich can e6tend the functionality of LibreOffice ith ne built.in Calc functions. 3riting ,dd.ins re@uires 0no ledge of the CRR language* the LibreOffice /D8* and is for e6perienced programmers. , number of e6tensions for Calc ha+e been ritten and these can be found on the e6tensions site at http'((e6tensions.libreoffice.org(. Hefer to Chapter 1=* /etting up and CustomiFing Calc* for more details.

$hapter A Using 'ormulas and 'unctions

99"

$hapter Using Pivot (ables

ntroduction
4any re@uests for spreadsheet support are the result of using complicated formulas and solutions to sol+e simple day.to.day problems. 4ore efficient and effecti+e solutions use the %i+ot Table* a tool for combining* comparing* and analyFing large amounts of data easily. $sing %i+ot Tables* you can +ie different summaries of the source data* display the details of areas of interest* and create reports* hether you are a beginner or an intermediate or ad+anced user.

%atabase preconditions
The first thing needed to or0 ith the %i+ot Table is a list of ra data* similar to a database table* consisting of ro s &data sets) and columns &data fields). The field names are in the first ro abo+e the list. The data source could be an e6ternal file or database. 5or the simplest case* here data is contained in a Calc spreadsheet* Calc offers sorting functions that do not re@uire the %i+ot Table. 5or processing data in lists* the program needs to 0no here in the spreadsheet the table is. The table can be any here in the sheet* in any position. , spreadsheet can contains se+eral unrelated tables. Calc recogniFes your lists automatically. It uses the follo ing logic' /tarting from the cell you ha+e selected & hich must be ithin the list)* Calc chec0s the surrounding cells in all = directions &left* right* abo+e* belo ). The border is recogniFed if the program disco+ers an empty ro or column* or if it hits the left or upper border of the spreadsheet. This means that the described functions can only or0 correctly if there are no empty ro s or columns in your list. ,+oid empty lines &for e6ample for formatting). !ou can format your list by using cell formats.

3ule

#o empty ro s or empty columns are allo ed ithin lists.

If you select more than one single cell before you start sorting* filtering* or calling the %i+ot Table* then the automatic list recognition is s itched off. Calc assumes that the list matches e6actly the cells you ha+e selected.

3ule

5or sorting* filtering* or using the %i+ot Table* al ays select only one cell.

, relati+ely common source of errors is to inad+ertently declare a list by mista0e and then to sort that list. If you select multiple cellscfor e6ample* a hole columncthen the sorting mi6es up the data that should be together in one ro . In addition to these formal aspects* the logical structure of your table is also +ery important.

3ule

Calc lists must ha+e the normal formN that is* they must ha+e a simple linear structure.

3hen entering the data* do not add outlines* groups* or summaries. 2ere are some mista0es commonly made by ine6perienced spreadsheet users' 1) !ou made se+eral unnecessary sheetsN for e6ample* a sheet for each group of articles. In this case* analyses are then possible only ithin each group. 2) In a /ales list* instead of only one column for the amount* you made a column for the amounts for each employee. In this case* the system ill ha+e difficulty grouping data from the +arious columns together. Thus* an analysis ith the %i+ot Table ould no longer be

$hapter - Using Pivot (ables

99&

possible. ,ll data must be entered into the same column for the %i+ot Table to be able to analyFe it. 3) !ou entered the amounts in chronological order. ,t the end of each month* you made a sum total. In this case* sorting the list for different criteria is not possible because the %i+ot Table ill treat the sum totals the same as any other figure. "etting monthly results is one of the +ery fast and easy features of the %i+ot Table.

%ata sources
,t this time* the possible data sources for the %i+ot Table are a Calc spreadsheet or an e6ternal data source that is registered in LibreOffice.

Calc spreads"eet
,nalyFing a list in a Calc spreadsheet is the simplest and most often used case. Lists might be updated regularly* or the data might be imported from a different application. The beha+ior of Calc hile inserting data from a different application depends on the format of the data. If the data is in a common spreadsheet format* it is copied directly into Calc. 2o e+er* if the data is in plain te6t format* the Te6t Import dialog &5igure 1E1) appears after you select the file containing the dataN see Chapter 1* Introducing Calc* for more more information about this dialog.

'igure #A8: (e*t 0mport dialog Calc is able to import data from a huge number of foreign data formats* such as other spreadsheets &D6cel* Lotus 1* 2* 3)N from databases &li0e d7ase)N and from simple te6t files* including C/C formats. 2o e+er* in Calc* imported foreign data ill not update automatically if changes are made to the source file. In LibreOffice Calc* you can use up to 1*0=-*BEA ro s.

$hapter - Using Pivot (ables

99A

&e%istered data source


, registered data source is a connection to data held in a database outside of LibreOffice. 3hen using a registered data source* the data to be analyFed ill not be sa+ed in CalcN Calc al ays uses the data from the original source. Calc is able to use many different data sources in addition to databases that are created and maintained ith LibreOffice 7ase. 5or more information* see Chapter 10* Lin0ing Calc Data.

Creating a Pivot ,able


Create the %i+ot Table using %ata < Pivot ,able < Create from the menu bar. If the list to be analyFed is in a spreadsheet table* select only one cell ithin this list. Calc recogniFes and selects the list automatically for use ith the %i+ot Table &5igure 1E1).

'igure #A#: Selecting the source data for the Pivot (able

,he Pivot ,able dialog


The function of the %i+ot Table is managed in t o places' first* in the %i+ot Table dialog* and second* through manipulations of the result in the spreadsheet. This section describes the dialog in detail.

7asic layout
In the %i+ot Table dialog &5igure 1E2) are four hite areas that sho the layout of the result. 7eside these hite areas are buttons ith the names of the fields in your data source. To choose a layout* drag and drop the field buttons into the hite areas. The Data 'ields area in the middle must contain at least one field. ,d+anced users can use more than one field here. 5or the Data 5ield an aggregate function is used. 5or e6ample* if you mo+e the sales field into the Data 'ields area* it appears there as +um A sales.

$hapter - Using Pivot (ables

99-

'igure #A9: Pivot (able dialog 3ow 'ields and $olumn 'ields indicate from hich groups the result ill be sorted. Often more than one field is used at a time to get partial sums for ro s or columns. The order of the fields gi+es the order of the sums from o+erall to specific. 5or e6ample* if you drag region and employee into the 3ow 'ields area* the sum ill be di+ided into the employees. 3ithin the employees ill be the listing for the different regions &see 5igure 1E3).

'igure #A3: Pivot (able field order for anal2sis= and resulting la2out in pivot table 5ields that are placed into the Page 'ields area appear in the result abo+e as a drop do n list. The summary in your result ta0es only that part of your base data into account that you ha+e selected. 5or e6ample* if you use employee as a %age 5ield* you can filter the result sho n for each employee. To remo+e a field from the hite layout area* Gust drag it past the border and drop it &the cursor change to a crossed symbol)* or select it and clic0 the 3emove button. ill

4ore options
To e6pand the %i+ot Table dialog and sho more options* clic0 4ore.

$hapter - Using Pivot (ables

99.

'igure #A": )*panded dialog of the Pivot (able +election from /ho s the sheet name and the range of cells used for the %i+ot Table. 3esults to 3esults to defines here your result ill be sho n. /etting 3esults to as A undefined A and then entering a cell reference tells the %i+ot Table here to sho the results.1 ,n error dialog is displayed if you fail to enter a cell reference. /electing 3esults to as / new sheet A adds a ne sheet to the spreadsheet file and places the results there. The ne sheet is named using the format Pivot ,ableSsheetnameSON here Q is the number of the table created* 1 for first* 2 for second and so on. 5or the source sho n in 5igure 3* the ne sheet for the first table produced ould be named Pivot ,ableSsheetnameS1. Dach ne sheet is inserted ne6t to the source sheet. gnore empty rows If the source data is not in the recommended form* this option tells the %i+ot Table to ignore empty ro s. dentify categories 3ith this option selected* if the source data has missing entries in a list and does not meet the recommended data structure &see 5igure 1EB)* the %i+ot Table adds it to the listed category abo+e it. If this option is not chosen* then the %i+ot Table inserts 6empt27 &see 5igure 1EE).

'igure #A%: )*ample of data with missing entries in $olumn , The option 0dentif2 categories ensures that in this e6ample ro s 3 and = are included for the product ,pples and that ro A is included for Pears &see 5igure 1EA).

'igure #A&: Pivot (able result with 0dentif2 categories selected


1 In this case the ord ! undefined E is misleading because the output position is in fact defined.

$hapter - Using Pivot (ables

938

3ithout category recognition* the %i+ot Table sho s an 6empt27 category &5igure 1EE).

'igure #AA: Pivot (able result without 0dentif2 categories selected Logically* the beha+ior ith category recognition is better. , list sho ing missing entries is also less useful* because you cannot use functions such as sorting or filtering. ,otal columns$ ,otal rows 3ith these options you can decide if the %i+ot Table sho s an e6tra ro ith the sums of each column* or if it adds on the +ery right a column ith the sums of each ro . In some cases* an added total sum is meaningless* for e6ample if your entries are accumulated or the result of comparisons. Add filter $se this option to add or hide the cell labeled Filter abo+e the %i+ot Table results. This cell is a con+enient button for additional filtering options ithin the %i+ot Table. #nable drill to details 3ith this option enabled* if you double.clic0 on a single data cell* including a cell produced from (otal columns or (otal rows* in the %i+ot Table result* a ne sheet opens gi+ing a detailed listing of the indi+idual entry. If you double.clic0 on a cell in either the Ho 5ields or the Column 5ields* then the Show Detail dialog open &see JDrilling &sho ing details)K on page 2=2). Ta0ing 5igure 1E3 as an e6ample* if a pi+ot table uses more than one field &region and employee) and you double.clic0 a left.most field &say* east)* then this collapses the ro * combining the totals for employees for that field and displaying the totals for east. If this function is disabled* the double.clic0 ill 0eep its usual edit function ithin a spreadsheet.

4ore settings for the fields: Field options


The options discussed in the pre+ious section are +alid for the %i+ot Table in general. !ou can also change settings for e+ery field that you ha+e added to the %i+ot Table layout. To do this*either select a field and clic0 on the =ptions button in the %i+ot Table dialog* or double.clic0 on the appropriate field. The options a+ailable for fields hen put into the Data 5ields differ from those hen put into the Ho * Column* and %age 5ields of the %i+ot Table.

Options for *ata Fields


In the Options dialog of a Data 5ield* you can select the /um function to accumulate the +alues from your data source. 3hile you ill often use the sum function* other functions &li0e standard distribution or a counting function) are also a+ailable. 5or e6ample* the counting function can be useful for non.numerical data fields. On the Data 5ield dialog* clic0 4ore to see the Displa2ed value section.

$hapter - Using Pivot (ables

93#

'igure #A-: )*panded dialog for a Data 'ield In the Displa2ed value section* you can choose other possibilities for analysis by using the aggregate function. Depending on the setting for ,ype* you may ha+e to choose definitions for 7ase field and 7ase item.

'igure #A.: )*ample choices for Base field and item The table belo lists the possible types of displayed +alue and associated base field and item* together ith a note on usage. /$pe
#ormal

:ase field
c

:ase ite(
c

)nal$sis
/imple use of the chosen aggregate function &for e6ample* sum). The result is the difference bet een the result of the 7ase field and the 7ase item &for e6ample* sales +olume of the employees against the sales +olume of 7rigitteN see 5igure 1-0).

Difference from

/election of a field from the data source of the %i+ot Table &for e6ample* employee).

/election of an element from the selected base field &for e6ample* 7rigitte)

$hapter - Using Pivot (ables

939

/$pe
d of

:ase field
/election of a field from the data source of the %i+ot Table &for e6ample* employee) /election of a field from the data source of the %i+ot Table &for e6ample* employee)

:ase ite(
/election of an element from the selected base field &for e6ample* 7rigitte)

)nal$sis
The result is a percentage ratio of the +alue of the base field to the base item &for e6ample* sales result of the employee relati+e to the sales result of 7rigitteN see 5igure 1-1). 5rom each result* its reference +alue is subtracted* and the difference is di+ided by the reference +alue &for e6ample* sales of the employees as relati+e difference from the sales of 7rigitteN see 5igure 1-2). Dach result is added to the sum of the results for preceding items in the base field* in the base fieldMs sort order* and the total sum is sho n. Hesults are al ays summed* e+en if a different summary function as used to get each result.

d difference from

/election of an element from the selected base field &for e6ample. 7rigitte)

Hunning total in

/election of a field from the data source of the %i+ot Table &for e6ample* date)

d of ro

The result is a percentage of the +alue of the hole ro &for e6ample* the ro sum). The result is a percentage of the total column +alue &for e6ample* the column sum). The result is a percentage of the o+erall result &for e6ample* the total sum). &Default result 6 total result) ( &ro total 6 column total)

d of column d of total

Inde6

'igure #-8: Original Pivot (able 6top7 and a *ifference fro( e*ample 6below7

$hapter - Using Pivot (ables

933

'igure #-#: )*ample of a ? of anal2sis

'igure #-9: )*ample of ? difference fro( anal2sis

Options for &ow and Colu(n Fields


In the Options dialog for the Ho or Column 5ields* you can choose to sho subtotals for each category. /ubtotals are deacti+ated by default. /ubtotals are useful only if the +alues in one ro or column field can be di+ided into subtotals for another &sub)field. /ome e6amples are sho n in the ne6t three figures.

'igure #-3: @o subdivision with onl2 one row or column field

'igure #-": Division of the regions for emplo2ees 6two row fields7 without subtotals

$hapter - Using Pivot (ables

93"

'igure #-%: Division of the regions for emplo2ees with subtotals 6b2 region7 To calculate subtotals that can also be used for the data fields &see abo+e)* select the Automatic option in the /ubtotals section of the Data 5ield dialog. !ou can choose the type of subtotal to use by selecting *ser/defined and then clic0ing the type of subtotal you ant to calculate from the list. 5unctions are only a+ailable hen User!defined is selected.

'igure #-&: Preferences dialog of a row or column field

$hapter - Using Pivot (ables

93%

#ormally* the %i+ot Table does not sho a ro or column for categories that ha+e no entries in the underlying database. 7y choosing the +how items with no data option* you can force this. 5or illustration purposes* the data as manipulated in such a ay that the employee 7rigitte has no sales +alues for the category golfing.

'igure #-A: Default setting

'igure #--: Setting RShow 0tems with no dataS

Options for 1a%e Fields


The Options dialog for %age 5ields is the same as for Ho and Column fields* e+en though it appears to be useless to ha+e the same settings as described for the Ho and Column fields. 3ith the fle6ibility of the %i+ot Table* you can s itch the different fields bet een pages* columns* or ro s. The fields 0eep the settings that you made for them. The %age 5ield has the same properties as a Ho or Column field. These settings only ta0e effect hen you use the field not as a %age 5ield but as Ho or Column field.

8orking with the results of the Pivot ,able


,s mentioned abo+e* the %i+ot Table dialog is +ery fle6ible. , %i+ot Table can be totally restructured ith only a fe mouse clic0s. /ome functions of the %i+ot Table dialog can only be used ith the %i+ot Table.

Changing the layout


The layout of the %i+ot Table can be changed @uic0ly and easily by using drag.and.drop. 3ith the %i+ot Table open* fields can be dragged around from ro * column* page and the Data 5ields areas to any position you ant to put them* and then dropped. $nused fields can also be added* and fields remo+ed in error can be replaced by dragging and dropping them into the positions re@uired. /ome manipulation can also be carried out in the pi+ot table +ie . 3ithin the results table of the %i+ot Table* mo+e one of the page* column* or ro fields to a different position. The cursor ill change shape from its starting shape &horiFontal or +ertical bloc0 on the arro head) to the opposite if mo+ing to a different field* such as from ro to column* and it is O8 to drop.
$hapter - Using Pivot (ables 93&

'igure #-.: Drag a column field. @ote the cursor shape

'igure #.8: Drag a row field. @ote the cursor shape

!ou can remo+e a column* ro * or page field from the %i+ot Table by clic0ing on it and dragging it out of the table. The cursor changes to that sho n in 5igure 1<1. , field remo+ed in error cannot be reco+ered* and it is necessary to return to the %i+ot Table to replace it.

'igure #.#: 'ield dragged out of the Pivot (able

(rouping rows or columns


5or many analyses or summaries* the categories ha+e to be grouped. !ou can merge the results in classes. !ou can only carry out grouping on an ungrouped %i+ot Table. !ou can access grouping by selecting %ata < (roup and =utline < (roup from the menu bar* or by pressing '#9 after selecting the correct cell area. The type of +alues that ha+e to be grouped is hat mainly determines ho the grouping function or0s. !ou need to distinguish bet een scalar +alues* or other +alues* such as te6t* that you ant grouped.
7efore you can group* you ha+e to produce a %i+ot Table ith ungrouped data. The time needed for creating a %i+ot Table depends mostly on the number of columns and ro s and not on the siFe of the basic data. Through grouping you can produce the %i+ot Table ith a small number of ro s and columns. The %i+ot Table can contain a lot of categories* depending on your data source.

?ote

(rouping of categories with scalar values


5or grouping scalar +alues* select a single cell in the ro or column of the category to be grouped. Choose %ata < (roup and =utline < (roup from the menu bar or press '#9N you get the "rouping dialog sho n in 5igure 1<2. !ou can define in hich +alue range &start(end) the grouping should ta0e place. The default setting is the hole range* from the smallest to the largest +alue. In the field Group b2= you can enter the class siFe* also 0no n as the inter+al siFe &in the e6ample sho n in 5igures 1<3 and 1<=* groups of 10 0m(h each).

$hapter - Using Pivot (ables

93A

'igure #.9: Grouping dialog with scalar categories

'igure #.": Pivot (able with grouping 6classes of #8 4m h each7 'igure #.3: Pivot (able without grouping 6freKuenc2 of the 4m h values of a radar control7

(rouping without automatic creation of intervals


Categories containing te6t fields cannot create inter+als. !ou can define for each field &for e6ample* Department) hich +alues you ant to put together in one group. 3ith more than one cell selected* choose %ata < (roup and =utline < (roup from the menu bar* or press '#9* to group those cells. /ee 5igures 1<B and 1<A. 5or grouping of non.scalar categories* select in the result of the %i+ot Table all the indi+idual field +alues that you ant to put in the one group.

,ip

!ou can select se+eral non.contiguous cells in one step by pressing and holding the $ontrol 0ey hile left.clic0ing ith the mouse.

"i+en the input data sho n in 5igure 1<B* e6ecute the %i+ot Table ith Department in the Ho 5ield and /um &/ic0 Days) in the Data 5ield. The output should loo0 li0e that in 5igure 1<A. 3ith the mouse* select the Departments ,ccounting* %urchasing and /ales.

$hapter - Using Pivot (ables

93-

'igure #.%: Database with non!scalar categories 6departments7

'igure #.&: Pivot (able with non!scalar categories

Choose the %ata < (roup and =utline < (roup from the 4enu bar or press '#9. The output should no loo0 li0e that in 5igure 1<E. Hepeat this for all groups that you ant to create from the different categories &/elect ,ssembly* %roduction and 3arehouse and "roup again. The output should loo0 li0e 5igure 1<-.

'igure #.A: Summar2 of single categories in one group

'igure #.-: Grouping finished

!ou can change the default names for the groups and the ne ly created group field by editing the name in the input field &for e6ample changing ?Group9? to ?(echnical?). The %i+ot Table ill remember these settings* e+en if you change the layout later on. 5or the follo ing pictures* the dialog as called again &right.clic0* #dit 2ayout) and by selecting the icon J%epartment "K* then =ptions* and finally from the preferences menu Automatic as selected. This generated the partial sum results sho n in 5igure 1<<. Double clic0ing (roup 1 and ,echnical collapses the entries* as sho n in 5igure 200.

'igure 988: 3educed to the new groups

'igure #..: 3enamed groups and partial results

$hapter - Using Pivot (ables

93.

?ote

, ell.structured database ma0es manual sorting ithin the %i+ot Table obsolete. In the e6ample sho n* you could add another column ith the name Department* that has the correct entry for each person based on hether the employeeMs department belongs to the group Office or Technical. The mapping for this &1'n relationship) can be done easily ith the CLOO8$% function from Calc.

+orting the result


The result of any %i+ot Table is sorted &categories) in columns and ro s in ascending order. !ou can change the sorting in three ays'

/elect sort order from drop.do n menus on each column heading. /ort manually by using drag and drop. /ort automatically by choosing the options in the preferences dialog of the ro or column
field.

!elect sort order fro( drop'down (enus on eac" colu(n "eadin%


The simplest ay to sort entries is to clic0 the arro on the right side of the heading and chec0 the bo6&es) for the desired sort order. The custom sorting dialog is sho n in 5igure 202. ,dditional options e6ist to sho all* show onl2 the current item* or hide onl2 the current item. Once sorting has been carried out using the drop.do n list* the color of the arro changes and a small s@uare of matching color is added to the bottom right of the arro button.

'igure 98#: ,rrow color change and indicator sKuare on button

'igure 989: $ustom sorting

$hapter - Using Pivot (ables

9"8

!ort (anuall$ b$ usin% dra% and drop


!ou can change the order ithin the categories by mo+ing the cells ith the category +alues in the result table of the %i+ot Table. The cell ill be inserted abo+e the cell on hich you drop it. 7e a are that in Calc* a cell must be selected. It is not enough that the cursor is in the cell. The bac0ground of a selected cell is mar0ed ith a different color. To select se+eral cells* clic0 in one cell ith no e6tra 0ey pressed* then press the Shift or $trl 0ey hile clic0ing in other cells. ,nother possibility is to 0eep the mouse button pressed on the cell you ant to select* mo+e the mouse to a neighbor cell* and then mo+e bac0 to the original cell before you release the mouse button.

!ort auto(aticall$
To sort automatically* right.clic0 ithin the %i+ot Table and choose #dit 2ayout. This ill open the %i+ot Table &5igure 1E2). 3ithin the Layout area of the %i+ot Table* double.clic0 the ro or column field you ant to sort. In the Data 5ield dialog hich opens &5igure 1-A)* clic0 =ptions to display the Data 5ield Options dialog. 5or Sort b2* choose either ,scending or Descending. On the left side is a drop.do n list here you can choose the field this setting should apply to. 3ith this method* you can specify that sorting does not happen according to the categories but according to the results of the data field.

'igure 983: Options for a row or column field

$hapter - Using Pivot (ables

9"#

%rilling Kshowing detailsL


Drill allo s you to sho the related detailed data for a single* compressed +alue in the %i+ot Table result. To acti+ate a drill* double.clic0 on the cell or choose %ata < (roup and =utline < +how %etails. There are t o possibilities' 1) The acti+e cell is a ro or column field. In this case* drill means an additional brea0do n into the categories of another field. 5or e6ample* double.clic0 on the cell ith the +alue golfing. In this instance the +alues that are aggregated ithin golfing can be subdi+ided using another field.

'igure 98": Before the drill down for the categor2 golfing , dialog appears allo ing you to select the field to use for further subdi+ision. In this e6ample* employee.

'igure 98%: Selecting the field for the subdivision

'igure 98&: ,fter the drill down To hide the details again* double.clic0 on the cell golfing or choose %ata < (roup and =utline < ;ide %etails.

$hapter - Using Pivot (ables

9"9

The %i+ot Table remembers your selection &in our e6ample the field employee) by adding and hiding the selected field* so that for the ne6t drill do n for a category in the field category the dialog does not appear. To remo+e the selection employee* open the %i+ot Table dialog by right.clic0ing and choosing #dit 2ayout* then delete the un anted selection in the ro or column field. 2) The acti+e cell is a +alue of the Data 5ield. In this case* drill do n results in a listing of all data entries of the data source that aggregates to this +alue. In our e6ample* if e ere to double.clic0 on the cell ith the +alue g1-*E=1 from 5igure 20=* e ould no ha+e a ne list of all data sets that are included in this +alue. This list is displayed in a ne sheet.

'igure 98A: @ew table sheet after the drill down for a value in a data field

Filtering
To limit the %i+ot Table analysis to a subset of the information that is contained in the data basis* you can filter ith the %i+ot Table.

?ote

,n ,utofilter or default filter used on the sheet has no effect on the %i+ot Table analysis process. The %i+ot Table al ays uses the complete list that as selected hen it as started.

To do this* clic0 Filter on the top left side abo+e the results.

'igure 98-: 'ilter field in the upper left area of the Pivot (able In the 5ilter dialog* you can define up to 3 filter options that are used in the same ay as CalcMs default filter.

?ote

D+en if they are not called a filter* page fields are a practical ay to filter the results. The ad+antage is that the filtering criteria used are clearly +isible.

$hapter - Using Pivot (ables

9"3

'igure 98.: Dialog for defining the filter

*pdating KrefreshingL changed values


,fter you ha+e created the %i+ot Table* changes in the source data do not cause an automatic update in the resulting table. !ou must update &refresh) the %i+ot Table manually after changing any of the underlying data +alues. Changes in the source data could appear in t o ays' 1) The content of e6isting data sets has been changed. 5or e6ample* you might ha+e changed a sales +alue after ard. To update the %i+ot Table* right.clic0 in the result area and choose 3efresh &or choose %ata < Pivot ,able < 3efresh from the menu bar). 2) !ou ha+e added or deleted data sets in the original list. In this case the change means that the %i+ot Table has to use a different area of the spreadsheet for its analysis. 5undamental changes to the data set collection means you must redo the %i+ot Table from the beginning.

Cell formatting
The cells in the results area of the %i+ot Table are automatically formatted in a simple format by Calc. !ou can change this formatting using all the tools in Calc* but note that if you ma0e any change in the design of the %i+ot Table or any updates* the formatting ill return to the format applied automatically by Calc. 5or the number format in the data field* Calc uses the number format that is used in the corresponding cell in the source list. In most cases* this is useful &for e6ample* if the +alues are in the currency format* then the corresponding cell in the result area is also formatted as currency). 2o e+er* if the result is a fraction or a percentage* the %i+ot Table does not recogniFe that this might be a problemN such results must either be ithout a unit or be displayed as a percentage. ,lthough you can correct the number format manually* the correction stays in effect only until the ne6t update.

*sing shortcuts
If you use the %i+ot Table +ery often* you might find the fre@uent use of the menu paths &%ata < Pivot ,able < Create and %ata < (roup and =utline < (roup) incon+enient. 5or grouping* a shortcut is already defined' '#9. 5or starting the %i+ot Table* you can define your o n 0eyboard shortcut. If you prefer to ha+e toolbar icons instead of 0eyboard shortcuts* you can create a user.defined symbol and add it to either your o n custom made toolbar or the /tandard toolbar. 5or an e6planation ho to create 0eyboard shortcuts or add icons to toolbars* see Chapter 1=* /etting $p and CustomiFing Calc.

$hapter - Using Pivot (ables

9""

*sing Pivot ,able results elsewhere


,he problem
#ormally* you create a reference to a +alue by entering the address of the cell that contains the +alue. 5or e6ample* the formula =($*2 creates a reference to cell C- and returns the doubled +alue. If this cell is located in the results area of the %i+ot Table* it contains the result that as calculated by referencing specific categories of the ro and column fields. In 5igure 210* the cell C- contains the sum of the sales +alues of the employee 2ans in the category /ailing. The formula in the cell C1" uses this +alue.

'igure 9#8: 'ormula reference to a cell of the Pivot (able If the underlying data or the layout of the %i+ot Table changes* then you must ta0e into account that the sales +alue for 2ans might appear in a different cell. !our formula still references the cell Cand therefore uses a rong +alue. The correct +alue is in a different location. 5or e6ample* in 5igure 211* the location is no C7.

'igure 9##: (he value that 2ou reall2 want to use can be found now in a different location.

$hapter - Using Pivot (ables

9"%

,he solution: Function (#,P >=,%A,A


$se the function "DT%ICOTD,T, to ha+e a reference to a +alue inside the %i+ot Table by using the specific identifying categories for this +alue. This function can be used ith formulas in Calc if you ant to reuse the results from the %i+ot Table else here in your spreadsheet.

!$ntax
The synta6 has t o +ariations' %@9PI?<9)A9A(t#*"et + e/d, P vot 9#7/e, E F e/d ,#:e ; @/e:e,t, ... F) %@9PI?<9)A9A(P vot 9#7/e, s.ec + c#t o,)

First s$ntax variation


The target field specifies hich data field of the %i+ot Table is used ithin the function. If your %i+ot Table has only one data field* this entry is ignored* but you must enter it any ay. If your %i+ot Table has more than one data field* then you ha+e to enter the field name from the underlying data source &for e6ample JsalesK) or the field name of the data field itself &for e6ample Jsum X salesK). The argument Pivot ,able specifies the %i+ot Table that you ant to use. It is possible that your document contains more than one %i+ot Table. Dnter here a cell reference that is inside the area of your %i+ot Table. It might be a good idea to al ays use the upper left corner cell of your %i+ot Table* so you can be sure that the cell ill al ays be ithin your %i+ot Table* e+en if the layout changes. D6ample' %@9PI?<9)A9A("s#/es",A1) If you enter only the first t o arguments* then the function returns the total result of the %i+ot Table &J/um X salesK entered as the field* ill return a +alue of =0-*EAB). !ou can add more arguments as pairs ith field name and item to retrie+e specific partial sums. In the e6ample in 5igure 210* here e ant to get the partial sum of 2ans for sailing* the formula in cell C1" ould loo0 li0e this' =%@9PI?<9)A9A("s#/es",A1,"e:./o8ee","G#,s","c#te"o*8","s# / ,"")

'igure 9#9: 'irst s2nta* variation

$hapter - Using Pivot (ables

9"&

!econd s$ntax variation


The argument Pivot ,able has to be gi+en in the same ay as for the first synta6 +ariation. 5or the specifications* enter a list separated by spaces to specify the +alue you ant from the %i+ot Table. This list must contain the name of the data field* if there is more than one data fieldN other ise it is not re@uired. To select a specific partial result* add more entries in the form of F e/d ,#:eE te:F. In the e6ample in 5igure 210* here e ant to get the partial sum of 2ans for /ailing* the formula in cell C1" ould loo0 li0e this' =%@9PI?<9)A9A(A1,"s#/es e:./o8eeEG#,sF c#te"o*8Es# / ,"F")

'igure 9#3: Second s2nta* variation 3hen or0ing ith data sets containing date information* you must ta0e care if you use the date information in the "DT%ICOTD,T, function. The function ill only recogniFe the date entry if it is entered into the formula in e6actly the same ay that it appears in the data set from hich the pi+ot table is produced. In the e6ample of 5igure 21=* an error is returned hen the date format does not match that of the data. Only ith the correct format is the result returned.

'igure 9#": )rror produced if date information is not entered correctl2

Caution

7y using "DT%ICOTD,T, function ith the second synta6 +ariation* not that hich is used in the 5unction 3iFard* the function can return a hHD5 error. 7ug E123=

$hapter - Using Pivot (ables

9"A

$hapter . Data ,nal2sis


Using Scenarios= Goal See4= Solver= others

ntroduction
Once you are familiar ith functions and formulas* the ne6t step is to learn ho to use CalcMs automated processes to perform useful analysis of your data @uic0ly. Calc includes se+eral tools to help you manipulate the information in your spreadsheets* ranging from features for copying and reusing data* to creating subtotals automatically* to +arying information to help you find the ans ers you need. These tools are di+ided bet een the Tools and Data menus. If you are a ne comer to spreadsheets* these tools can be o+er helming at first. 2o e+er* they become simpler if you remember that they all depend on input from either a cell or a range of cells that contain the data ith hich you are or0ing. !ou can al ays enter the cells or range manually* but in many cases it is easier to select the cells ith the mouse. Clic0 the /hrin0(4a6imiFe icon beside a field to temporarily reduce the siFe of the toolMs indo * so you can see the spreadsheet underneath and select the cells re@uired. /ometimes* you may ha+e to e6periment to find out hich data goes into hich field* but then you can set a selection of options* many of hich can be ignored in any gi+en case. 1ust 0eep the basic purpose of each tool in mind* and you should ha+e little trouble ith CalcMs function tools. !ou donMt need to learn them* especially if your spreadsheet use is simple* but as your manipulation of data becomes more sophisticated* they can sa+e time in ma0ing calculations* especially as you start to deal ith hypothetical situations. 1ust as importantly* they can allo you to preser+e your or0 and to share it ith other peoplecor yourself at a later session. One function tool not mentioned here is %i+ot Table* but it is a topic that is sufficiently comple6 that it re@uires a separate chapter' see Chapter - in this boo0.

Consolidating data
%ata < Consolidate pro+ides a ay to combine data from t o or more ranges of cells into a ne range hile running one of se+eral functions &such as /um or ,+erage) on the data. During consolidation* the contents of cells from se+eral sheets can be combined into one place. The effect is that copies of the identified ranges are stac0ed ith their top left corners at the specified result position* and the selected operation is used in each cell to calculate the result +alue. 1) Open the document containing the cell ranges to be consolidated. 2) Choose %ata < Consolidate to open the Consolidate dialog. 5igure 21B sho s this dialog after ma0ing the changes described belo . 3) The +ource data range list contains any e6isting named ranges &created using %ata < %efine 3ange) so you can @uic0ly select one to consolidate ith other areas. If the source range is not named* clic0 in the field to the right of the drop.do n list and either type a reference for the first source data range or use the mouse to select the range on the sheet. &!ou may need to mo+e the Consolidate dialog or clic0 on the /hrin0 icon to reach the re@uired cells.) =) Clic0 Add. The selected range is added to the $onsolidation ranges list. B) /elect additional ranges and clic0 Add after each selection. A) /pecify here you ant to display the result by selecting a target range from the Copy results to drop.do n list. If the target range is not named* clic0 in the field ne6t to Copy results to and enter the reference of the target range or select the range using the mouse or position the cursor in the top left cell of the target range. $op2 results to ta0es only the first cell of the target range instead of the entire range as is the case for Source data range.

$hapter . Data ,nal2sis

9%8

'igure 9#%: Defining the data to be consolidated E) /elect a function from the 5unction list. This specifies ho the +alues of the consolidation ranges ill be calculated. The default setting is /um* hich adds the corresponding cell +alues of the /ource data range and gi+es the result in the target range. 4ost of the a+ailable functions are statistical &such as ,+erage* 4in* 4a6* /tde+)* and the tool is most useful hen you are or0ing ith the same data o+er and o+er. -) ,t this point you can clic0 4ore in the Consolidate dialog to access the follo ing additional settings'

In the Options section* select 2ink to source data to insert the formulas that generate the results into the target range* rather than the actual results. If you lin0 the data* any +alues modified in the source range are automatically updated in the target range.
The corresponding cell references in the target range are inserted in consecuti+e ro s* hich are automatically ordered and then hidden from +ie . Only the final result* based on the selected function* is displayed.

Caution

In the $onsolidate b2 section* select either 3ow labels or $olumn labels if the cells of the source data range are not to be consolidated corresponding to the identical position of the cell in the range* but instead according to a matching ro label or column label. To consolidate by ro labels or column labels* the label must be contained in the selected source ranges. The te6t in the labels must be identical* so that ro s or columns can be accurately matched. If the ro or column label of one source data range does not match any that e6ist in other source data ranges* it is added to the target range as a ne ro or column.

<) Clic0 =6 to consolidate the ranges.

,ip

If you are continually or0ing ith the same range* then you probably ant to use Data e Define Hange to gi+e it a name.

The consolidation ranges and target range are sa+ed as part of the document. If you later open a document in hich consolidation has been defined* this data is still a+ailable.
$hapter . Data ,nal2sis 9%#

Creating subtotals
/ubtotals are implemented in t o ays'

The /$7TOT,L function %ata < +ubtotals from the menu bar.

*sing the +*7,=,A2 function


/$7TOT,L is listed under the 4athematical category hen you use the 5unction 3iFard & nsert < Function or press $trl5'9). This function is a relati+ely limited method for generating a subtotal. To obtain a subtotal for our sales information for the employee 7rigitte* e must first implement an ,uto5ilter on the data &%ata < Filter < AutoFilter). This displays the selection arro s to the right of each column headerN select 7rigitte in the Dmployee field as sho n in 5igure 21A.

'igure 9#&: ,uto'ilter applied and Brigitte selected in the )mplo2ee column 1) /elect the location for the subtotal to be displayed by clic0ing in the chosen cell. 2) /elect nsert < Function from the 4enu bar* or clic0 the 5unction 3iFard button on the 5unction 7ar* or press $trl5'9 to open the 5unction 3iFard. 3) /elect /$7TOT,L from the function list in the 5unction 3iFard dialog and clic0 ?e.t<< at the bottom of the dialog. =) Dnter the re@uired information into the t o input bo6es as sho n in 5igure 21E. The range is selected from the filtered data* and the function is selected from the list of a+ailable possible functions as sho n in the 2elp file e6tract of 5igure 21-. In our e6ample e select the sales figures &column 7) and e re@uire the sum total &function inde6 <). B) Clic0 =6 to return the summed +alues of 7rigitteMs sales &5igure 21<).
$hapter . Data ,nal2sis 9%9

'igure 9#A: )nter the information into the two input bo*es

'igure 9#-: 'unction inde*es for available functions

'igure 9#.: SUB(O(,L result for BrigitteJs sales


$hapter . Data ,nal2sis 9%3

!ou ill appreciate that this is a tedious and time consuming e6ercise for a sales report if you ant to subtotal for more than a couple of categories.

*sing %ata < +ubtotals


, more comprehensi+e solution is to create subtotals using %ata < +ubtotals from the 4enu bar* hich opens the /ubtotals dialog. /ubtotal creates totals for data arranged in an arraycthat is* a group of cells ith labels for columns. $sing the /ubtotals dialog* you can select up to three arrays* then choose a statistical function to apply to them. 3hen you clic0 =6* Calc adds subtotal and grand total ro s to the selected arrays* using the Hesult and Hesult2 cell styles to differentiate those entries. 7y default* matching items throughout your array ill be gathered together as a single group abo+e a subtotal. To insert subtotal +alues into a sheet' 1) Dnsure that the columns ha+e labels & e ill use our sales data e6ample again). 2) /elect* or clic0 in a single cell in the range of cells that you ant to calculate subtotals for* and then choose %ata < +ubtotals. 3) In the /ubtotals dialog &5igure 220)* in the (roup by list* select the column by hich the subtotals need to be grouped. , subtotal ill be calculated for each distinct +alue in this column. =) In the Calculate subtotals for bo6* select the columns containing the +alues that you ant to create subtotals for. If the contents of the selected columns change later* the subtotals are automatically recalculated. B) In the *se function bo6* select the function that you ant to use to calculate the subtotals. A) !ou can create a further t o (roup by subtotals using the 2nd "roup and 3rd "roup tabs and repeating steps 3 to B. E) Clic0 =6.

'igure 998: Setting up subtotals , partial +ie of the results using our e6ample data is sho n in 5igure 221. /ubtotals for /ales by Dmployee and Category ere used Calc inserts* to the left of the ro numbering labels* an outline area that graphically represents the structure of the subtotals. #umber 1 represents the highest le+el of grouping* the "rand Total. #umbers 2 to = sho reducing grouping le+els* ith number = sho ing indi+idual entries. The number of le+els depends on the number of groupings in the subtotals.
$hapter . Data ,nal2sis 9%"

'igure 99#: Subtotals are calculated for each emplo2ee 6partial view7 using the 1st Group and @nd Group Clic0ing on a number at the top of the column shrin0s the structure of that element of the subtotal. 5or column 1* this changes the minus button in the column to one ith a plus symbol* indicating that it is e6pandable. 5or column 2 and others ith content* each element of the column shrin0s* and each button changes to a plus. 5or our e6ample subtotal displayed in 5igure 221* the structure hich is displayed is Column 1 is the Grand (otal* column 2 is the )mplo2ee subtotal* and column 3 is the $ategor2 subtotal. 5or column 2* and for others if you ha+e more groups* you can also clic0 each indi+idual minus button to shrin0 only that subtotal. If you clic0 on the numbered button at the top* you must then clic0 on the resultant plus buttons to e6pand the structure again &see 5igure 222). /hrin0ing any element* temporarily hides any element contained in a column to its right. In 5igure 222 Indi+idual entries are hidden by shrin0ing the Category subtotals for 7rigitte. To turn off outlines* select %ata < (roup and =utline < 3emove from the 4enu bar. /elect Auto=utline to reinstate the outlines.

'igure 999: $lic4 the plus buttons to e*pand the elements again
$hapter . Data ,nal2sis 9%%

5urther choices are a+ailable in the Options page of the /ubtotals dialog. In the Groups section'

/electing Page break between groups inserts a ne page after each group of subtotaled
data.

/electing Case sensitive recalculates subtotals hen you change the case of a data label. /electing the %re.sort area according to groups option sorts the area that you selected in
the (roup by bo6 of the "roup tabs according to the columns that you selected. In the Sort section'

/electing Ascending or %escending* sorts beginning ith the lo est or the highest +alue.
!ou can define the sort rules on %ata < +ort < =ptions.

/electing nclude formats option gi+es consideration to the formatting attributes hen
sorting.

/electing Custom sort order sorts according to one of the predefined custom sorts defined
in ,ools < =ptions < 2ibre=ffice Calc < +ort 2ists.

'igure 993: $hoosing options for subtotals

*sing Twhat ifU scenarios


The /cenario is a tool to test J hat.ifK @uestions. Dach scenario is named* and can be edited and formatted separately. 3hen you print the spreadsheet* only the contents of the currently acti+e scenario are printed. , scenario is essentially a sa+ed set of cell +alues for your calculations. !ou can easily s itch bet een these sets using the #a+igator or a drop.do n list hich can be sho n beside the changing cells. 5or e6ample* if you anted to calculate the effect of different interest rates on an in+estment* you could add a scenario for each interest rate* and @uic0ly +ie the results. 5ormulas that rely on the +alues changed by your scenario are updated hen the scenario is opened. If all your sources of income used scenarios* you could efficiently build a comple6 model of your possible income.

$hapter . Data ,nal2sis

9%&

Creating scenarios
,ools < +cenarios opens a dialog ith options for creating a scenario. To create a ne scenario' 1) /elect the cells that contain the +alues that ill change bet een scenarios. To select multiple ranges* hold do n the $trl 0ey as you clic0. !ou must select at least t o cells. 2) Choose ,ools < +cenarios. 3) On the Create /cenario dialog &5igure 22=)* enter a name for the ne scenario. ItMs best to use a name that clearly identifies the scenario* not the default name as sho n in the illustration. This name is displayed in the #a+igator and in the title bar of the border around the scenario on the sheet itself.

'igure 99": $reating a scenario =) Optionally add some information to the Comment bo6. The e6ample sho s the default comment. This information is displayed in the #a+igator hen you clic0 the /cenarios icon and select the desired scenario. B) Optionally select or deselect the options in the Settings section. /ee belo for more information about these options. A) Clic0 =6 to close the dialog. The ne scenario is automatically acti+ated. !ou can create se+eral scenarios for any gi+en range of cells.

+ettings
The lo er portion of the Create /cenario dialog contains se+eral options. The default settings &as sho n in 5igure 22=) are li0ely to be suitable in most situations. %isplay border %laces a border around the range of cells that your scenario alters. To choose the color of the border* use the field to the right of this option. The border has a title bar displaying the name of the acti+e scenario. Clic0 the arro button to the right of the scenario name to open a drop. do n list of all the scenarios that ha+e been defined for the cells ithin the border. !ou can choose any of the scenarios from this list at any time.
$hapter . Data ,nal2sis 9%A

Copy back Copies any changes you ma0e to the +alues of scenario cells bac0 into the acti+e scenario. If you do not select this option* the sa+ed scenario +alues are ne+er changed hen you ma0e changes. The actual beha+ior of the Copy back setting depends on the cell protection* the sheet protection* and the Prevent changes setting &see Table - on page 2B-).
If you are +ie ing a scenario hich has Copy back enabled and then create a ne scenario by changing the +alues and selecting ,ools < +cenarios* you also inad+ertently o+er rite the +alues in the first scenario. This is easily a+oided if you lea+e the current +alues alone* create a ne scenario ith Copy back enabled* and then change the +alues only hen you are +ie ing the ne scenario.

Caution

Copy entire sheet ,dds to your document a sheet that permanently displays the ne scenario in full. This is in addition to creating the scenario and ma0ing it selectable on the original sheet as normal. Prevent changes %re+ents changes to a scenario enabled as a $op2 bac4* hen the sheet is protected but the cells are not. ,lso pre+ents changes to the settings described in this section hile the sheet is protected. , fuller e6planation of the effect this option has in different situations is gi+en belo .

Changing scenarios
/cenarios ha+e t o aspects that can be altered independently'

/cenario properties &the settings described abo+e) /cenario cell +alues &the entries ithin the scenario border)
The e6tent to hich either of these aspects can be changed is dependent upon both the e6isting properties of the scenario and the current protection state of the sheet and cells.

C"an%in% scenario properties


If the sheet is protected &,ools < Protect %ocument < +heet)* and Prevent changes is selected then scenario properties cannot be changed. If the sheet is protected* and Prevent changes is not selected* then all scenario properties can be changed e6cept Prevent changes and Copy entire sheet* hich are disabled. If the sheet is not protected* then Prevent changes does not ha+e any effect* and all scenario properties can be changed.

C"an%in% scenario cell values


Table - summariFes the interaction of +arious settings in pre+enting or allo ing changes in scenario cell +alues. (able -: Prevent changes behavior for scenario cell value changes !ettin%s
/heet protection O# /cenario cell protection O55 %re+ent changes O# Copy bac0 O#

C"an%e allowed
/cenario cell +alues cannot be changed.

$hapter . Data ,nal2sis

9%-

!ettin%s
/heet protection O# /cenario cell protection O55 %re+ent changes O55 Copy bac0 O# /heet protection O# /cenario cell protection O55 %re+ent changes O# or O55 Copy bac0 O55 /heet protection O# /cenario cell protection O# %re+ent changes ,#! /DTTI#" Copy bac0 ,#! /DTTI#" /heet protection O55 /cenario cell protection ,#! /DTTI#" %re+ent changes ,#! /DTTI#" Copy bac0 ,#! /DTTI#"

C"an%e allowed
/cenario cell +alues can be changed* and the scenario is updated.

/cenario cell +alues can be changed* but the scenario is not updated due to the Copy bac0 setting.

/cenario cell +alues cannot be changed.

/cenario cell +alues can be changed and the scenario is updated or not* depending on the Copy bac0 setting.

8orking with scenarios using the ?avigator


,fter scenarios are added to a spreadsheet* you can Gump to a particular scenario by selecting it from the list in the #a+igator. Clic0 the +cenarios icon in the #a+igator &see 5igure 22B). The defined scenarios are listed* along ith the comments that ere entered hen the scenarios ere created.

'igure 99%: Scenarios in the @avigator To apply a scenario to the current sheet* double.clic0 the scenario name in the #a+igator. To delete a scenario* right.clic0 the name in the #a+igator and choose %elete. To edit a scenario* including its name and comments* right.clic0 the name in the #a+igator and choose Properties. The Ddit %roperties dialog is the same as the Create /cenario dialog &5igure 22=).
$hapter . Data ,nal2sis 9%.

,racking values in scenarios


To learn hich +alues in the scenario affect other +alues* choose ,ools < %etective < ,race %ependents. ,rro s point to the cells that are directly dependent on the current cell.

*sing other Twhat ifU tools


Li0e scenarios* %ata < 4ultiple =perations is a planning tool for J hat ifK @uestions. $nli0e a scenario* the 4ultiple Operations tool does not present the alternate +ersions in the same cells or ith a drop.do n list. Instead* the 4ultiple Operations tool creates a formula array' a separate set of cells sho ing the results of applying the formula to a list of alternati+e +alues for the +ariables used by the formula. ,lthough this tool is not listed among the functions* it is really a function that acts on other functions* allo ing you to calculate different results ithout ha+ing to enter and run them separately. To use the 4ultiple Operations tool* you need t o arrays of cells. The first array contains the original or default +alues and the formulas applied to them. The formulas must be in a range. The second array is the formula array. It is created by entering a list of alternati+e +alues for one or t o of the original +alues. Once the alternati+e +alues are created* you use the 4ultiple Operations tool to specify hich formulas you are using* as ell as the original +alues used by the formulas. The second array is then filled ith the results of using each alternati+e +alue in place of the original +alues. The 4ultiple Operations tool can use any number of formulas* but only one or t o +ariables. 3ith one +ariable* the formula array of alternati+e +alues for the +ariables ill be in a single column or ro . 3ith t o +ariables* you should outline a table of cells such that the alternati+e +alues for one +ariable are arranged as column headings* and the alternati+e +alues for the other +ariable act as ro headings. /etting up multiple operations can be confusing at first. 5or e6ample* hen using t o +ariables* you need to select them carefully* so that they form a meaningful table. #ot e+ery pair of +ariables is useful to add to the same formula array. !et* e+en hen or0ing ith a single +ariable* a ne user can easily ma0e mista0es or forget the relationships bet een cells in the original array and cells in the formula array. In these situations* ,ools < %etective can help to clarify the relations. !ou can also ma0e formula arrays easier to or0 ith if you apply some simple design logic. %lace the original and the formula array close together on the same sheet* and use labels for the ro s and columns in both. These small e6ercises in organiFational design ma0e or0ing ith the formula array much less painful* particularly hen you are correcting mista0es or adGusting results.
If you e6port a spreadsheet containing multiple operations to 4icrosoft D6cel* the location of the cells containing the formula must be fully defined relati+e to the data range.

?ote

4ultiple operations in columns or rows


In your spreadsheet* enter a formula to calculate a result from +alues that are stored in other cells. Then* set up a cell range containing a list of alternati+es for one of the +alues used in the formula. The 4ultiple =perations command produces a list of results adGacent to your alternati+e +alues by running the formula against each of these alternati+es.

$hapter . Data ,nal2sis

9&8

?ote

7efore you choose the %ata < 4ultiple =perations option* be sure to select not only your list of alternati+e +alues but also the adGacent cells into hich the results should be placed.

In the 'ormulas field of the 4ultiple Operations dialog* enter the cell reference to the formula that you ish to use. The arrangement of your alternati+e +alues dictates ho you should complete the rest of the dialog. If you ha+e listed them in a single column* you should complete the field for $olumn input cell. If they are along a single ro * complete the 3ow input cell field. !ou may also use both in more ad+anced cases. 7oth single and double.+ariable +ersions are e6plained belo . The abo+e can be e6plained best by e6amples. Cell references correspond to those in the follo ing figures. LetMs say you produce toys that you sell for g10 each &cell 71). Dach toy costs g2 to ma0e &cell 72)* in addition to hich you ha+e fi6ed costs of g10*000 per year &cell 73). 2o much profit ill you ma0e in a year if you sell a particular number of toys>

Calculatin% wit" one for(ula and one variable


1) To calculate the profit* first enter any number as the @uantity &items sold)N in this e6ample* 2000 &cell 7=). The profit is found from the formula ProfitOCuantit2 T 6Selling price E Direct costs7 E 'i*ed costs. Dnter this formula in 7B' =B4*(B1-B2)-B3. 2) In column D enter a +ariety of alternati+e annual sales figures* one belo the otherN for e6ample* B00 to B000* in steps of B00. 3) /elect the range D2'D11* and thus the +alues in column D and the empty cells & hich ill recei+e the results of the calculations) alongside in column D. =) Choose %ata < 4ultiple =perations. B) 3ith the cursor in the 'ormulas field of the 4ultiple operations dialog* clic0 cell 7B. A) /et the cursor in the $olumn input cell field and clic0 cell 7=. This means that 7=* the @uantity* is the +ariable in the formula* hich is to be replaced by the column of alternati+e +alues. 5igure 22A sho s the or0sheet and the 4ultiple operations dialog. E) Clic0 =6. The profits for the different @uantities are no sho n in column D. /ee 5igure 22E.
!ou may find it easier to mar0 the re@uired reference in the sheet if you clic0 the /hrin0 icon to reduce the 4ultiple operations dialog to the siFe of the input field. The icon then changes to the 4a6imiFe iconN clic0 it to restore the dialog to its original siFe.

,ip

$hapter . Data ,nal2sis

9&#

'igure 99&: Sheet and :ultiple operations dialog showing input

'igure 99A: Sheet showing results of multiple operations calculations

Calculatin% wit" several for(ulas si(ultaneousl$


1) In the sheet from the pre+ious e6ample* delete the contents of column D. 2) Dnter the follo ing formula in CB' =B5/B4. !ou are no calculating the annual profit per item sold. 3) /elect the range D2'511* thus three columns. =) Choose %ata < 4ultiple =perations.

$hapter . Data ,nal2sis

9&9

B) 3ith the cursor in the 'ormulas field of the 4ultiple operations dialog* select cells 7B and CB. A) /et the cursor in the $olumn input cell field and clic0 cell 7=. 5igure 22- sho s the or0sheet and the 4ultiple operations dialog.

'igure 99-: Sheet and dialog showing input E) Clic0 =6. #o the profits are listed in column D and the annual profit per item in column 5.

'igure 99.: 3esults of multiple operations calculations

4ultiple operations across rows and columns


!ou can carry out multiple operations simultaneously for both columns and ro s in so.called cross. tables. The formula must use at least t o +ariables* the alternati+e +alues for hich should be arranged so that one set is along a single ro and the other set appears in a single column. These

$hapter . Data ,nal2sis

9&3

t o sets of alternati+e +alues ill form column and ro headings for the results table produced by the 4ultiple Operations procedure. /elect the range defined by both data ranges &thus including all of the blan0 cells that are to contain the results) and choose %ata < 4ultiple operations. Dnter the cell reference to the formula in the 'ormulas field. The 3ow input cell and the $olumn input cell fields are used to enter the reference to the corresponding cells of the formula.

Caution

7e are of entering the cell reference of a +ariable into the rong field. The Ho input cell field should contain not the cell reference of the +ariable hich changes do n the ro s of your results table* but that of the +ariable hose alternati+e +alues ha+e been entered along a single ro .

Calculatin% wit" two variables


!ou no ant to +ary not Gust the @uantity produced annually* but also the selling price* and you are interested in the profit in each case. D6pand the table sho n in 5igure 22-. D2 thru D11 already contain the numbers B00* 1000 and so on* up to B000. In D1 through 21 enter the numbers -* 10* 1B and 20. 1) /elect the range D1'211. 2) Choose %ata < 4ultiple =perations.

'igure 938: Sheet and dialog showing input 3) 3ith the cursor in the 'ormulas field of the 4ultiple operations dialog* clic0 cell 7B &profit). =) /et the cursor in the 3ow input cell field and clic0 cell 71. This means that 71* the selling price* is the horiFontally entered +ariable & ith the +alues -* 10* 1B and 20). B) /et the cursor in the $olumn input cell field and clic0 cell 7=. This means that 7=* the @uantity* is the +ertically entered +ariable. A) Clic0 =6. The profits for the different selling prices are no sho n in the range D2'211 &/ee 5igure 231).

$hapter . Data ,nal2sis

9&"

'igure 93#: 3esults of multiple operations calculations

8orking backwards using (oal +eek


$sually* you create a formula to calculate a result based upon e6isting +alues. 7y contrast* using ,ools < (oal +eek you can disco+er hat +alues ill produce the result that you ant. To ta0e a simple e6ample* imagine that the Chief 5inancial Officer of a company is de+eloping sales proGections for each @uarter of the forthcoming year. /he 0no s hat the companyMs total income must be for the year to satisfy stoc0holders. /he also has a good idea of the companyMs income in the first three @uarters* because of the contracts that are already signed. 5or the fourth @uarter* ho e+er* no definite income is a+ailable. /o ho much must the company earn in I= to reach its goal> The C5O can enter the proGected earnings for each of the other three @uarters along ith a formula that totals all four @uarters. Then she runs a goal see0 on the empty cell for I= sales* and recei+es her ans er. Other uses of goal see0 may be more complicated* but the method remains the same. Only one argument can be altered in a single goal see0.

(oal +eek e.ample


To calculate annual interest &I)* create a table ith the +alues for the capital &C)* number of years &n)* and interest rate &i). The formula is I = C*n*i. Let us assume that the interest rate i of E.Bd and the number of years n &1) ill remain constant. 2o e+er* you ant to 0no ho much the in+estment capital C ould ha+e to be modified in order to attain a particular return I. 5or this e6ample* calculate ho much capital C ould be re@uired if you ant an annual return of g1B*000. Dnter each of the +alues mentioned abo+e into adGacent cells &for Capital* C* an arbitrary +alue li0e g100*000 or it can be left blan0N for number of years* n* 1N for interest rate* i* E.Bd). Dnter the formula to calculate the interest* I* in another cell. Instead of C* n* and i* use the reference to the cell ith the corresponding +alue. In our e6ample &5igure 232)* this ould be Y71Z72Z73. 1) %lace the cursor in the formula cell &7=)* and choose ,ools < (oal +eek. 2) In the "oal /ee0 dialog* the correct cell is already entered in the 'ormula cell field. 3) %lace the cursor in the Hariable cell field. In the sheet* clic0 in the cell that contains the +alue to be changed* in this e6ample it is 71. =) Dnter the desired result of the formula in the (arget value field. In this e6ample* the +alue is 15000. 5igure 232 sho s the cells and fields.

$hapter . Data ,nal2sis

9&%

'igure 939: )*ample setup for goal see4 B) Clic0 =6. , dialog appears informing you that the "oal /ee0 as successful. Clic0 Ies to enter the goal +alue into the +ariable cell. The result is sho n belo indicating a capital re@uirement of g200*000 is needed to achie+e g1B*000 annual return.

'igure 933: 3esult of goal see4 operation

*sing the +olver


,ools < +olver amounts to a more elaborate form of "oal /ee0. The difference is that the /ol+er deals ith e@uations ith multiple un0no n +ariables. It is specifically designed to minimiFe or ma6imiFe the result according to a set of rules that you define. Dach of these rules defines hether an argument in the formula should be greater than* less than* or e@ual to the figure you enter. If you ant the argument to remain unchanged* you must enter a rule that specifically states that the cell should be e@ual to its current entry. 5or arguments that you ould li0e to change* you need to add t o rules to define a range of possible +alues' the limiting conditions. 5or e6ample* you can set the constraint that one of the +ariables or cells must not be bigger than another +ariable* or not bigger than a gi+en +alue. !ou can also define the constraint that one or more +ariables must be integers &+alues ithout decimals)* or binary +alues & here only 0 and 1 are allo ed). Once you ha+e finished setting up the rules* clic0 the +olve button to begin the automatic process of adGusting +alues and calculating results. Depending on the comple6ity of the tas0* this may ta0e some time.

$hapter . Data ,nal2sis

9&&

+olver e.ample
LetMs say you ha+e g10*000 that you ant to in+est in t o mutual funds for one year. 5und Q is a lo ris0 fund ith -d interest rate and 5und ! is a higher ris0 fund ith 12d interest rate. 2o much money should be in+ested in each fund to earn a total interest of g1000> To find the ans er using /ol+er' 1) Dnter labels and data'

Ho labels' Fund X* Fund

* and !"!a#* in cells ,2 thru ,=.

Column labels' in!$r$%! $arn$d* a&"un! in'$%!$d* in!$r$%! ra!$* and !i&$ ($ri"d* in cells 71 thru D1. Interest rates' ) and 12* in cells D2 and D3. Time period' 1* in cells D2 and D3. Total amount in+ested' 10000* in cell C=. Dnter an arbitrary +alue &0 or lea+e blan0) in cell C2 as amount in+ested in 5und Q. In cell C3* enter the formula C4*C2 &total amount X amount in+ested in 5und Q) as the amount in+ested in 5und !. In cells 72 and 73* enter the formula for calculating the interest earned &see 5igure 23=). In cell 7=* enter the formula B2+B3 as the total interest earned.

2) Dnter formulas'

'igure 93": )*ample setup for Solver 3) Choose ,ools < +olver. The /ol+er dialog &5igure 23B) opens. =) Clic0 in the (arget cell field. In the sheet* clic0 in the cell that contains the target +alue. In this e6ample it is cell 7= containing total interest +alue. B) /elect Halue of and enter 1000 in the field ne6t to it. In this e6ample* the target cell +alue is 1000 because your target is a total interest earned of g1000. /elect :a*imum or :inimum if the target cell +alue needs to be one of those e6tremes. A) Clic0 in the B2 changing cells field and clic0 on cell C2 in the sheet. In this e6ample* you need to find the amount in+ested in 5und Q &cell C2). E) Dnter limiting conditions for the +ariables by selecting the $ell reference= Operator and Halue fields. In this e6ample* the amount in+ested in 5und Q &cell C2) should not be greater than the total amount a+ailable &cell C=) and should not be less than 0. -) Clic0 =6. , dialog appears informing you that the /ol+ing successfully finished. Clic0 6eep 3esult to enter the result in the cell ith the +ariable +alue. The result is sho n in 5igure 23A.

$hapter . Data ,nal2sis

9&A

'igure 93%: (he Solver dialog

'igure 93&: 3esult of Solver operation

$hapter . Data ,nal2sis

9&-

$hapter #8 Lin4ing $alc Data


Sharing data in and out of $alc

8hy use multiple sheets9


Chapter 1 introduced the concept of multiple sheets &also called or0sheets) in a spreadsheet. 4ultiple sheets help 0eep information organiFedN once you lin0 those sheets together* you unleash the full po er of Calc. Consider this case. 1ohn is ha+ing trouble 0eeping trac0 of his personal finances. 2e has se+eral ban0 accounts and the information is scattered and disorganiFed. 2e canMt get a good grasp on his finances until he can see e+erything at once. To resol+e this* 1ohn decided to trac0 his finances in LibreOffice Calc. 1ohn 0no s Calc can do simple mathematical computations to help him 0eep a running tab of his accounts* and he ants to set up a summary sheet so that he can see all of his account balances at once. This can be accomplished easily.

?ote

5or users ith e6perience using 4icrosoft D6cel' hat D6cel calls a wor4boo4* Calc calls a spreadsheet &the hole document). 7oth D6cel and Calc use the terms sheet and wor4sheet.

+etting up multiple sheets


Chapter 1 gi+es a detailed e6planation of ho to set up multiple sheets in a spreadsheet. 2ere is a @uic0 re+ie .

dentifying sheets
3hen you open a ne spreadsheet it has* by default* one sheet named Sheet#* unless you ha+e specified a different number of sheets or a different %refi6 name for or0sheets in ,ools < =ptions < 2ibre=ffice Calc < %efaults.

3or0sheets in Calc are managed using tabs at the bottom of the spreadsheet.

nserting new sheets


There are se+eral button ays to insert a ne sheet. The fastest method is to clic0 on the ,dd /heet . This inserts one ne sheet at that point* ithout opening the Insert /heet dialog.

$se one of these other methods to insert more than one sheet* to rename the sheet at the same time* or to insert the sheet some here else in the se@uence. The first step for these methods is to select the sheet that the ne sheet ill be inserted ne6t to. Then do any one of the follo ing'

/elect nsert < +heet from the menu bar.

$hapter #8 Lin4ing $alc Data

9A8

Hight.clic0 on the tab and select nsert +heet. Clic0 in an empty space at the end of the line of sheet tabs.

'igure 93A: $reating a new sheet Dach method opens the Insert /heet dialog. 2ere you can choose to put the ne sheet before or after the selected sheet* ho many sheets to insert* and hat to name a single sheet. &5or the 'rom file option* see the ne6t section.)

'igure 93-. 0nsert Sheet dialog 3e need si6 sheets* one for each of the fi+e accounts and one as a summary sheet* so e ill add three more. 3e also ant to name each of these sheets for the account they represent' /ummary* Chec0ing ,ccount* /a+ings ,ccount* Credit Card 1* Credit Card 2* and Car Loan. 3e ha+e t o choices' insert three ne sheets and rename all si6 sheets after ardsN or rename the e6isting sheets* then insert the three ne sheets one at a time* renaming each ne sheet during the insert step. To insert sheets and rename after ards' 1) In the Insert /heet dialog* choose the position for the ne sheets &in this e6ample* e use After current sheet). 2) Choose ?ew sheet and ' as the @o. of sheets. &Three sheets are already pro+ided by default.) 7ecause you are inserting more than one sheet* the @ame bo6 is not a+ailable. 3) Clic0 =6 to insert the sheets. =) 5or the ne6t steps* go to JHenaming sheetsK belo .

$hapter #8 Lin4ing $alc Data

9A#

To insert sheets and name them at the same time' 1) Hename the e6isting sheets /ummary* Chec0ing ,ccount* and /a+ings ,ccount* as described in JHenaming sheetsK belo . 2) In the Insert /heet dialog* choose the position for the first ne sheet. 3) Choose ?ew sheet and 1 as the @o. of sheets. The @ame bo6 is no a+ailable. =) In the ?ame bo6* type a name for this ne sheet* for e6ample Cr$di! Card 1. B) Clic0 =6 to insert the sheet. A) Hepeat steps 1X= for each ne sheet* gi+ing them the names Credit Card 2 and Car Loan.

nserting sheets from a different spreadsheet


On the Insert /heet dialog* you can also add a sheet from a different spreadsheet file &for e6ample* another Calc or D6cel spreadsheet)* by choosing the From file option. Clic0 7rowse and select the fileN a list of the a+ailable sheets appears in the bo6. /elect the sheet to import. If* after you select the file* no sheets appear* you probably selected an in+alid file type &not a spreadsheet* for e6ample).

,ip

5or a shortcut to inserting a sheet from another file* choose nsert < +heet from file from the menu bar. The Insert /heet dialog opens ith the From file option preselected* and then the Insert dialog opens on top of it.

If you prefer* select the 2ink option to insert the e6ternal sheet as a lin0 instead as a copy. This is one of se+eral ays to include Jli+eK data from another spreadsheet. &/ee also JLin0ing to e6ternal dataK on page 2E<.) The lin0s can be updated manually to sho the current contents of the e6ternal fileN or* depending on the options you ha+e selected in ,ools < =ptions < 2ibre=ffice Calc < (eneral < *pdating* hene+er the file is opened.

3enaming sheets
/heets can be renamed at any time. To gi+e a sheet a more meaningful name'

Dnter the name in the name bo6 hen you create the sheet* or Double clic0 on the sheet tab* or Hight.clic0 on a sheet tab* select 3ename +heet from the conte6t menu and replace the
e6isting name.
If you ant to sa+e the spreadsheet to 4icrosoft D6cel format* the follo ing characters are not allo ed in sheet names' m ( > Z V W ' and ? as the first or last character of the name.

?ote

!our sheet tab area should no loo0 li0e this.

'igure 93.: Si* renamed sheets #o e ill set up the account ledgers. This is Gust a simple summary that includes the pre+ious balance plus the amount of the current transaction. 5or ithdra als* e enter the current transaction as a negati+e number so the balance gets smaller. , basic ledger is sho n in 5igure 2=0.
$hapter #8 Lin4ing $alc Data 9A9

This ledger is set up in the sheet named $hec4ing ,ccount. The total balance is added up in cell 53. !ou can see the e@uation for it in the formula bar. It is the summary of the opening balance* cell C3* and all of the subse@uent transactions.

'igure 9"8: $hec4ing ledger

3eferencing other sheets


On the Summar2 sheet e display the balance from each of the other sheets. If you copy the e6ample in 5igure 2=0 onto each account* the current balances ill be in cell 53 of each sheet. There are t o ays to reference cells in other sheets' by entering the formula directly using the 0eyboard or by using the mouse. 3e ill loo0 at the mouse method first.

Creating the reference with the mouse


On the Summar2 sheet* set up a place for all fi+e account balances* so e 0no here to put the cell reference. 5igure 2=1 sho s a summary sheet ith a blan0 7alance column. 3e ant to place the reference for the chec0ing account balance in cell 73.

'igure 9"#: Blan4 summar2 To ma0e the cell reference in cell 73* select the cell and follo these steps' 1) Clic0 on the Q icon ne6t to the input line. The icons change and an e@uals sign appears in the input line as in 5igure 2=2.

$hapter #8 Lin4ing $alc Data

9A3

'igure 9"9: )Kual sign in input line 2) #o * clic0 on the sheet tab for the sheet containing the cell to be referenced. In this case* that is the $hec4ing ,ccount sheet as sho n in 5igure 2=3.

'igure 9"3: $lic4 on the chec4ing account tab 3) Clic0 on cell 53 & here the balance is) in the $hec4ing ,ccount sheet. The phrase 6(hecH ," Acco-,t6.F3 should appear in the input line as in 5igure 2== and the selected cell is bordered in red.

'igure 9"": $ell reference selected =) Clic0 the green chec0mar0 in the input line* or press the 0eyboard )nter 0ey to finish. B) The Summar2 sheet should no loo0 li0e 5igure 2=B.

'igure 9"%: 'inished chec4ing account reference

$hapter #8 Lin4ing $alc Data

9A"

Creating the reference with the keyboard


5rom 5igure 2=B* you can deduce ho the cell reference is constructed. The reference has t o parts' the sheet name &U$hec4ing ,ccountV) and the cell reference &'3). #otice that they are separated by a period.

?ote

The sheet name is in single @uotes because it contains a space* and the mandatory period &.) al ays falls outside any @uotes.

/o* you can fill in the /a+ings ,ccount cell reference by Gust typing it in. ,ssuming that the balance is in the same cell &'3) in the Savings ,ccount sheet* the cell reference should be =6S#v ,"s Acco-,t6.F3 &see 5igure 2=A).

'igure 9"&: Savings account reference

3eferencing other documents


1ohn decides to 0eep his family account information in a different spreadsheet file from his o n summary. 5ortunately Calc can lin0 different files together. The process is the same as described for different sheets in a single spreadsheet* but e add one more step to indicate hich file the sheet is in.

Creating the reference with the mouse


To create the reference ith the mouse* both spreadsheets need to be open. /elect the cell in hich the formula is going to be entered. 1) Clic0 the Q icon ne6t to the input line. 2) / itch to the other spreadsheet &the process to do this ill +ary depending on hich operating system you are using). 3) /elect the sheet &Savings ,ccount) and then the reference cell &'3). /ee 5igure 2=E. The 0eyboard )nter 0ey can be pressed at this point* or continue ith steps = and B. =) / itch bac0 to the original spreadsheet. B) Clic0 on the green chec0 mar0 on the input line. !our spreadsheet should no resemble 5igure 2=-.

$hapter #8 Lin4ing $alc Data

9A%

'igure 9"A: Selecting the savings account reference cell

'igure 9"-: Lin4ed files !ou ill get a good feel for the format of the reference if you loo0 closely at the input line. 7ased on this line you can create the reference using the 0eyboard.

Creating the reference with the keyboard


Typing the reference is simple once you 0no the format the reference ta0es. The reference has three parts to it'

%ath and file name /heet name Cell


5rom 5igure 2=-* you can see the the general format for the reference is =6+ /e0;;;P#th ' F /e !#:e6IJSheet!#:e.(e//!#:e

?ote

The reference for a file has three for ard slashes hyperlin0 has t o for ard slashes .

and the reference for a

;yperlinks and *32s


2yperlin0s can be used in Calc to Gump to a different location from ithin a spreadsheet and can lead to other parts of the current file* to different files or e+en to eb sites.

3elative and absolute hyperlinks


2yperlin0s can be stored ithin your file as either relati+e or absolute. , relati+e hyperlin0 says* +ere is how to get there starting from where 2ou are now &meaning from the folder in hich your current document is sa+ed) hile an absolute hyperlin0 says* +ere is how to get there no matter where 2ou start from.
$hapter #8 Lin4ing $alc Data 9A&

,n absolute lin0 ill stop or0ing only if the target is mo+ed. , relati+e lin0 ill stop or0ing only if the start and target locations change relati+e to each other. 5or instance* if you ha+e t o spreadsheets in the same folder lin0ed to each other and you mo+e the entire folder to a ne location* a relati+e hyperlin0 ill not brea0. To change the ay that LibreOffice stores the hyperlin0s in your file* select ,ools < =ptions < 2oadH+ave < (eneral and choose if you ant $HLs sa+ed relati+ely hen referencing the 'ile S2stem* or the 0nternet* or both. Calc ill al ays display an absolute hyperlin0. DonMt be alarmed hen it does this e+en hen you ha+e sa+ed a relati+e hyperlin0cthis LabsoluteM target address ill be updated if you mo+e the file.
4a0e sure that the folder structure on your computer is the same as the file structure on your eb ser+er if you sa+e your lin0s as relati+e to the file system and you are going to upload pages to the Internet.

?ote

,ip

3hen you rest the mouse pointer on a hyperlin0* a help tip displays the absolute reference* since LibreOffice uses absolute path names internally. The complete path and address can only be seen hen you +ie the result of the 2T4L e6port &sa+ing the spreadsheet as an 2T4L file)* by loading the 2T4L file as Te6t* or by opening it ith a te6t editor.

Creating hyperlinks
3hen you type te6t that can be used as a hyperlin0 &such as a ebsite address or $HL)* Calc formats it automatically* creating the hyperlin0 and applying to the te6t a color and bac0ground shading. If this does not happen* you can enable this feature using ,ools < AutoCorrect =ptions < =ptions and selecting *32 3ecognition.
To change the color of hyperlin0s* go to ,ools < =ptions < 2ibre=ffice < Appearance* scroll to Unvisited lin4s and(or Hisited lin4s* pic0 the ne colors and clic0 =6. Caution' this ill change the color for all hyperlin0s in all components of LibreOfficecthis may not be hat you ant.

,ips

!ou can also insert and modify lin0s using the 2yperlin0 dialog. To display the dialog* clic0 the ;yperlink icon on the /tandard toolbar or choose nsert < ;yperlink from the menu bar. To turn e6isting te6t into a lin0* highlight it before opening the dialog. On the left side* select one of the four categories of hyperlin0s'

nternet' the hyperlin0 points to a eb address* normally starting ith http'(( 4ail B ?ews' the hyperlin0 opens an email message that is pre.addressed to a particular
recipient.

%ocument' the hyperlin0 points to a place in either the current document or another
e6isting document.

?ew document' the hyperlin0 creates a ne document.


The top section of the dialog changes according to the choice made for the hyperlin0 category from the left panel. , full description of all the choices* and their interactions* is beyond the scope of this chapter. 2ere is a summary of the most common choices used in spreadsheets.

$hapter #8 Lin4ing $alc Data

9AA

'igure 9".: +2perlin4 dialog showing details for 0nternet lin4s 5or an nternet hyperlin0* choose the type of hyperlin0 &3eb or 5T%*)* and enter the re@uired eb address &$HL). 5or a 4ail and ?ews hyperlin0* specify hether it is a mail or ne s lin0* the recei+er address and for email* also the subGect. 5or a %ocument hyperlin0* specify the document path &the =pen File button opens a file bro ser)N lea+e this blan0 if you ant to lin0 to a target in the same spreadsheet. Optionally specify the target in the document &for e6ample a specific sheet). Clic0 on the ,arget in document icon to open the #a+igator here you can select the target* or if you 0no the name of the target* you can type it into the bo6. 5or a ?ew %ocument hyperlin0* specify hether to edit the ne ly created document immediately &#dit now) or Gust create it &#dit later)* and enter the file name and the type of document to create &te6t* spreadsheet* etc.). The +elect path button opens a directory pic0er dialog. The 'urther settings section at the bottom of the dialog is common to all the hyperlin0 categories* although some choices are more rele+ant to some types of lin0s.

/et the +alue of Frame to determine ho the hyperlin0 ill open. This applies to documents
that open in a 3eb bro ser.

Form specifies if the lin0 is to be presented as te6t or as a button. 5igure 2B0 sho s a lin0
formatted as a button.

'igure 9%8: +2perlin4 as button

,e.t specifies the te6t that ill be +isible to the user. If you do not enter anything here* Calc
ill use the full $HL or path as the lin0 te6t. #ote that if the lin0 is relati+e and you mo+e the file* this te6t ill not change* though the target ill.
$hapter #8 Lin4ing $alc Data 9A-

?ame is applicable to 2T4L documents. It specifies te6t that ill be added as a !AM@
attribute in the 2T4L code behind the hyperlin0.

#vents button' this button ill be acti+ated to allo Calc to react to e+ents for hich the
user has ritten some code &macro). This function is not co+ered in this chapter.
, hyperlin0 button is a type of form control. ,s ith all form controls* it can be anchored or positioned by right.clic0ing on the button in design mode. 4ore information about forms can be found in Chapter 1B of the <riter Guide. 5or the button to or0 * the spreadsheet must not be in design mode. To toggle design mode on and off* +ie the 5orm Controls toolbar &>iew < ,oolbars < Form Controls) and clic0 the %esign 4ode =nH=ff button .

?ote

#diting hyperlinks
To edit an e6isting lin0* place the cursor any here in the lin0 and clic0 the ;yperlink icon on the /tandard toolbar or select #dit < ;yperlink from the menu bar. The 2yperlin0 dialog &5igure 2=<) opens. If the 2yperlin0 is in button form* the spreadsheet must ha+e Design 4ode on in order to edit the 2yperlin0. 4a0e your changes and clic0 Apply. If you need to edit se+eral hyperlin0s* you can lea+e the 2yperlin0 dialog open until you ha+e edited all of them. 7e sure to clic0 Apply after each one. 3hen you are finished* clic0 Close.

3emoving hyperlinks
!ou can remo+e the clic0able lin0 from hyperlin0 te6tclea+ing Gust the te6tcby right.clic0ing on the lin0 and selecting %efault Formatting. This option is also a+ailable from the Format menu. !ou may then need to re.apply some formatting in order for it to match the rest of your document. To erase the lin0 te6t or button from the document completely* select it and press the Bac4space or Delete 0ey.

2inking to e.ternal data


3ith the help of the 3eb %age Iuery import filter* you can insert tables from 2T4L documents into Calc. !ou can use the same method to insert data located ithin named ranges from a LibreOffice Calc or 4icrosoft D6cel spreadsheet* into a Calc spreadsheet. &To use other data sources* including database files in LibreOffice 7ase* see JLin0ing to registered data sourcesK on page 2-=.) !ou can do this in t o ays' using the D6ternal Data dialog or using the #a+igator. If your file has named ranges or named tables* and you 0no the name of the range or table you ant to lin0 to* using the D6ternal Data dialog method is @uic0 and easy. 2o e+er* if the file has se+eral tables* and you ant to pic0 only one of them* you may not be able to easily determine hich is hichN in that case* the #a+igator method may be easier.

*sing the #.ternal %ata dialog


1) Open the Calc document here the e6ternal data is to be inserted. This is the target document. 2) /elect the cell here the upper left.hand cell of the e6ternal data is to be inserted. 3) Choose nsert < 2ink to #.ternal %ata.

$hapter #8 Lin4ing $alc Data

9A.

=) On the D6ternal Data dialog* type the $HL of the source document or select it from the drop.do n list if it is listed.

5or entries typed in* press )nter on completion. 5ile selections from the drop.do n list ill load automatically.

B) !ou can also clic0 the V...W button to open the Insert &file selection) dialog. /electing a file and then clic0ing nsert loads the list of a+ailable tables. If the source document is a 3eb page* choose 8eb Page Muery KCalcL as the file type &see 5igure 2B1). Dnter the $HL as the file name. Clic0 nsert.

'igure 9%#: Using a <eb Cuer2 to lin4 data directl2 to a web page A) 5or $HLs to 2T4L & eb) documents* pressing )nter at step =* or nsert at step B* opens the Import Options dialog here you can choose the import language of the site. /elect Automatic to let Calc import the data directly* or select Custom and choose from the drop. do n list of languages a+ailable. !ou can also select the option to ha+e Calc recognise special numbers such as dates on import.

'igure 9%9: 0mport Options dialog E) Clic0 =6 and Calc loads the list of a+ailable tables(ranges &5igure 2B3). The filter can create names for cell ranges as they are imported. ,s much formatting as possible is retained hile the filter intentionally does not import any images. The filter additionally creates t o entries to the list' 2T4LPall to permit selection of the entire document* and 2T4LPtables to permit selection of all the tables. -) In the ,vailable tables range list* select the named ranges or tables you ant to insert &hold $trl to select multiple entries). The =6 button then becomes a+ailable. !ou can also specify that the ranges or tables are updated e+ery &number of) seconds. <) Clic0 =6 to close the dialog and insert the lin0ed data.

$hapter #8 Lin4ing $alc Data

9-8

'igure 9%3: Selecting a table or range in a source document from the <eb

*sing the ?avigator


1) Open the Calc spreadsheet in hich the e6ternal data is to be inserted &target document). 2) Open the document from hich the e6ternal data is to be ta0en &source document). The source document can be a 3eb page* created by choosing 8eb Page Muery KCalcL as the file type* and entering the $HL into the 5ile name bo6* before clic0ing =6 &see 5igure 2B1). 3) In the target document* press '% to open the #a+igator.

'igure 9%": Selecting a data range in a source document= to be inserted as a lin4

$hapter #8 Lin4ing $alc Data

9-#

=) ,t the bottom of the #a+igator* select the source document. &In 5igure 2B=* the source is named actives.) The #a+igator no sho s the range names or the tables contained in the source document &the e6ample contains range namesN other documents ha+e a list of tables). Clic0 on the R ne6t to 3ange names to display the list. B) In the #a+igator* select the nsert as 2ink drag mode* as sho n in 5igure 2B=. A) /elect the re@uired range or table and drag it from the #a+igator into the target document* to the cell here you ant the upper left.hand cell of the data range to be. E) Heselect the target document in the bo6 at the bottom of the #a+igator. Instead of a E symbol ne6t to 3ange names* it sho s a E symbol ne6t to Lin4ed areas. Clic0 the E symbol to see the range name &see 5igure 2BB) dragged across from the source document.

'igure 9%%: Lin4ed areas in target spreadsheet

;ow to find the re@uired data range or table


The e6amples abo+e sho that the import filter ga+e names to the data ranges &tables) in the sample eb page starting from ;,42S1. It also created t o additional range names &not +isible in the illustration)'

;,42Sall X designates the entire document ;,42Stables X designates all 2T4L tables in the document
If the data tables in the source 2T4L document ha+e been gi+en names &using the ID attribute on the T,7LD tag)* or the e6ternal spreadsheet includes named ranges* those names appear in the list along ith the ranges Calc has se@uentially numbered. If the data range or table you ant is not named* ho can you tell hich one to select> "o to the source document* hich you opened in Calc. In the #a+igator* double.clic0 on a range name' that range is highlighted on the sheet &see 5igure 2BA). If the 5ormula 7ar is +isible* the range name is also displayed in the @ame bo6 at the left.hand end &see 5igure 2BE). The range name can also be selected from this drop.do n list to highlight it on the page.

$hapter #8 Lin4ing $alc Data

9-9

'igure 9%&: Using the @avigator to find a data range name

'igure 9%A: Using the @ame bo* to find a data range name

$hapter #8 Lin4ing $alc Data

9-3

2inking to registered data sources


!ou can access a +ariety of databases and other data sources and lin0 them into Calc documents. 5irst you need to register the data source ith LibreOffice. &To register means to tell LibreOffice hat type of data source it is and here the file is located.) The ay to do this depends on hether or not the data source is a database in Z.odb format. To register a data source that is in Z.odb format' 1) Choose ,ools < =ptions < 2ibre=ffice 7ase < %atabases. 2) Clic0 the ?ew button &belo the list of registered databases) to open the Create Database Lin0 dialog &5igure 2B-).

'igure 9%-: 3egistering databases 3) Dnter the location of the database file* or clic0 7rowse to open a file bro ser and select the database file. =) Type a name to use as the registered name for the database and clic0 =6. The database is added to the list of registered databases. The =6 button is enabled only hen both fields are filled in. To register a data source that is not in Z.odb format' 1) Choose File < ?ew < %atabase to open the Database 3iFard. 2) /elect Connect to an e.isting database. The choices for database type depend on your operating system. 5or e6ample* 4icrosoft ,ccess and other 4icrosoft products are not among the choices if you are using Linu6. In our e6ample* e chose d7,/D. 3) Clic0 ?e.t. Type the path to the database file or clic0 7rowse and use the Open dialog to na+igate to and select the database file before clic0ing =pen. =) Clic0 ?e.t. /elect Fes= register the database for me* but clear the chec0bo6 mar0ed Open the database for editing. B) Clic0 Finish. #ame and sa+e the database in the location of your choice. #ote' changes made to the Z.odb do not affect the original d7,/D file. Once a data source has been registered* it can be used by any LibreOffice component &for e6ample Calc).

$hapter #8 Lin4ing $alc Data

9-"

'igure 9%.: 3egistering a database using the Database <i1ard

>iewing data sources


Open a document in Calc. To +ie the data sources a+ailable* press '" or select >iew < %ata +ources from the menu bar. The Data /ource Cie pane opens abo+e the spreadsheet. , list of registered databases is in the Data D6plorer area on the left. &The built.in 7ibliography database is included in the list.) To +ie each database* clic0 on the E symbol to the left of the name of the database. &This has been done for the ,utomobile database in 5igure 2A0.) Clic0 on the E symbol ne6t to Tables to +ie the indi+idual tables.

'igure 9&8: Databases #o clic0 on a table to see all the records held in it. The data records are displayed on the right side of the Data /ource Cie pane. To see more columns* you can clic0 the #.plorer =nH=ff button to hide the Data D6plorer area.

$hapter #8 Lin4ing $alc Data

9-%

,t the top of the Data /ource Cie pane* belo the Calc toolbars* is the Table Data bar. This toolbar includes buttons for sa+ing records* editing data* finding records* sorting* filtering* and other functions. 5or more details about this toolbar* see the 2elp for data source browser. 7elo the records is the 5orm #a+igation bar* hich sho s hich record is selected and the total number of records. To the right are fi+e small buttonsN the first four mo+e bac0 ards or for ards through the records* or to the beginning or end. The last is for adding ne records.

'igure 9&#: Data Source Hiew navigation buttons

#diting data sources


/ome data sources &such as spreadsheets) cannot be edited in the data source +ie . In editable data sources* records can be edited* added* or deleted. If you cannot sa+e your edits* you need to open the database in 7ase and edit it thereN see JLaunching 7ase to or0 on data sourcesK. !ou can also hide columns and ma0e other changes to the display.

2aunching 7ase to work on data sources


!ou can launch LibreOffice 7ase at any time from the Data /ource Cie pane. Hight.clic0 on a database or the ,ables or Mueries icons and select #dit %atabase File. Once in 7ase* you can edit* add* and delete tables* @ueries* forms* and reports. 5or more about using 7ase* see Chapter -* "etting /tarted ith 7ase* in the Getting Started guide.

*sing data sources in Calc spreadsheets


Data from the tables in the data source pane can be placed into Calc documents in a +ariety of ays. !ou can select a cell or an entire ro in the data source pane and drag and drop the data into the spreadsheet. The data is inserted at the place here you release the mouse button. ,n alternati+e method uses the %ata to ,e.t icon and ill include the column headings abo+e the data you insert' 1) Clic0 the cell of the spreadsheet hich you ant to be the top left of your data including the column names. 2) %ress '" to open the database source indo and select the table containing the data you ant to use. 3) /elect the ro s of data you ant to add to the spreadsheet'

Clic0 the gray bo6 to the left of the ro you ant to select if only selecting one ro . That ro is highlighted. To select multiple adGacent ro s* hold do n the Shift 0ey hile clic0ing the gray bo6 of the ro s you need. To select multiple separate ro s* hold do n the $ontrol 0ey hile selecting the ro s. The selected ro s are highlighted. To select all the ro s* clic0 the gray bo6 in the upper left corner. ,ll ro s are highlighted. to insert the data into the spreadsheet cells.

=) Clic0 the %ata to te.t icon

$hapter #8 Lin4ing $alc Data

9-&

!ou can also drag the data source column headings &field names) onto your spreadsheet to create a form for +ie ing and editing indi+idual records one at a time. 5ollo these steps' 1) Clic0 the gray bo6 at the top of the column &containing the field name you ish to use) to highlight it. 2) Drag and drop the gray bo6 to here you ant the record to appear in the spreadsheet. 3) Hepeat until you ha+e mo+ed all of the fields you need to here you ant them. =) Close the Data /ource indo by pressing '". B) /a+e the spreadsheet and clic0 the #dit File button on the /tandard toolbar* to ma0e the spreadsheet read.only. ,ll of the fields ill sho the +alue for the data of the first record you selected. A) ,dd the 'orm @avigation toolbar' >iew < ,oolbars < Form ?avigation. 7y default* this toolbar opens at the bottom of the Calc indo * Gust abo+e the status bar. E) Clic0 the arro s on the 5orm #a+igation toolbar to +ie the different records of the table. The number in the Hecord bo6 changes as you mo+e through the records. The data in the fields changes to correspond to the data for that particular record number. !ou can also search for a specific record* sort and filter records* and do other tas0s using this toolbar.

#mbedding spreadsheets
/preadsheets can be embedded in other LibreOffice files. This is often used in 3riter or Impress documents so that Calc data can be used in a te6t document. !ou can embed the spreadsheet as either an OL) or DD) obGect. The difference bet een a DDD obGect and a Lin0ed OLD obGect is that a Lin0ed OLD obGect can be edited from the document in hich it is added as a lin0* but a DDD obGect cannot. 5or e6ample* if a Calc spreadsheet is pasted into a 3riter document as a DDD obGect* then the spreadsheet cannot be edited in the 3riter document. 7ut if the original Calc spreadsheet is updated* the changes are automatically made in the 3riter document. If the spreadsheet is inserted as a Lin0ed OLD obGect into the 3riter document* then the spreadsheet can be edited in the 3riter as ell as in the Calc document and both documents are in sync ith each other.

=bCect 2inking and #mbedding K=2#L


The maGor benefit of an OLD &ObGect Lin0ing and Dmbedding) obGect is that it is @uic0 and easy to edit its contents Gust by double.clic0ing on it. !ou can also insert a lin0 to the obGect that ill appear as an icon rather than an area sho ing the contents itself. OLD obGects can be lin0ed to a target document or be embedded in the target document. Lin0ing inserts information hich ill be updated ith any subse@uent changes to the original file* hile embedding inserts a static copy of the data. If you ant to edit the embedded spreadsheet* double. clic0 on the obGect. To embed a spreadsheet as an OLD obGect in a presentation' 1) %lace the cursor in the document and location you ant the OLD obGect to be. 2) /elect nsert < =bCect < =2# =bCect. The dialog in 5igure 2A2 opens.

$hapter #8 Lin4ing $alc Data

9-A

'igure 9&9: 0nsert OL) obIect dialog !ou can either create a ne OLD obGect or create from a file. To create a ne obGect' 1) /elect Create new and select the obGect type among the a+ailable options. 2) Clic0 =6. ,n empty container is placed in the slide. 3) Double.clic0 on the OLD obGect to enter the edit mode of the obGect. The application de+oted to handling that type of file ill open the obGect.
If the obGect inserted is handled by LibreOffice* then the transition to the program to manipulate the obGect ill be seamlessN in other cases the obGect opens in a ne indo and an option in the 5ile menu becomes a+ailable to update the obGect you inserted.

?ote

To insert an e6isting obGect' 1) To create from a file* select Create from file. The dialog changes to loo0 li0e 5igure 2A3. 2) To insert the obGect as a lin0* select the 2ink to file option. Other ise* the obGect ill be embedded. 3) Clic0 +earch* select the re@uired file in the Open dialog* then clic0 =pen. , section of the inserted file is sho n in the document.

'igure 9&3: 0nserting an obIect as a lin4

$hapter #8 Lin4ing $alc Data

9--

Ot"er OLE obAects


$nder 3indo s* the Insert OLD ObGect dialog has an e6tra entry* 'urther obIects. 1) Double.clic0 on the entry Further obCects to open the dialog sho n belo .

'igure 9&": 0nserting an OL) obIect under <indows 2) /elect Create ?ew to insert a ne obGect of the type selected in the ObGect Type list* or select Create from File to create a ne obGect from a file. 3) If you choose Create from File$ the dialog sho n in 5igure 2A1 opens. Clic0 7rowse and choose the file to insert. The inserted file obGect is editable by the 3indo s program that created it. If instead of inserting an obGect* you ant to insert a lin4 to an obGect* select the %isplay As con option.

'igure 9&%: 0nsert obIect from a file

.on'lin0ed OLE obAect


If the OLD obGect is not lin0ed* it can be edited in the ne document. 5or instance* if you insert a spreadsheet into a 3riter document* you can essentially treat it as a 3riter table & ith a little more po er). To edit it* double.clic0 on it.

$hapter #8 Lin4ing $alc Data

9-.

Lin0ed OLE obAect


3hen the spreadsheet OLD obGect is lin0ed* if you change it in 3riter it ill change in CalcN if you change it in Calc* it ill change in 3riter. This can be a +ery po erful tool if you create reports in 3riter using Calc data* and ant to ma0e a @uic0 change ithout opening Calc.

?ote

!ou can only edit one copy of a spreadsheet at a time. If you ha+e a lin0ed OLD spreadsheet obGect in an open 3riter document and then open the same spreadsheet in Calc* the Calc spreadsheet ill be a read.only copy.

%ynamic %ata #.change K%%#L


DD) is an acronym for Dynamic Data D6change* a mechanism hereby selected data in document , can be pasted into document B as a lin0ed* Lli+eM copy of the original. It ould be used* for e6ample* in a report ritten in 3riter containing time.+arying data* such as sales results sourced from a Calc spreadsheet. The DDD lin0 ensures that* as the source spreadsheet is updated so is the report* thus reducing the scope for error and reducing the or0 in+ol+ed in 0eeping the 3riter document up to date. DDD is a predecessor of OLD. 3ith DDD* obGects are lin0ed through file reference* but not embedded. !ou can create DDD lin0s either ithin Calc cells in a Calc sheet* or in Calc cells in another LibreOffice doc such as in 3riter.

**E lin0 in Calc


Creating a DDD lin0 in Calc is similar to creating a cell reference. The process is a little different* but the result is the same. 1) In Calc* select the cells that you ant to ma0e the DDD lin0 to. 2) Copy them' #dit < Copy or $trl5$. 3) "o to the place in the spreadsheet here you ant the lin0 to be. =) /elect #dit < Paste +pecial. B) 3hen the %aste /pecial dialog opens* select the 2ink option on the bottom left of the dialog &5igure 2AA). Clic0 =6. The cells no K=))@. reference the copied data* and the formula bar sho s a reference beginning ith

If you no edit the original cells* the lin0ed cells ill update.

'igure 9&&: Location of Lin4 option on Paste Special dialog in $alc

**E lin0 in Writer


The process for creating a DDD lin0 from Calc to 3riter is similar to creating a lin0 ithin Calc. 1) In Calc* select the cells to ma0e the DDD lin0 to. Copy them. 2) "o to the place in your 3riter document here you ant the DDD lin0. /elect #dit < Paste +pecial. 3) /elect %%# 2ink &5igure 2AE). Clic0 =6.
$hapter #8 Lin4ing $alc Data 9.8

#o the lin0 has been created in 3riter. 3hen the Calc spreadsheet is updated* the table in 3riter is automatically updated.

'igure 9&A: Paste Special dialog in <riter= with DD) lin4 selected

$hapter #8 Lin4ing $alc Data

9.#

$hapter ## Sharing and 3eviewing Documents

ntroduction
This chapter co+ers methods for editing shared documents' sharing &collaboration)* recording changes* adding comments* re+ie ing changes* merging and comparing documents* and sa+ing and using document +ersions. 7asic editing techni@ues are discussed in Chapter 2* Dntering* Dditing* and 5ormatting Data.

+haring documents KcollaborationL


In LibreOffice 3riter* Impress* and Dra * only one user at a time can open any document for editing. In Calc* many users can open the same spreadsheet for riting at the same time. Dach user ho ants to collaborate should be sure to enter a name on the ,ools < =ptions < 2ibre=ffice < *ser %ata page. /ome menu commands are not a+ailable &grayed out) is acti+ated. hen change trac0ing or document sharing

+etting up a spreadsheet for sharing


,t any time* you can set up a spreadsheet for sharing ith others. 3ith the spreadsheet document open* choose ,ools < +hare %ocument to acti+ate the collaboration features for this document. , dialog opens here you can enable or disable sharing.

'igure 9&-: $hoosing to share a spreadsheet To enable sharing* chec0 the bo6 at the top of the dialog* and then clic0 =6. If the spreadsheet has been sa+ed pre+iously* a message appears stating that you must sa+e it to acti+ate shared modeN clic0 Ies to continue. If the spreadsheet has not been sa+ed pre+iously* the /a+e dialog appears. ,fter sa+ing* the ord KsharedL is sho n on the title bar after the documentMs title. The ,ools < +hare %ocument command can be used to s itch the mode for a document from unshared to shared. 2o e+er* if you ant to use a shared document in unshared mode* you need to sa+e the shared document using another name or path. This creates a copy of the spreadsheet that is not shared.

$hapter ## Sharing and 3eviewing Documents

9."

=pening a shared spreadsheet


3hen you open a spreadsheet document that is in shared mode* a message appears stating that the document is in shared mode and that some features are not a+ailable in this mode. ,fter clic0ing =6* the document is opened in shared mode. !ou can select the option to not sho the arning again. The follo ing features are disabled in a shared spreadsheet document'
#dit < Changes* e6cept for 4erge %ocument #dit < Compare %ocument #dit < +heet < 4oveHCopy S %elete nsert < Cells < +hift Cells %own S +hift Cells 3ight nsert < +heet from file nsert < ?ames nsert < Comment nsert < Picture < From File nsert < 4ovie and +ound nsert < =bCect nsert < Chart nsert < Floating Frame Format < +heet < 3ename* ,ab Color Format < 4erge Cells < 4erge and Center* 4erge Cells* +plit Cells Format < Print 3anges ,ools < Protect %ocument %ata < %efine 3ange %ata < +ort %ata < +ubtotals %ata < >alidity %ata < 4ultiple =perations %ata < Consolidate %ata < (roup and =utline &all) %ata < Pivot ,able

+aving a shared spreadsheet


3hen you sa+e a shared spreadsheet* one of se+eral situations may occur'

If the document as not modified and sa+ed by another user since you opened it* the
document is sa+ed.

If the document as modified and sa+ed by another user since you opened it* one of the
follo ing e+ents ill occur'

If the changes do not conflict* the document is sa+ed* the message belo appears* and any cells modified by the other user are sho n ith a red border.

'igure 9&.: Update message after saving

If the changes conflict* the Hesol+e Conflicts dialog is sho n. !ou must decide for each conflict hich +ersion to 0eep* yours or the other personMs. 3hen all conflicts are resol+ed* the document is sa+ed. 3hile you are resol+ing the conflicts* no other user can sa+e the shared document.

$hapter ## Sharing and 3eviewing Documents

9.%

'igure 9A8: 3esolve $onflicts dialog

If another user is trying to sa+e the shared document and resol+e conflicts* you see a
message that the shared spreadsheet file is loc0ed due to a merge.in in progress. !ou can choose to cancel the /a+e command for no * or retry sa+ing later. 3hen you successfully sa+e a shared spreadsheet* the document sho s the latest +ersion of all changes sa+ed by all users.

3ecording changes
!ou can use se+eral methods to record changes that you or others ma0e to a document'

!ou can use change mar0s to sho added material* deleted material* and changes to
formatting. Later* you or another person can re+ie each change. #ot a+ailable in shared files. the document and accept or reGect

If you are not using file sharing* you can ma0e changes to a copy of the document &stored
in a different folder* under a different name* or both)* then use Calc to compare the files and sho the changes. /ee page 303.

!ou can sa+e +ersions that are stored as part of the original file. /ee page 30=.
He+ie ers can lea+e comments in the document* either attached to specific changes or standalone.

Preparing a document for review KoptionalL


This feature is not a+ailable in shared documents. 3hen you send a document to someone else to re+ie or edit* you may ant to set it up so that the editor or re+ie er does not ha+e to remember to turn on the re+ision mar0s. ,fter you ha+e turned on re+ision mar0s* you can optionally pass ord protect the document so that any user must enter the correct pass ord in order to turn off protection and accept or reGect changes. It is not necessary to pass ord protect the document hile preparing it for re+ie . 1) Open the document and ma0e sure that the #dit < Changes < 3ecord menu item has a chec0 mar0 ne6t to it* indicating that change recording is acti+e. !ou can also use File < Properties < +ecurity and select 3ecord changes.

$hapter ## Sharing and 3eviewing Documents

9.&

2) &Optional) Clic0 #dit < Changes < Protect 3ecords. On the Dnter %ass ord dialog* type a pass ord &t ice) and clic0 =6. !ou can also use File < Properties < +ecurity and clic0 the Protect button to open the Dnter %ass ord dialog.

dentifying copies of spreadsheets


3hen not using the document sharing feature* it is important to 0eep trac0 of the different copies of the document. This can be done either in the file name or in the file title. If you ha+e not pro+ided a file title in the spreadsheetMs properties* the spreadsheetMs file name is displayed in the title bar. To set the title of the spreadsheet* select File < Properties < %escription.

3ecording changes KtutorialL


5or this chapter e ill or0 ith a budget proposal for a baseball team.

!ou are the sponsor of a youth baseball team. The coach has submitted a budget to you for the season and you need to edit the costs and return it to her. !ou are concerned that if you Gust ma0e the changes* then the coach ill not see the changes you made. !ou decide to use Calc ith the record changes feature turned on* so that the coach can easily see the change you ha+e made.

5igure 2E1 sho s the budget spreadsheet your coach submitted.

'igure 9A#: Baseball budget spreadsheet Loo0ing o+er the figures* you see a fe places here money could be sa+ed'

%ost.game snac0s can be bought by parents. #e uniforms can aitN only buy 10 to replace damaged ones. 7uy cheaper baseballs. Only buy 2 spare glo+es.

To ma0e these changes* use the record changes feature in Calc. To start recording changes' 1) Open the 7udget /preadsheet. 2) /elect #dit < Changes < 3ecord from the menu bar. 3) 7egin editing the document.

$hapter ## Sharing and 3eviewing Documents

9.A

, colored border* ith a dot in the upper left.hand corner* appears around a cell here changes ere made &5igure 2E2). Other re+ie ers then @uic0ly 0no hich cells ere edited. , deleted column or ro is mar0ed by a hea+y colored bar.

'igure 9A9: )dited document with red border on changed cells

?ote

/ome changes* for e6ample cell formatting* are not recorded and mar0ed.

,ip

To change the color that indicates changes* select ,ools < =ptions < 2ibre=ffice Calc < Changes.

3hen you finish editing the document* you can send it to your coach. !ou may ant to e6plain your rationale for the changes. !ou can share your insight in t o ays' by adding comments to the changes you made* or by adding general comments to the spreadsheet.

Adding comments to changes


Calc automatically adds to any recorded change a comment that describes hat as changed &for e6ample* $ell B" changed from U.V to U"V). He+ie ers and authors can add their o n comments to e6plain their reasons for the changes. To add a comment to a change' 1) 4a0e the change to the spreadsheet. 2) /elect the cell ith the change. 3) Choose #dit < Changes < Comments. The dialog sho n in 5igure 2E3 appears.

'igure 9A3: 0nsert $omment dialog


$hapter ## Sharing and 3eviewing Documents 9.-

=) Type your comment and clic0 =6. The automatically.added comment pro+ided by Calc cannot be edited. ,fter you ha+e added a comment to a changed cell* you can see it by ho+ering the mouse pointer o+er the cell* as sho n in 5igure 2E=.

'igure 9A": $omment added to cell B3 The comment also appears in the dialog hen you are accepting and reGecting changes* as sho n in the first line of 5igure 2E< on page 302.

#diting change comments


1) /elect the cell ith the change comment that you ant to edit. 2) /elect #dit < Changes < Comments. 3) Ddit the comment and clic0 =6.

Adding other comments


Calc pro+ides another type of comments &formerly called JnotesK)* hich authors and re+ie ers often use to e6change ideas* as0 for suggestions* or brainstorm in the document. To add a comment' 1) /elect the cell that the comment applies to. 2) /elect nsert < Comment or right.clic0 and select nsert Comment. &The latter method does not or0 if the automatic spelling chec0er is acti+e and the cell contains a misspelled ord.) The bo6 sho n in 5igure 2EB appears.

'igure 9A%: 0nserting a comment 3) Type the te6t of your comment in the bo6* then clic0 outside the bo6 to close it. #o the cell to hich you added the comment has a colored dot in the upper right.hand corner* as sho n in 5igure 2EA. It does not ha+e a colored border* unless the cell as also changed.

$hapter ## Sharing and 3eviewing Documents

9..

'igure 9A&: $olored dot in cell containing a comment

,ip

!ou can change the colors Calc uses for notes by selecting ,ools < =ptions < 2ibre=ffice < Appearance.

To +ie the comment you Gust added* ho+er the mouse pointer o+er the cell that has a commentN the comment appears* as sho n belo .

'igure 9AA: Hiewing a comment

#diting comments
!ou can edit and format the te6t of a comment* Gust as you do for any other te6t. 1) Hight.clic0 on the cell containing the comment mar0er and choose +how comment from the conte6t menu. 2) /elect the comment* then double.clic0 on it. The cursor changes to the usual blin0ing te6t. entry cursor* and the 5ormatting toolbar changes to sho te6t attributes. 3) 3hen done* clic0 outside the comment to deselect it. To hide the comment again* right.clic0 on the cell and deselect +how Comment on the conte6t menu.

Formatting comments
!ou can change the bac0ground color* border style* transparency* and other attributes of a comment. 1) Hight.clic0 on the cell containing the comment mar0er* and choose +how comment from the conte6t menu. 2) Clic0 on the comment itself. The 5ormatting toolbar changes to sho many of the comment formatting options. These are the same as the options for formatting graphicsN see Chapter B* $sing "raphics in Calc* for more information. !ou can also right.clic0 on the comment to see a menu of choices* some of hich lead to dialogs in hich you can fine.tune the formattingN these dialogs are also discussed in Chapter B. 3) 3hen done* clic0 outside the comment to deselect it. To hide the comment again* right.clic0 on the cell and deselect +how Comment on the conte6t menu.

Finding comments using the ?avigator


The small comment mar0ers in the corners of cells can be difficult to see* so Calc pro+ides another ay to find them* by using the #a+igator. If any comments are in the spreadsheet* the #a+igator sho s a mar0 &usually a R or an arro ) ne6t to the ord Comments. Clic0 on this mar0 to display a
$hapter ## Sharing and 3eviewing Documents 388

list of comments. Double.clic0 on the comment you ith.

ant to Gump directly to the cell it is associated

3eviewing changes
,t this point* e are going to change our perspecti+e from the point of +ie of the team sponsor to that of the coach* so e can see ho to re+ie and accept or reGect the changes to the document the coach originally rote. !ou are the coach of a youth baseball team and you submitted a potential budget created in Calc to your team sponsor. !our sponsor has re+ie ed the document using the record changes feature of Calc. #o * you ant to re+ie those changes and accept or reGect the counter proposal. 7ecause the sponsor recorded changes in Calc* you can easily see hat changes ere made and decide ho to act.

>iewing changes
!ou ha+e some control o+er hat changes you see hen re+ie ing a document. /elect #dit < Changes < +how from the 4enu bar. The /ho Changes dialog 5igure 2E-) opens.

'igure 9A-: Show changes dialog

Accepting or reCecting changes


3hen you recei+e a document bac0 ith changes* the beauty of the recording changes system becomes e+ident. #o * as the original author* you can step through each change and decide ho to proceed. To begin this process' 1) Open the edited document. 2) /elect #dit < Changes < Accept or 3eCect. The dialog sho n in 5igure 2E< appears. 3) !ou can step through the changes one at a time* choosing to accept or reGect each change as you go through. !ou can also accept or reGect all changes at one time.

$hapter ## Sharing and 3eviewing Documents

38#

'igure 9A.: ,ccept or 3eIect changes dialog The $omment column by default contains an e6planation of the change that as made. If the re+ie er added a comment to the change* it is displayed* follo ed by the description of the change* as in the first line of 5igure 2E<. If a change has been superceded by later change &by either the same person or another person)* the changes are hierarchically arranged ith a plus sign for opening up the hierarchy. 7elo the list of changes to be accepted or reGected are sho n any changes that ha+e pre+iously been dealt ith. On the 5ilter tab of this dialog &5igure 2-0)* you can choose ho to filter the list of changes' by date* author* cell range* or comments containing specific terms. ,fter selecting the filter criteria* s itch bac0 to the List tab to see the results.

'igure 9-8: 'ilters set here affect the list of changes shown on the List tab

$hapter ## Sharing and 3eviewing Documents

389

4erging documents
!ou submitted your budget proposal to your sponsor* but you sent it to one of your assistant coaches as ell. 7oth of them returned their re+ised budget to you at the same time. !ou could re+ie each document and the changes separately* but to sa+e time* you ant to see both of their re+isions simultaneously. To do this* you can use CalcMs merge document feature. The processes discussed to this point are effecti+e hen you ha+e one re+ie er at a time. /ometimes* ho e+er* multiple re+ie ers all return edited +ersions of a document at the same time. In this case* it may be @uic0er to re+ie all of these changes at once* rather than one re+ie at a time. 5or this purpose* you can merge documents in Calc. To merge documents* all of the edited documents need to ha+e recorded changes in them. 1) Open the original document. 2) /elect #dit < Changes < 4erge %ocument. 3) , file selection dialog opens. /elect a file you ant to merge and clic0 =6. =) ,fter the documents merge* the ,ccept or HeGect Changes dialog opens* sho ing changes by more than one re+ie er. If you ant to merge more documents* close the dialog and then repeat steps 2 and 3. #o all of the changes are combined into one document and you can accept or reGect the changes. Changes from different authors appear in cells outlined in different colors* as sho n in 5igure 2-1. In this e6ample* all of the changes from Hobert are outlined in blue and the changes from 4ia are outlined in red.

'igure 9-#: :erged documents with different author colors

Comparing documents
/ometimes hen sharing documents* re+ie ers may forget to record the changes they ma0e. This is not a problem ith Calc* because Calc can find the changes by comparing documents. In order to compare documents you need to ha+e the original document and the one that is edited. To compare them' 1) Open the edited document that you ant to compare ith the original document. 2) /elect #dit < Compare %ocument.

$hapter ## Sharing and 3eviewing Documents

383

3) ,n open document dialog appears. /elect the original document and clic0 nsert. Calc finds and mar0s the changes as follo s'

,ll data that occurs in the edited document but not in the original is identified as inserted. ,ll data that is in your original document but is not in the edited document is identified as
deleted.

,ll data that is changed* is mar0ed as changed.


5rom this point you can go through and accept or reGect changes as you could normally.

+aving versions
4ost documents go through many drafts. It is often useful to sa+e ne +ersions of a document. !ou can do this by sa+ing a copy of the document &under a different name) after each re+ision* or by using CalcMs +ersion feature.

Caution

If you do a +ave As... of a document ith different +ersions stored in it* the old +ersions are not sa+ed in the ne file.

To use +ersion management in Calc' 1) Choose File < >ersions. The Cersions dialog opens.

'igure 9-9: Hersion management dialog 2) Clic0 the +ave ?ew >ersion button to sa+e a ne +ersion. 3) , dialog opens here you can enter comments about this +ersion.

$hapter ## Sharing and 3eviewing Documents

38"

'igure 9-3: Hersion comment dialog =) ,fter you enter your comment and clic0 =6* the ne +ersion is included in the +ersion list.

'igure 9-": Updated version list #o hen you sa+e the file* both +ersions are sa+ed in the same file. 5rom this point you can'

Open an old +ersion X /elect the +ersion and clic0 the =pen button and a read.only copy
of a pre+ious +ersion opens.

Compare all +ersions X Clic0ing the Compare button performs an action similar to merging
documents together. ,n ,ccept or HeGect Changes dialog opens sho ing all of the changes through the different +ersions.

He+ie the comments X /elect a +ersion and clic0 the +how button to display the full
comments made by yourself or other re+ie ers.

?ote

The ne file is larger* as if t o spreadsheets ere sa+ed together.

$hapter ## Sharing and 3eviewing Documents

38%

$hapter #9 $alc :acros


,utomating repetitive tas4s

ntroduction
, macro is a sa+ed se@uence of commands or 0eystro0es that are stored for later use. ,n e6ample of a simple macro is one that JtypesK your address. The LibreOffice macro language is +ery fle6ible* allo ing automation of both simple and comple6 tas0s. 4acros are especially useful to repeat a tas0 the same ay o+er and o+er again. This chapter briefly discusses common problems related to macro programming using Calc.

*sing the macro recorder


Chapter 13 of the Getting Started guide* "etting /tarted ith 4acros* pro+ides a basis for understanding the general macro capabilities in LibreOffice using the macro recorder. ,n e6ample is sho n here ithout the e6planations in the Getting Started guide. The follo ing steps create a macro that performs paste special ith multiply.

,ip

$se ,ools < =ptions < 2ibre=ffice < Advanced and select the #nable macro recording option to enable the macro recorder.

1) Open a ne spreadsheet. 2) Dnter numbers into a sheet.

'igure 9-%: )nter numbers 3) /elect cell ,3* hich contains the number 3* and copy the +alue to the clipboard. =) /elect the range ,1'C3. B) $se ,ools < 4acros < 3ecord 4acro to start the macro recorder. The Hecord 4acro dialog is displayed ith a stop recording button.

'igure 9-&: Stop recording button A) $se #dit < Paste +pecial to open the %aste /pecial dialog &5igure 2-E).

'igure 9-A: Paste Special dialog


$hapter #9 $alc :acros 38-

E) /et the operation to 4ultiply and clic0 =6. The cells are no multiplied by 3 &5igure 2--).

'igure 9--: $ells multiplied b2 3 -) Clic0 +top 3ecording to stop the macro recorder. The LibreOffice 7asic 4acros dialog &5igure 2-<) opens.

1 4y 4acros " LibreOffice 4acros ' Open documents & Create ne library

! Create ne module in library - 4acros in selected library 7 Current document ) D6pand(collapse list

'igure 9-.: Parts of the LibreOffice Basic :acros dialog <) /elect the current document. 5or this e6ample* it is Untitled #. D6isting documents sho a library named /tandard. This library is not created until the document is sa+ed or the library is needed* so at this point your ne document does not contain a library. !ou can create a ne library to contain the macro* but this is not necessary. 10) Clic0 ?ew 4odule. If no libraries e6ist* then the /tandard library is automatically created and used. In the #e 4odule dialog* type a name for the ne module or lea+e the name as 4odule1.

$hapter #9 $alc :acros

38.

?ote

The libraries* modules and macro names must follo some strict rules. 5ollo ing the main rules* the names must' 7egin ith a letter

#ot contain spaces #ot contain special caracters* accents included* e6cept for P &underscore)

11) Clic0 =6 to create a ne module named 4odule1. /elect the ne ly created 4odule1* type ,a%!$-u#!i(#. in the :acro name bo6 at the upper left* and clic0 +ave. &/ee 5igure 2<0.)

'igure 9.8: Select the module and name the macro The created macro is sa+ed in 4odule1 of the /tandard library in the Untitled # document. Listing 1 sho s the contents of the macro. Listing #. Paste special with multipl2.
s-7 P#steM-/t ./8 *e: CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC *e: de+ ,e v#* #7/es d : doc-:e,t #s o7Lect d : d s.#tche* #s o7Lect *e: CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC *e: "et #ccess to the doc-:e,t doc-:e,t = 9h s(o:.o,e,t.(-**e,t(o,t*o//e*.F*#:e d s.#tche* = c*e#teU,oSe*v ce("co:.s-,.st#*.+*#:e.) s.#tchGe/.e*") *e: CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC d : #*"s1(>) #s ,e1 co:.s-,.st#*.7e#,s.P*o.e*t8?#/-e #*"s1(0).!#:e = "F/#"s" #*"s1(0).?#/-e = "A" #*"s1(1).!#:e = "Fo*:-/#(o::#,d" #*"s1(1).?#/-e = 3 #*"s1(2).!#:e = "SH .@:.t8(e//s"

$hapter #9 $alc :acros

3#8

#*"s1(2).?#/-e = +#/se #*"s1(3).!#:e = "9*#,s.ose" #*"s1(3).?#/-e = +#/se #*"s1(5).!#:e = "AsM ,H" #*"s1(5).?#/-e = +#/se #*"s1(>).!#:e = "MoveMode" #*"s1(>).?#/-e = 5 d s.#tche*.exec-te) s.#tch(doc-:e,t, ".-,o0I,se*t(o,te,ts", "", 0, #*"s1()) e,d s-7

4ore detail on recording macros is pro+ided in Chapter 13* "etting /tarted ith 4acros* in the Getting Started guideN e recommend you read it if you ha+e not already done so. 4ore detail is also pro+ided in the follo ing sections* but not as related to recording macros.

8rite your own functions


Calc can call macros as Calc functions. $se the follo ing steps to create a simple macro' 1) Create a ne Calc document named (#/c9estM#c*os.ods. 2) $se ,ools < 4acros < =rgani5e 4acros < 2ibre=ffice 7asic to open the LibreOffice 7asic 4acros dialog. The :acro from bo6 lists a+ailable macro library containers including currently open LibreOffice documents. :2 :acros contains macros that you rite or add to LibreOffice. LibreOffice :acros contains macros included ith LibreOffice and should not be changed.

'igure 9.#: LibreOffice Basic :acros dialog

$hapter #9 $alc :acros

3##

3) Clic0 4anage to open the LibreOffice 7asic 4acro OrganiFer dialog &5igure 2<2). On the Libraries tab* select the document to contain the macro.

'igure 9.9: LibreOffice Basic :acro Organi1er =) Clic0 ?ew to open the #e Library dialog.

'igure 9.3: @ew Librar2 dialog B) Dnter a descripti+e library name &such as ,uthorsCalc4acros) and clic0 =6 to create the library. The ne library name is sho n in the library list* but the dialog may sho only a portion of the name.

'igure 9.": (he librar2 is shown in the organi1er

$hapter #9 $alc :acros

3#9

A) /elect ,uthorsCalc4acros and clic0 #dit to edit the library. Calc automatically creates a module named 4odule1 and a macro named 4ain.

'igure 9.%: Basic 0ntegrated Development )nvironment 60D)7 E) 4odify the code so that it is the same as that sho n in Listing 2.The important addition is the creation of the !-:7e*F ve function* hich returns the number fi+e. The <.t o, @x./ c t statement forces all +ariables to be declared before they are used. If Option D6plicit is omitted* +ariables are automatically defined at first use as type Cariant. -) /a+e the modified 4odule1. Listing 9. 'unction that returns five.
=@M ***** BASI( <.t o, @x./ c t S-7 M# , @,d S-7 F-,ct o, !-:7e*F ve() !-:7e*F ve = > @,d F-,ct o, *****

*sing a macro as a function


$sing the ne ly created Calc document (#/c9estM#c*os.ods* enter the formula =!-:7e*F ve() &see 5igure 2<A). Calc finds the macro and calls it.

$hapter #9 $alc :acros

3#3

'igure 9.&: Use the @umber'ive67 :acro as a $alc function


5unction names are not case sensiti+e. In 5igure 2<A* you can enter =!-:7e*F ve() and Calc clearly sho s =!UMB@=FI?@().

,ip

/a+e the Calc document* close it* and open it again. Depending on your settings in ,ools < =ptions < 2ibre=ffice < +ecurity < 4acro +ecurity* Calc ill display the arning sho n in 5igure 2<E or the one sho n in 5igure 2<-. !ou ill need to clic0 #nable 4acros* or Calc ill not allo any macros to be run inside the document. If you do not e6pect a document to contain a macro* it is safer to clic0 %isable 4acros in case the macro is a +irus.

'igure 9.A: LibreOffice warns 2ou that a document contains macros

'igure 9.-: <arning if macros are disabled If you choose to disable macros* then function. hen the document loads* Calc can no longer find the

$hapter #9 $alc :acros

3#"

'igure 9..: (he function is gone 3hen a document is created and sa+ed* it automatically contains a library named /tandard. The /tandard library is automatically loaded hen the document is opened. #o other library is automatically loaded. Calc does not contain a function named #umber5i+e&)* so it chec0s all opened and +isible macro libraries for the function. Libraries in LibreOffice :acros* :2 :acros* and the Calc document are chec0ed for an appropriately named function &see 5igure 2<1). The #umber5i+e&) function is stored in the ,uthorsCalc4acros library* hich is not automatically loaded hen the document is opened. $se ,ools < 4acros < =rgani5e 4acros < 2ibre=ffice 7asic to open the LibreOffice 7asic 4acros dialog &see 5igure 300). D6pand CalcTest4acros and find ,uthorsCalc4acros. The icon for a loaded library is a different color from the icon for a library that is not loaded. Clic0 the e6pansion symbol &usually a plus or a triangle) ne6t to ,uthorsCalc4acros to load the library. The icon changes color to indicate that the library is no loaded. Clic0 Close to close the dialog. $nfortunately* the cells containing Y#umber5i+e&) are in error. Calc does not recalculate cells in error unless you edit them or someho change them. The usual solution is to store macros used as functions in the /tandard library. If the macro is large or if there are many macros* a stub ith the desired name is stored in the /tandard library. The stub macro loads the library containing the implementation and then calls the implementation. 1) $se ,ools < 4acros < =rgani5e 4acros < 2ibre=ffice 7asic to open the LibreOffice 7asic 4acros dialog. /elect the #umber5i+e macro and clic0 #dit to open the macro for editing.

'igure 388: Select a macro and clic4 )dit 2) Change the name of #umber5i+e to #umber5i+ePImplementation &Listing 3). Listing 3. $hange the name of @umber'ive to @umber'iveM0mplementation
F-,ct o, !-:7e*F ve2I:./e:e,t#t o,() !-:7e*F ve2I:./e:e,t#t o,() = > @,d F-,ct o, $hapter #9 $alc :acros 3#%

3) In the 7asic IDD &see 5igure 2<B)* ho+er the mouse cursor o+er the toolbar buttons to display the tool tips. Clic0 the +elect 4acro button to open the LibreOffice 7asic 4acros dialog &see 5igure 300). =) /elect the /tandard library in the CalcTest4acros document and clic0 ?ew to create a ne module. Dnter a meaningful name such as Calc5unctions and clic0 =6. LibreOffice automatically creates a macro named 4ain and opens the module for editing. B) Create a macro in the /tandard library that calls the implementation function &see Listing =). The ne macro loads the ,uthorsCalc4acros library if it is not already loaded* and then calls the implementation function. A) /a+e* close* and reopen the Calc document. This time* the #umber5i+e&) function or0s. Listing ". $hange the name of @umber'ive to @umber'iveM0mplementation.
F-,ct o, !-:7e*F ve() I+ !<9 B#s cM 7*#* es. sM 7*#*8Mo#ded("A-tho*s(#/cM#c*os") 9he, B#s cM 7*#* es.Mo#dM 7*#*8("A-tho*s(#/cM#c*os") @,d I+ !-:7e*F ve = !-:7e*F ve2I:./e:e,t#t o,() @,d F-,ct o,

Passing arguments to a macro


To illustrate a function that accepts arguments* e ill rite a macro that calculates the sum of its arguments that are positi+e it ill ignore arguments that are less than Fero &see Listing B). Listing %. PositiveSum calculates the sum of the positive arguments.
F-,ct o, Pos t veS-:(<.t o,#/ x) ) : 9heS-: As )o-7/e ) : =o1 As I,te"e* ) : (o/ As I,te"e* 9heS-: = 0.0 I+ !<9 IsM ss ,"(x) 9he, I+ !<9 IsA**#8(x) 9he, I+ x > 0 9he, 9heS-: = x @/se Fo* =o1 = MBo-,d(x, 1) 9o UBo-,d(x, 1) Fo* (o/ = MBo-,d(x, 2) 9o UBo-,d(x, 2) I+ x( =o1, (o/) > 0 9he, 9heS-: = 9heS-: + x( =o1, !ext !ext @,d I+ @,d I+ Pos t veS-: = 9heS-: @,d F-,ct o,

(o/)

The macro in Listing B demonstrates some important techni@ues' 1) The argument x is optional. 3hen an argument is not optional and the function is called ithout it* LibreOffice prints a arning message e+ery time the macro is called. If Calc calls the function many times* then the error is displayed many times. 2) IsM ss ," chec0s that an argument as passed before the argument is used. 3) IsA**#8 chec0s to see if the argument is a single +alue* or an array. 5or e6ample* =Pos t veS-:(&) or =Pos t veS-:(A5). In the first case* the number E is passed as an argument* and in the second case* the +alue of cell ,= is passed to the function. =) If a range is passed to the function* it is passed as a t o.dimensional array of +aluesN for e6ample* =Pos t veS-:(A20B>). MBo-,d and UBo-,d are used to determine the

$hapter #9 $alc :acros

3#&

array bounds that are used. ,lthough the lo er bound is one* it is considered safer to use MBo-,d in case it changes in the future.
The macro in Listing B is careful and chec0s to see if the argument is an array or a single argument. The macro does not +erify that each +alue is numeric. !ou may be as careful as you li0e. The more things you chec0* the more robust the macro is* and the slo er it runs.

,ip

%assing one argument is as easy as passing t o' add another argument to the function definition &see Listing A). 3hen calling a function ith t o arguments* separate the arguments ith a semicolonN for e6ample* =9estM#x(3P C5). Listing &. (est:a* accepts two arguments and returns the larger of the two.
F-,ct o, 9estM#x(x, 8) I+ x >= 8 9he, 9estM#x = x @/se 9estM#x = 8 @,d I+ @,d F-,ct o,

Arguments are passed as values


,rguments passed to a macro from Calc are al ays +alues. It is not possible to 0no hat cells* if any* are used. 5or e6ample* =Pos t veS-:(A3) passes the +alue of cell ,3* and %ositi+e/um has no ay of 0no ing that cell ,3 as used. If you must 0no hich cells are referenced rather than the +alues in the cells* pass the range as a string* parse the string* and obtain the +alues in the referenced cells.

8riting macros that act like built/in functions


,lthough Calc finds and calls macros as normal functions* they do not really beha+e as built.in functions. 5or e6ample* macros do not appear in the function lists. It is possible to rite functions that beha+e as regular functions by riting an ,dd.In. 2o e+er* this is an ad+anced topic that is not co+ered here.

Accessing cells directly


!ou can access the LibreOffice internal obGects directly to manipulate a Calc document. 5or e6ample* the macro in Listing E adds the +alues in cell ,2 from e+ery sheet in the current document. 9h s(o:.o,e,t is set by /tar7asic hen the macro starts to reference the current document. , Calc document contains sheets' 9h s(o:.o,e,t."etSheets(). $se "et(e//B8Pos t o,(co/, *o1) to return a cell at a specific ro and column. Listing A. ,dd cell ,9 in ever2 sheet.
F-,ct ) : ) : ) : ) : ) : o, S-:(e//sA//Sheets() 9heS-: As )o-7/e As ,te"e* oSheets oSheet o(e//

$hapter #9 $alc :acros

3#A

oSheets = 9h s(o:.o,e,t."etSheets() Fo* = 0 9o oSheets."et(o-,t() C 1 oSheet = oSheets."etB8I,dex( ) o(e// = oSheet."et(e//B8Pos t o,(0, 1) 6 %et(e// A2 9heS-: = 9heS-: + o(e//."et?#/-e() !ext S-:(e//sA//Sheets = 9heS-: @,d F-,ct o,

,ip

, cell obGect supports the methods "et?#/-e()* "etSt* ,"()* and "etFo*:-/#() to get the numerical +alue* the string +alue* or the formula used in a cell. $se the corresponding set functions to set appropriate +alues.

$se oSheet."et(e//=#,"eB8!#:e("A2") to return a range of cells by name. If a single cell is referenced* then a cell obGect is returned. If a cell range is gi+en* then an entire range of cells is returned &see Listing -). #otice that a cell range returns data as an array of arrays* hich is more cumbersome than treating it as an array ith t o dimensions as is done in Listing B. Listing -. ,dd cell ,9:$% in ever2 sheet
F-,ct ) : ) : ) : ) : o, S-:(e//sA//Sheets() 9heS-: As )o-7/e =o1 As I,te"e*, (o/ As I,te"e*, oSheets, oSheet, o(e//s o=o1(), o=o1s()

As I,te"e*

oSheets = 9h s(o:.o,e,t."etSheets() Fo* = 0 9o oSheets."et(o-,t() C 1 oSheet = oSheets."etB8I,dex( ) o(e//s = oSheet."et(e//=#,"eB8!#:e("A20(>") =@M "et)#t#A**#8() *et-*,s the d#t# #s v#* #,t so st* ,"s =@M #*e #/so *et-*,ed. =@M "et)#t#() *et-*,s d#t# d#t# #s t8.e )o-7/e, so o,/8 =@M ,-:7e*s #*e *et-*,ed. o=o1s() = o(e//s."et)#t#() Fo* =o1 = MBo-,d(o=o1s()) 9o UBo-,d(o=o1s()) o=o1() = o=o1s( =o1) Fo* (o/ = MBo-,d(o=o1()) 9o UBo-,d(o=o1()) 9heS-: = 9heS-: + o=o1( (o/) !ext !ext !ext S-:(e//sA//Sheets = 9heS-: @,d F-,ct o,

,ip

3hen a macro is called as a Calc function* the macro cannot modify any +alue in the sheet from hich the macro as called* e6cept the +alue of the cell that contains the function.

$hapter #9 $alc :acros

3#-

+orting
Consider sorting the data in 5igure 301. 5irst* sort on column 7 descending and then column , ascending.

'igure 38#: Sort column B descending and column , ascending The e6ample in Listing <* ho e+er* demonstrates ho to sort on t o columns. Listing .. Sort cells ,#:$% on Sheet #.
S-7 So*t=#,"e ) : oSheet ) : o(e//=#,"e =@M =@M =@M =@M ) : 6 (#/c sheet co,t# , ," d#t# to so*t. 6 )#t# *#,"e to so*t.

A, #**#8 o+ so*t + e/ds dete*: ,es the co/-:,s th#t #*e so*ted. 9h s s #, #**#8 1 th t1o e/e:e,ts, 0 #,d 1. 9o so*t o, o,/8 o,e co/-:,, -se0 ) : oSo*tF e/ds(0) As !e1 co:.s-,.st#*.-t /.So*tF e/d oSo*tF e/ds(1) As !e1 co:.s-,.st#*.-t /.So*tF e/d

=@M 9he so*t desc* .to* s #, #**#8 o+ .*o.e*t es. =@M 9he .* :#*8 .*o.e*t8 co,t# ,s the so*t + e/ds. ) : oSo*t)esc(0) As !e1 co:.s-,.st#*.7e#,s.P*o.e*t8?#/-e =@M %et the sheet ,#:ed "Sheet1" oSheet = 9h s(o:.o,e,t.Sheets."etB8!#:e("Sheet1") =@M %et the ce// *#,"e to so*t o(e//=#,"e = oSheet."et(e//=#,"eB8!#:e("A10(>") =@M Se/ect the *#,"e to so*t. =@M 9he o,/8 .-*.ose 1o-/d 7e to e:.h#s Ne the so*ted d#t#. 69h s(o:.o,e,t."et(-**e,t(o,t*o//e*.se/ect(o(e//=#,"e) =@M 9he co/-:,s #*e ,-:7e*ed =@M co/-:, A s 0, co/-:, B =@M So*t co/-:, B (co/-:, 1) oSo*tF e/ds(0).F e/d = 1 oSo*tF e/ds(0).So*tAsce,d ," st#*t ," 1 th 0, so s 1, etc. desce,d ,". = FAMS@

=@M I+ co/-:, B h#s t1o ce//s 1 th the s#:e v#/-e, =@M the, -se co/-:, A #sce,d ," to dec de the o*de*. oSo*tF e/ds(1).F e/d = 0 oSo*tF e/ds(1).So*tAsce,d ," = 9*-e =@M Set-. the so*t desc* .to*. oSo*t)esc(0).!#:e = "So*tF e/ds" oSo*t)esc(0).?#/-e = oSo*tF e/ds() =@M So*t the *#,"e. o(e//=#,"e.So*t(oSo*t)esc()) @,d S-7 $hapter #9 $alc :acros 3#.

Conclusion
This chapter pro+ides a brief o+er+ie on ho to create libraries and modules* using the macro recorder* using macros as Calc functions* and riting your o n macros ithout the macro recorder. Dach topic deser+es at least one chapter* and riting your o n macros for Calc could easily fill an entire boo0. In other ords* this is Gust the beginning of hat you can learnl

$hapter #9 $alc :acros

398

$hapter #3 $alc as a Simple Database


, guide for users and macro programmers

ntroduction
, Calc document is a +ery capable database* pro+iding sufficient functionality to satisfy the needs of many users. This chapter presents the capabilities of a Calc document that ma0e it suitable as a database tool. 3here applicable* the functionality is e6plained using both the "$I &"raphical $ser Interface) and macros.
,lthough this document as initially created for macro programmers* the content should be accessible to all users. If you do not use macros* then s0ip those portions that deal ith macros. On the other hand* if you ant to learn more about macros* be sure to chec0 out ,ndre %itonya0Ms boo0 OpenOffice.org :acros )*plained.

?ote

In a database* a record is a group of related data items treated as a single unit of information. Dach item in the record is called a field. , table consists of records. Dach record in a table has the same structure. , table can be +isualiFed as a series of ro s and columns. Dach ro in the table corresponds to a single record and each column corresponds to the fields. , spreadsheet in a Calc document is similar in structure to a database table. Dach cell corresponds to a single field in a database record. 5or many people* Calc implements sufficient database functionality that no other database program or functionality is re@uired. 3hile teaching* a spreadsheet might be used as a grading program. Dach ro represents a single student. The columns represent the grades recei+ed on home or0* labs* and tests &see Table <). The strong calculation capability pro+ided in a spreadsheet ma0es this an e6cellent choice. (able .. Simple grading spreadsheet

A
1 " ' & ! 7 ) 0 11 11 1" 1' 1& 1! 1#ame ,ndy 7etty 7ob 7randy 5ran0 5red Ilsub 1ames Lisa 4ichelle Ha+i /al Ted Tom 3hil

7
Test 1 <B -E <B =B <B -E E0 =B 100 100 -E =B 100 E0 E0

C
Test 2 <3 <2 <3 AB <3 <2 -B AB <E <E <2 AB <E -B -B

%
IuiF 1 <3 AB <3 <2 -B AB <E <E 100 100 -A 100 100 <3 <3

#
IuiF 2 <2 E3 <2 -B <2 E3 E< -B <3 AB <3 <2 -B AB <E

F
,+erage <3.2B E<.2B <3.2B E1.EB <1.2B E<.2B -2.EB E3 <E.B <0.B -<.B EB.B <B.B E-.2B -A.2B

(
"rade

,ip

,lthough the choice to associate a ro ith a record rather than a column is arbitrary* it is almost uni+ersal. In other ords* you are not li0ely to hear someone refer to a column of data as a single database record.

$hapter #3 $alc as a Simple Database

399

Associating a range with a name


In a Calc document* a range refers to a contiguous group of cells containing at least one cell. !ou can associate a meaningful name to a range* hich allo s you to refer to the range using the meaningful name. !ou can create either a database range* hich has some database.li0e functionality* or a named range* hich does not. , name is usually associated ith a range for one of three reasons' 1) ,ssociating a range ith a name enhances readability by using a meaningful name. 2) If a range is referenced by name in multiple locations* you can point the name to another location and all references point to the ne location. 3) Hanges associated to a name are sho n in the #a+igator* hich is a+ailable by pressing the '% 0ey or clic0ing on the associated ranges. icon. The #a+igator allo s for @uic0 na+igation to the

?amed range
The most common usage of a named range is* as its name implies* to associate a range of cells ith a meaningful name. 5or e6ample* create a range named Scores* and then use the follo ing e@uation' =SUM(Sco*es). To create a named range* select the range to define. $se nsert < ?ames < %efine to open the Define #ames dialog. $se the Define #ames dialog to add and modify one named range at a time.

'igure 389: Define a named range In a macro* a named range is accessed* created* and deleted using the #amedHanges property of a Calc document. $se the methods has7y#ame&name) and get7y#ame&name) to +erify and retrie+e a named range. The method getDlement#ames&) returns an array containing the names of all named ranges. The #amedHanges obGect supports the method add#e 7yname* hich accepts four argumentsN the name* content* position* and type. The macro in Listing 10 creates a named range* if it does not e6ist* that references a range of cells.
$hapter #3 $alc as a Simple Database 393

Listing #8. $reate a named range that references WSheet#.WBW3:WDW&.


S-7 ) ) ) ) ) Add!#:ed=#,"e() : o=#,"e 6 9he c*e#ted *#,"e. : o=#,"es 6 A// ,#:ed *#,"es. : s!#:eJ 6 !#:e o+ the ,#:ed *#,"e to c*e#te. : o(e// 6 (e// o7Lect. : sJ

s!#:eJ = "M8!=#,"e" o=#,"es = 9h s(o:.o,e,t.!#:ed=#,"es I+ !<9 o=#,"es.h#sB8!#:e(s!#:eJ) 9he, =@M <7t# , the ce// #dd*ess 78 o7t# , ," the ce// =@M #,d the, ext*#ct ," the #dd*ess +*o: the ce//. ) : o(e//Add*ess As ,e1 co:.s-,.st#*.t#7/e.(e//Add*ess o(e//Add*ess.Sheet = 0 69he + *st sheet. o(e//Add*ess.(o/-:, = 1 6(o/-:, B. o(e//Add*ess.=o1 = 2 6=o1 3. =@M 9he + *st #*"-:e,t s the *#,"e ,#:e. =@M 9he seco,d #*"-:e,t s the +o*:-/# o* ex.*ess o, to -se. =@M 9he seco,d #*"-:e,t s -s-#//8 # st* ," th#t =@M de+ ,es # *#,"e. =@M 9he th *d #*"-:e,t s.ec + es the 7#se #dd*ess +o* =@M *e/#t ve ce// *e+e*e,ces. =@M 9he +o-*th #*"-:e,t s # set o+ +/#"s th#t de+ ,e =@M ho1 the *#,"e s -sed, 7-t :ost *#,"es -se 0. =@M 9he +o-*th #*"-:e,t -ses v#/-es +*o: the =@M !#:ed=#,"eF/#" co,st#,ts (see 9#7/e 10). sJ = "JSheet1.JBJ30J)J$" o=#,"es.#dd!e1B8!#:e(s!#:eJ, sJ, o(e//Add*ess, 0) @,d I+ =@M %et # *#,"e -s ," the c*e#ted ,#:ed *#,"e. o=#,"e = 9h s(o:.o,e,t.!#:ed=#,"es."etB8!#:e(s!#:eJ) =@M P* ,t the st* ," co,t# ,ed , ce// JSheet1.JBJ3 o(e// = o=#,"e."et=e+e**ed(e//s()."et(e//B8Pos t o,(0,0) P* ,t o(e//."etSt* ,"() @,d S-7

The method add#e 7yname&) accepts four argumentsN the name* content* position* and type. The fourth argument to the method add#e 7y#ame&) is a combination of flags that specify ho the named range ill be used &see Table 10). The most common +alue is 0* hich is not a defined constant +alue.

$hapter #3 $alc as a Simple Database

39"

(able #8: com.sun.star.sheet.@amed3ange'lag constants. ;alue


1 2 = -

.a(e
5ILTDHPCHITDHI, %HI#TP,HD, COL$4#P2D,DDH HO3P2D,DDH

*escription
The range contains filter criteria. The range can be used as a print range. The range can be used as column headers for printing. The range can be used as ro headers for printing.

The third argument* a cell address* acts as the base address for cells referenced in a relati+e ay. If the cell range is not specified as an absolute address* the referenced range ill be different based on here in the spreadsheet the range is used. The relati+e beha+ior is illustrated in Listing 11* hich also illustrates another usage of a named rangecdefining an e@uation. The macro in Listing 11 creates the named range Add2eft* hich refers to the e@uation A3+B3 ith C3 as the reference cell. The cells ,3 and 73 are the t o cells directly to the left of C3* so* the e@uation =AddMe+t() calculates the sum of the t o cells directly to the left of the cell that contains the e@uation. Changing the reference cell to C=* hich is belo ,3 and 73* causes the ,ddLeft e@uation to calculate the sum of the t o cells that are to the left on the pre+ious ro . Listing ##. $reate the ,ddLeft named range.
S-7 ) ) ) ) ) Add!#:edF-,ct o,() : oSheet 6Sheet th#t co,t# ,s the ,#:ed *#,"e. : o(e//Add*ess 6Add*ess +o* *e/#t ve *e+e*e,ces. : o=#,"es 69he !#:ed=#,"es .*o.e*t8. : o=#,"e 6S ,"/e ce// *#,"e. : s!#:e As St* ," 6!#:e o+ the eO-#t o, to c*e#te.

s!#:e = "AddMe+t" o=#,"es = 9h s(o:.o,e,t.!#:ed=#,"es I+ !<9 o=#,"es.h#sB8!#:e(s!#:e) 9he, oSheet = 9h s(o:.o,e,t."etSheets()."etB8I,dex(0) o=#,"e = oSheet."et(e//=#,"eB8!#:e("(3") o(e//Add*ess = o=#,"e."et(e//Add*ess() o=#,"es.#dd!e1B8!#:e(s!#:e, "A3+B3", o(e//Add*ess, 0) @,d I+ @,d S-7

,ip

Listing 11 illustrates t o capabilities that are not idely 0no n. , named range can define a function. ,lso* the third argument acts as the base address for cells referenced in a relati+e ay.

/elect the range containing the headers and the data and then use nsert < ?ames < Create to open the Create #ames dialog &see 5igure 303)* hich allo s you to simultaneously create multiple named ranges based on the top ro * bottom ro * right column or left column. If you choose to create ranges based on the top ro * one named range is created for each column headercthe header is not included in the named range. ,lthough the header is not included in the range* the te6t in the header is used to name the range.

$hapter #3 $alc as a Simple Database

39%

'igure 383: $reate a named range The macro in Listing 12 creates three named ranges based on the top ro of a named range. Listing #9. $reate man2 named ranges.
S-7 ) ) ) ) AddM#,8!#:ed=#,"es() : oSheet 6Sheet th#t co,t# ,s the ,#:ed *#,"e. : oAdd*ess 6=#,"e #dd*ess. : o=#,"es 69he !#:ed=#,"es .*o.e*t8. : o=#,"e 6S ,"/e ce// *#,"e.

o=#,"es = 9h s(o:.o,e,t.!#:ed=#,"es oSheet = 9h s(o:.o,e,t."etSheets()."etB8I,dex(0) o=#,"e = oSheet."et(e//=#,"eB8!#:e("A10(20") oAdd*ess = o=#,"e."et=#,"eAdd*ess() o=#,"es.#dd!e1F*o:9 t/es(oAdd*ess, 2 co:.s-,.st#*.sheet.Bo*de*.9<P) @,d S-7

The constants in Table 11 determine the location of the headers hen multiple ranges are created using the method add#e 5romTitles&). (able ##: com.sun.star.sheet.Border constants. ;alue
0 1 2 3

.a(e
TO% 7OTTO4 HI"2T LD5T

*escription
/elect the top border. /elect the bottom border. /elect the right border. /elect the left border.

Caution

It is possible to create multiple named ranges ith the same name. Creating multiple ranges ith a single command increases the li0elihood that multiple ranges ill be created ith the same nameca+oid this if possible.

%atabase range
,lthough a database range can be used as a regular named range* a database range also defines a range of cells in a spreadsheet to be used as a database. Dach ro in a range corresponds to a record and each cell corresponds to a field. !ou can sort* group* search* and perform calculations on the range as if it ere a database.
$hapter #3 $alc as a Simple Database 39&

, database range pro+ides beha+ior that is useful hen performing database related acti+ities. 5or e6ample* you can mar0 the first ro as headings. To create* modify* or delete a database range* use %ata < %efine 3ange to open the Define Data Hange dialog &see 5igure 30=). 3hen you first define a range* the 4odify button sho n in the e6ample is labeled #e .

'igure 38": Define a database range In a macro* a database range is accessed* created* and deleted from the DatabaseHanges property. The macro in Listing 13 creates a database range named :2@ame and sets the range to be used as an auto filter. Listing #3. $reate a database range and an auto filter.
S-7 ) ) ) ) Add!e1)#t#7#se=#,"e() : o=#,"e 6)#t#7#se=#,"e o7Lect. : oAdd* 6(e// #dd*ess *#,"e +o* the d#t#7#se *#,"e. : oSheet 6F *st sheet, 1h ch 1 // co,t# , the *#,"e. : o)oc 6=e+e*e,ce 9h s(o:.o,e,t 1 th # sho*te* ,#:e.

o)oc = 9h s(o:.o,e,t I+ !<9 o)oc.)#t#7#se=#,"es.h#sB8!#:e("M8!#:e") 9he, oSheet = 9h s(o:.o,e,t."etSheets()."etB8I,dex(0) o=#,"e = oSheet."et(e//=#,"eB8!#:e("A10F10") oAdd* = o=#,"e."et=#,"eAdd*ess() o)oc.)#t#7#se=#,"es.#dd!e1B8!#:e("M8!#:e", oAdd*)

$hapter #3 $alc as a Simple Database

39A

@,d I+ o=#,"e = o)oc.)#t#7#se=#,"es."etB8!#:e("M8!#:e") o=#,"e.A-toF /te* = 9*-e @,d S-7

+orting
The sorting mechanism in a Calc document rearranges the data in the sheet. The first step in sorting data is to select the data that you ant to sort. To sort the data in Table <* select the cells from ,1 to "1Acif you include the column headers* indicate this in the sort dialog &see 5igure 30A). $se %ata < +ort to open the /ort dialog &see 5igure 30B). !ou can sort by up to three columns or ro s at a time.

'igure 38%: Sort b2 the @ame column Clic0 on the Options tab &see 5igure 30A) to set the sort options. Chec0 the 3ange contains column labels chec0bo6 to pre+ent column headers from being sorted ith the rest of the data. The /ort by list bo6 in 5igure 30B displays the columns using the column headers if the 3ange contains column labels chec0bo6 in 5igure 30A is chec0ed. If the 3ange contains column labels chec0bo6 is not chec0ed* ho e+er* then the columns are identified by their column nameN Column ,* for e6ample. #ormally* sorting the data causes the e6isting data to be replaced by the ne ly sorted data. The Copy sort results to chec0bo6* ho e+er* causes the selected data to be left unchanged and a copy of the sorted data is copied to the specified location. !ou can either directly enter a target address &/heet3.,1* for e6ample) or select a predefined range. Chec0 the Custom sort order chec0bo6 to sort based on a predefined list of +alues. To set your o n predefined lists* use ,ools < =ptions < 2ibre=ffice Calc < +ort 2ists and then enter your o n sort lists. %redefined sort lists are useful for sorting lists of data that should not be sorted alphabetically or numerically. 5or e6ample* sorting days based on their name.

$hapter #3 $alc as a Simple Database

39-

Caution

3hen a cell is mo+ed during a sort operation* e6ternal references to that cell are not updated. If a cell that contains a relati+e reference to another cell is mo+ed* the reference is relati+e to the ne position hen sorting is finished. 8no the beha+ior of references during sorting and do not be alarmedN this is almost al ays hat you antcbecause the reference is to the right or left in the same ro . ,lso* e ha+e not found a spreadsheet program that e6hibits a different beha+ior for references hile sorting.

'igure 38&: Set sort options

Filters
$se filters to limit the +isible ro s in a spreadsheet. "eneric filters* common to all sorts of data manipulations* are automatically pro+ided by the auto filter capability. !ou can also define your o n filters.
,fter applying a filter* some ro s are +isible and some ro s are not. If you select multiple ro s in one operation* you ill also select the in+isible ro s contained bet een the selected +isible ro s. Operations* such as delete* act on all of the selected ro s. To a+oid this problem* you must indi+idually select each of the filtered ro s using the control 0ey.

Caution

$hapter #3 $alc as a Simple Database

39.

Auto filters
$se auto filters to @uic0ly create easily accessible filters commonly used in many different types of applications. ,fter creating an auto filter for a specific column* a combo bo6 is added to the column. The combo bo6 pro+ides @uic0 access to each of the auto filter types.

The ,ll auto filter causes all ro s to be +isible. The /tandard auto filter opens the /tandard 5ilter dialog and is the same as the standard
filter.

The Top 10 auto filter displays the ten ro s ith the largest +alue. If the +alue E0 is in the
top ten +alues* then all ro s containing the +alue E0 in the filtered column are displayed. In other ords* more than ten ro s may be displayed.

,n auto filter entry is created for each uni@ue entry in the column.
To create an auto filter* first select the columns to filter. 5or e6ample* using the data in Table <* select data in columns 7 and C. If you do not select the title ro s* Calc as0s if the title ro or the current ro should be used. ,lthough you can place the auto filter in any ro * only the ro s belo the auto filter are filtered. $se %ata < Filter < AutoFilter to insert the auto filter combo bo6 in the appropriate cell. 5inally* use the drop.do n arro to choose an appropriate auto filter &5igure 30E).

'igure 38A: Use an auto filter with column $ Hemo+e an auto filter by repeating the steps to create the auto filtercin other ords* the menu option acts as a toggle to turn the auto filter on and off. 3hen an auto filter is remo+ed* the combo bo6 is remo+ed from the cell. The macro in Listing 13 demonstrates creating an auto filter for a range.

+tandard filters
$se %ata < Filter < +tandard Filter to open /tandard 5ilter dialog &see 5igure 30-) and limit the +ie based on 1 to 3 filter conditions. $se %ata < Filter < 3emove Filter to turn off the filter.

$hapter #3 $alc as a Simple Database

338

'igure 38-: Use the standard filter The macro in Listing 1= creates a simple filter for the first sheet. Listing #". $reate a simple sheet filter.
S-7 ) ) ) S : : : :./eSheetF /te*() oSheet 6 Sheet th#t 1 // co,t# , the + /te*. oF /te*)esc 6 F /te* desc* .to*. oF e/ds(0) As !e1 co:.s-,.st#*.sheet.9#7/eF /te*F e/d

oSheet = 9h s(o:.o,e,t."etSheets()."etB8I,dex(0) =@M I+ #*"-:e,t s 9*-e, c*e#tes #, e:.t8 + /te* =@M desc* .to*. I+ #*"-:e,t s F#/se, c*e#te # =@M desc* .to* 1 th the .*ev o-s sett ,"s. oF /te*)esc = oSheet.c*e#teF /te*)esc* .to*(9*-e) P th oF e/ds(0) =@M Bo- co-/d -se the (o,,ect o, .*o.e*t8 to ,d c#te =@M ho1 to co,,ect to the .*ev o-s + e/d. 9h s s =@M the + *st + e/d, so th s s ,ot *eO- *ed. 6.(o,,ect o, = co:.s-,.st#*.sheet.F /te*(o,,ect o,.A!) 6.(o,,ect o, = co:.s-,.st#*.sheet.F /te*(o,,ect o,.<= =@M 9he F e/d .*o.e*t8 s the Ne*o 7#sed co/-:, =@M ,-:7e* to + /te*. I+ 8o- h#ve the ce//, 8o=@M c#, -se .F e/d = o(e//.(e//Add*ess.(o/-:,. .F e/d = > =@M (o:.#*e -s ," # ,-:e* c o* # st* ,"Q .Is!-:e* c = 9*-e

$hapter #3 $alc as a Simple Database

33#

=@M 9he !-:e* c?#/-e .*o.e*t8 s -sed =@M 7ec#-se .Is!-:e* c = 9*-e +*o: #7ove. .!-:e* c?#/-e = A0 =@M I+ Is!-:e* c 1#s F#/se, the, the =@M St* ,"?#/-e .*o.e*t8 1o-/d 7e -sed. =@M .St* ,"?#/-e = "1h#t eve*" =@M ?#/ d o.e*#to*s ,c/-de @MP9B, !<92@MP9B, @RUAM, =@M !<92@RUAM, %=@A9@=, %=@A9@=2@RUAM, M@SS, =@M M@SS2@RUAM, 9<P2?AMU@S, 9<P2P@=(@!9, =@M B<99<M2?AMU@S, #,d B<99<M2P@=(@!9 .<.e*#to* = co:.s-,.st#*.sheet.F /te*<.e*#to*.%=@A9@=2@RUAM @,d P th =@M 9he + /te* desc* .to* s-..o*ts the +o//o1 ," =@M .*o.e*t es0 Is(#seSe,s t ve, SH .)-./ c#tes, =@M Use=e"-/#*@x.*ess o,s, =@M S#ve<-t.-tPos t o,, <* e,t#t o,, (o,t# ,sGe#de*, =@M (o.8<-t.-t)#t#, <-t.-tPos t o,, #,d M#xF e/d(o-,t. oF /te*)esc.setF /te*F e/ds(oF e/ds()) oF /te*)esc.(o,t# ,sGe#de* = 9*-e oSheet.+ /te*(oF /te*)esc) @,d S-7

3hen a filter is applied to a sheet* it replaces any e6isting filter for the sheet. /etting an empty filter in a sheet ill therefore remo+e all filters for that sheet &see Listing 1B). Listing #%. 3emove the current sheet filter.
S-7 =e:oveSheetF /te*() ) : oSheet 6 Sheet to + /te*. ) : oF /te*)esc 6 F /te* desc* .to*. oSheet = 9h s(o:.o,e,t."etSheets()."etB8I,dex(0) oF /te*)esc = oSheet.c*e#teF /te*)esc* .to*(9*-e) oSheet.+ /te*(oF /te*)esc) @,d S-7

Listing 1A demonstrates a more ad+anced filter that filters t o columns and uses regular e6pressions. /ome une6pected beha+ior occurred hile or0ing ith Listing 1A. ,lthough you can create a filter descriptor using any sheet cell range* the filter applies to the entire sheet. Listing #&. , simple sheet filter using two columns.
S-7 ) ) ) ) S : : : : :./eSheetF /te*22() oSheet 6 Sheet to + /te*. o=#,"e 6 =#,"e to 7e + /te*ed. oF /te*)esc 6 F /te* desc* .to*. oF e/ds(1) As !e1 co:.s-,.st#*.sheet.9#7/eF /te*F e/d

oSheet = 9h s(o:.o,e,t."etSheets()."etB8I,dex(0) o=#,"e = oSheet."et(e//=#,"eB8!#:e("@120%1S") =@M I+ #*"-:e,t s 9*-e, c*e#tes #,

$hapter #3 $alc as a Simple Database

339

=@M e:.t8 + /te* desc* .to*. oF /te*)esc = o=#,"e.c*e#teF /te*)esc* .to*(9*-e) =@M Set-. # + e/d to v e1 ce//s 1 th co,te,t th#t =@M st#*t 1 th the /ette* 7. P th oF e/ds(0) .F e/d = 0 6 F /te* co/-:, A. .Is!-:e* c = F#/se 6 Use # st* ,", ,ot # ,-:7e*. .St* ,"?#/-e = "7.*" 6 @ve*8th ," st#*t ," 1 th 7. .<.e*#to* = co:.s-,.st#*.sheet.F /te*<.e*#to*.@RUAM @,d P th =@M Set-. # + e/d th#t *eO- *es 7oth co,d t o,s #,d =@M th s ,e1 co,d t o, *eO- *es # v#/-e "*e#te* o* =@M eO-#/ to &0. P th oF e/ds(1) .(o,,ect o, = co:.s-,.st#*.sheet.F /te*(o,,ect o,.A!) .F e/d = > 6 F /te* co/-:, F. .Is!-:e* c = 9*-e 6 Use # ,-:7e* .!-:e* c?#/-e = &0 6 ?#/-es "*e#te* th#, &0 .<.e*#to* = co:.s-,.st#*.sheet.F /te*<.e*#to*.%=@A9@=2@RUAM @,d P th oF /te*)esc.setF /te*F e/ds(oF e/ds()) oF /te*)esc.(o,t# ,sGe#de* = F#/se oF /te*)esc.Use=e"-/#*@x.*ess o,s = 9*-e oSheet.+ /te*(oF /te*)esc) @,d S-7

Advanced filters
,n ad+anced filter supports up to eight filter conditions* as opposed to the three supported by the simple filter. The criteria for an ad+anced filter is stored in a sheet. The first step in creating an ad+anced filter is entering the filter criteria into the spreadsheet. 1) /elect an empty space in the Calc document. The empty space may reside in any sheet in any location in the Calc document. 2) Duplicate the column headings from the area to be filtered into the area that ill contain the filter criteria. 3) Dnter the filter criteria underneath the column headings &see Table 12). The criterion in each column of a ro is connected ith ,#D. The criteria from each ro are connected ith OH. (able #9: )*ample advanced filter criteria .a(e
YU,ndyU

/est 1

/est @
e-0

Bui- 1

Bui- @

)vera%e
f-0

Grade

,ip

Define named ranges to reference your ad+anced filter criteria and any destination ranges for filtered data &see 5igure 302). Dach appropriately configured named range is a+ailable in drop do n list bo6es in the ,d+anced 5ilter dialog &see 5igure 30<).

$hapter #3 $alc as a Simple Database

333

,fter creating one or more sets of filter criteria* apply an ad+anced filter as follo s' 1) /elect the sheet ranges that contain the data to filter. 2) $se %ata < Filter < Advanced Filter to open the ,d+anced 5ilter dialog &see 5igure 30<). 3) /elect the range containing the filter criteria and any other rele+ant options. Clic0 =6. ,pplying an ad+anced filter using a macro is simple &see Listing 1E). The cell range containing the filter criteria is used to create a filter descriptor* hich is then used to filter the range containing the data.

'igure 38.. ,ppl2 an advanced filter using a previousl2 defined named range Listing #A. Use an advanced filter.
S-7 ) ) ) ) ) UseA,Adv#,cedF /te*() : oSheet 6A sheet +*o: the (#/c doc-:e,t. : o=#,"es 69he !#:ed=#,"es .*o.e*t8. : o(* t=#,"e 6=#,"e th#t co,t# ,s the + /te* c* te* #. : o)#t#=#,"e 6=#,"e th#t co,t# ,s the d#t# to + /te*. : oF /t)esc 6F /te* desc* .to*.

=@M =#,"e th#t co,t# ,s the + /te* c* te* # oSheet = 9h s(o:.o,e,t."etSheets()."etB8I,dex(1) o(* t=#,"e = oSheet."et(e//=#,"eB8!#:e("A10%3") =@M =@M =@M =@M =@M Bo- c#, #/so o7t# , the *#,"e co,t# , ," the + /te* c* te* # +*o: # ,#:ed *#,"e. o=#,"es = 9h s(o:.o,e,t.!#:ed=#,"es o=#,"e = o=#,"es."etB8!#:e("Ave*#"eMessA0") o(* t=#,"e = o=#,"e."et=e+e**ed(e//s()

=@M 9he d#t# th#t 8o- 1#,t to + /te* oSheet = 9h s(o:.o,e,t."etSheets()."etB8I,dex(0) o)#t#=#,"e = oSheet."et(e//=#,"eB8!#:e("A10%1$") oF /t)esc = o(* t=#,"e.c*e#teF /te*)esc* .to*B8<7Lect(o)#t#=#,"e) o)#t#=#,"e.+ /te*(oF /t)esc) @,d S-7

Change properties on the filter descriptor to change the beha+ior of the filter &see Table 13).

$hapter #3 $alc as a Simple Database

33"

The filter created in Listing 1E filters the data in place. 4odify the Output%osition property to specify a different output position &see Listing 1-). The filter descriptor must be modified before the filter is applied. (able #3: ,dvanced filter properties. 1ropert$
Contains2eader CopyOutputData IsCase/ensiti+e Orientation Output%osition /a+eOutput%osition /0ipDuplicates $seHegularD6pressions

Co((ent
7oolean &true or false) that specifies if the first ro &or column) contains headers hich should not be filtered. 7oolean that specifies if the filtered data should be copied to another position in the document. 7oolean that specifies if the case of letters is important hen comparing entries. /pecifies if columns &com.sun.star.table.TableOrientation.COL$4#/) or ro s &com.sun.star.table.TableOrientation.HO3/) are filtered. If if CopyOutputData is True * specifies the position here filtered data are to be copied. 7oolean that specifies if the Output%osition position is sa+ed for future calls. 7oolean that specifies if duplicate entries are left out of the result. 7oolean that specifies if the filter strings are interpreted as regular e6pressions.

Listing #-. $op2 filtered results to a different location.


=@M (o.8 the o-t.-t d#t# *#the* th#, + /te* oF /t)esc.(o.8<-t.-t)#t# = 9*-e , ./#ce.

=@M (*e#te # (e//Add*ess #,d set t +o* Sheet3, =@M (o/-:, B, =o1 5 (*e:e:7e*, st#*t co-,t ," 1 th 0) ) : x As !e1 co:.s-,.st#*.t#7/e.(e//Add*ess x.Sheet = 2 x.(o/-:, = 1 x.=o1 = 3 oF /t)esc.<-t.-tPos t o, = x

&,d+anced material.) The Output%osition property returns a copy of a struct. 7ecause a copy is returned* it is not possible to set the indi+idual +alues directly. 5or e6ample* o5iltDesc.Output%osition.Ho Y 2 does not or0 &because you set the Ho on the copy to 2* but do not change the original).

4anipulating filtered data


5iltered data copied to a ne location may be selected* modified* and deleted at ill. Data that is not copied* ho e+er* re@uires special attention because ro s that do not match the filter criteria are simply hidden. LibreOffice beha+es differently depending on ho the cells became hidden and hat operation is done. Cells may be hidden using an outline* data filter* or the hide command. 3hen data is mo+ed by dragging or using cut and paste* all of the cells are mo+edcincluding the hidden cells. 3hen

$hapter #3 $alc as a Simple Database

33%

copying data* ho e+er* filtered data includes only the +isible cells and data hidden using an outline or the hide command copies all of the data.

Calc functions similar to database functions


,lthough e+ery Calc function can be used for database manipulation* the functions in Table 1= are more commonly used as such. /ome functionsM names differ only by the letter appended at the endN ,CDH,"D and ,CDH,"D,* for e6ample. 5unctions that do not end ith the letter , operate only on numeric +alues and cells that contain te6t or are empty are ignored. The corresponding function hose name ends ith the letter ,* treats te6t +alues as a number ith the +alue of FeroN blan0 cells are still ignored. (able #": 'unctions freKuentl2 used as database functions. Function
,CDH,"D ,CDH,"D, CO$#T CO$#T, CO$#T7L,#8 CO$#TI5 2LOO8$% I#DDQ I#DIHDCT LOO8$% 4,TC2 4,Q 4,Q, 4I# 4I#, 4DDI,# 4ODD

*escription
Heturn the a+erage. Ignore empty cells and cells that contain te6t. Heturn the a+erage. The +alue of te6t is 0 and empty cells are ignored. Count the number of numeric entriesN te6t entries are ignored. Count the number of non.empty entries. Heturn the number of empty cells. Heturn the number of cells that meet the search criteria. /earch for a specific +alue across the columns in the first ro of an array. Heturn the +alue from a different ro in the same column. Heturn the content of a cell* specified by ro and column number or an optional range name. Heturn the reference specified by a te6t string. Heturn the contents of a cell either from a one.ro or one.column range or from an array. /earch an array and return the relati+e position of the found item. Heturn the ma6imum numeric +alue in a list of arguments. Heturn the ma6imum numeric +alue in a list of arguments. The +alue of te6t is 0. Heturn the minimum numeric +alue in a list of arguments. Heturn the minimum numeric +alue in a list of arguments. The +alue of te6t is 0. Heturn the median of a set of numbers. Heturn the most common +alue in a data set. If there are se+eral +alues ith the same fre@uency* it returns the smallest +alue. ,n error occurs hen a +alue doesnMt appear t ice. Heturn the +alue of a cell offset by a certain number of ro s and columns from a gi+en reference point. Heturn the product of the cells. Dstimate the standard de+iation based on a sample.

O55/DT %HOD$CT /TDDC

$hapter #3 $alc as a Simple Database

33&

Function
/TDDC, /TDDC% /TDDC%, /$7TOT,L /$4 /$4I5 C,H C,H, C,H% C,H%, CLOO8$%

*escription
Dstimate the standard de+iation based on a sample. The +alue of te6t is 0. Calculate the standard de+iation based on the entire population. Calculate the standard de+iation based on the entire population. The +alue of te6t is 0. Calculate a specified function based on a subset created using ,uto5ilters. Heturn the sum of the cells. Calculate the sum for the cells that meet the search criteria. Dstimate the +ariance based on a sample. Dstimate the +ariance based on a sample. The +alue of te6t is 0. Dstimate the +ariance based on the entire population. Dstimate the +ariance based on the entire population. The +alue of te6t is 0. /earch for a specific +alue across the ro s in the first column of an array. Heturns the +alue from a different column in the same ro .

4ost of the functions in Table 1= re@uire no e6planation* either because they are ell understood &/$4* for e6ample) or because if you need to use them then you 0no hat they are &/TDDC* for e6ample). $nfortunately* some of the more useful functions are infre@uently used because they are not ell understood.

Count and sum cells that match conditions: C=*?, F and +*4 F
The CO$#TI5 and /$4I5 functions calculate their +alues based on search criteria. The search criteria can be a number* e6pression* te6t string* or e+en a regular e6pression. The search criteria can be contained in a referenced cell or it can be included directly in the function call. The CO$#TI5 function counts the number of cells in a range that match specified criteria. The first argument to CO$#TI5 specifies the range to search and second argument is the search criteria. Table 1B illustrates different search criteria using the CO$#TI5 function referencing the data sho n in Table <. The first t o arguments for /$4I5 ser+e the same purpose as the arguments for CO$#TI5N the range that contains the cells to search and the search criteria. The third and final argument for /$4I5 specifies the range to sum. 5or each cell in the search range that matches the search criteria* the corresponding cell in the sum range is added into the sum. (able #%: )*amples of search criteria for the $OU@(0' and SU:0' functions. Criteria /$pe
#umber Te6t D6pression D6pression

Function
YCO$#TI5&71'C1AN <B) YCO$#TI5&71'C1AN U<BU) YCO$#TI5&71'C1AN Ue<BU) YCO$#TI5&71'C1AN 2Z=BRB)

&esult
3 3 A 3

*escription
5inds numeric +alues of <B. 5inds numeric or te6t +alues of <B. 5inds numeric +alues greater than <B. 5inds only numeric +alues of <B.

$hapter #3 $alc as a Simple Database

33A

Criteria /$pe
Hegular e6pression Heference a cell

Function
YCO$#TI5&71'C1AN U<.ZU) YCO$#TI5&71'C1AN 73)

&esult
12 3

*escription
5inds numbers or te6t that start ith <. 5inds a number or number and te6t depending on the data type in cell 73. /um Column 7 for names in Col. , starting ith the letter 7.

Hegular e6pression

Y/$4I5&,1',1AN U7.ZUN 71'71A)

22E

gnore filtered cells using +*7,=,A2


The /$7TOT,L function applies a function &see Table 1A) to a range of data* but it ignores cells hidden by a filter and cells that already contain a /$7TOT,L. 5or e6ample* =SUB9<9AM(2, "B20B1$") counts the number of cells in 72'71A that are not hidden by a filter. (able #&: 'unction inde* for the SUB(O(,L function. Function index
1 2 3 = B A E < 10 11

Function
,CDH,"D CO$#T CO$#T, 4,Q 4I# %HOD$CT /TDDC /TDDC% /$4 C,H C,H%

,ip

Do not forget that the /$7TOT,L function ignores cells that use the /$7TOT,L function. /ay you ha+e a spreadsheet that trac0s in+estments. The retirement in+estments are grouped together ith a subtotal. The same is true of regular in+estments. !ou can use a single subtotal that includes the entire range ithout orrying about the subtotal cells.

*sing formulas to find data


Calc offers numerous methods to find data in a sheet. 5or e6ample* after setting up a simple or ad+anced search in #dit < Find B 3eplace* you can clic0 on Find repeatedly to mo+e the display cursor to the ne6t instance. To limit hat is displayed rather than simply mo+ing the cursor* use %ata < Filter. Calc also offers loo0up functions used in formulas* for e6ample a formula to loo0 up a studentMs grade based on their test score.

$hapter #3 $alc as a Simple Database

33-

!earc" a bloc0 of data usin% ;LOO#+1


$se CLOO8$% to search the first column &columns are +ertical) of a bloc0 of data and return the +alue from another column in the same ro . 5or e6ample* search the first column for the name J5redK and then return the +alue in the cell t o columns to the right. CLOO8$% supports t o forms' ?M<<TUP(se#*ch2v#/-eU se#*ch2*#,"eU *et-*,2co/-:,2 ,dex) ?M<<TUP(se#*ch2v#/-eU se#*ch2*#,"eU *et-*,2co/-:,2 ,dexU so*t2o*de*) The first argument* se#*ch2v#/-e* identifies the +alue to find. The search +alue can be te6t* a number* or a regular e6pression. 5or e6ample* Fred searches for the te6t 5red* & searches for the number =* and F.V is the regular e6pression for finding something that starts ith the letter 5. The second argument* se#*ch2*#,"e* identifies the cells to searchN only the first column is searched. 5or e6ample* 7':(11 searches the same sheet containing the CLOO8$% formula and +heet".7':(11 searches the range 73'"10 on the sheet named /heet2. The *et-*,2co/-:,2 ,dex identifies the column to returnN a +alue of 1 returns the first column in the range. The statement =?M<<TUP("Bo7"U A10%SU 1) finds the first ro in ,1'"< containing the te6t 7ob$ and returns the +alue in the first column. The first column is the searched column* so the te6t 7ob is returned. If the column inde6 is 2* then the +alue in the cell to the right of 7ob is returned' column 7. The final column* so*t2o*de** is optional. The default +alue for so*t2o*de* is 1* hich specifies that the first column is sorted in ascending orderN a +alue of 0 specifies that the data is not sorted. , non.sorted list is searched by se@uentially chec0ing e+ery cell in the first column for an e6act match. If an e6act match is not found* the te6t W?HA is returned. , more efficient search routine is used if the data is sorted in ascending order. If one e6act match e6ists* the returned +alue is the same as for a non.sorted listN but it is faster. If a match does not e6ist* the largest +alue in the column that is less than or e@ual to the search +alue is returned. 5or e6ample* searching for E in &3* B* 10) returns B because E is bet een B and 10. /earching for 2E returns 10* and searching for 2 returns h#(, because there is no match and no +alue less than 2. $se CLOO8$% hen'

The data is arranged in ro s and you ant to return data from the same ro . 5or e6ample*
student names ith test and @uiF scores to the right of the studentMs name.

/earching the first column of a range of data. !earc" a bloc0 of data usin% 3LOO#+1
$se 2LOO8$% to search the first ro &ro s are horiFontal) of a bloc0 of data and return the +alue from a ro in the same column. 2LOO8$% supports the same form and arguments as CLOO8$%' GM<<TUP(se#*ch2v#/-eU se#*ch2*#,"eU *et-*,2*o12 ,dex) GM<<TUP(se#*ch2v#/-eU se#*ch2*#,"eU *et-*,2*o12 ,dexU so*t2o*de*) $se 2LOO8$% hen'

The data is arranged in columns and you ant to return data from the same column. 5or
e6ample* student names ith test and @uiF scores underneath the studentMs name.

/earching the first ro of a range of data. !earc" a row or colu(n usin% LOO#+1
LOO8$% is similar to 2LOO8$% and CLOO8$%. The search range for the LOO8$% function is a single sorted ro or column. LOO8$% has t o forms' M<<TUP(se#*ch2v#/-eU se#*ch2*#,"e)
$hapter #3 $alc as a Simple Database 33.

M<<TUP(se#*ch2v#/-eU se#*ch2*#,"eU *et-*,2*#,"e) The search +alue is the same as 2LOO8$% and CLOO8$%. The search range* ho e+er* must be a single ro or a single columnN for e6ample* ,E',12 &+alues in column ,) or CB'IB &+alues in ro B). If the returnPrange is omitted* the matched +alue is returned. $sing LOO8$% ithout a return range is the same as using 2LOO8$% or CLOO8$% ith a column inde6 of 1. The return range must be a single ro or column containing the same number of elements as the search range. If the search +alue is found in the fourth cell in the search range* then the +alue in the fourth cell in the return range is returned. The return range can ha+e a different orientation than the search range. In other ords* the search range can be a ro and the return range may be a column. $se LOO8$% hen'

The search data is sorted in ascending order. The search data is not stored in the same ro * column* or orientation as the return data. +se M)/C3 to find t"e index of a value in a ran%e
$se 4,TC2 to search a single ro or column and return the position that matches the search +alue. $se 4,TC2 to find the inde6 of a +alue in a range. The supported forms for 4,TC2 are as follo s' =MA9(G(se#*ch2v#/-eU se#*ch2*#,"e) =MA9(G(se#*ch2v#/-eU se#*ch2*#,"eU se#*ch2t8.e) The search +alue and search range are the same as for LOO8$%. The final argument* search type* controls ho the search is performed. , search type of 1* sorted in ascending order* is the default. , search type of .1 indicates that the list is sorted in descending order. , search type of 0 indicates that the list is not sorted. Hegular e6pressions can only be used on an unsorted list. $se 4,TC2 hen'

!ou need an inde6 into the range rather than the +alue. The search data is in descending order and the data is large enough that the data must be
searched assuming that it is sortedN because it is faster to sort a sorted list.

Exa(ples
Consider the data in Table <. Dach studentMs information is stored in a single ro . 3rite a formula to return the a+erage grade for 5red. The problem can be restated as /earch column , in the range ,1'"1A for 5red and return the +alue in column 5 &column 5 is the si6th column). The ob+ious solution is =?M<<TUP("F*ed"U A20%1$U $). D@ually ob+ious is =M<<TUP("F*ed"U A20A1$U F20F1$). It is common for the first ro in a range to contain column headers. ,ll of the search functions chec0 the first ro to see if there is a match and then ignore it if it does not contain a match* in case the first ro is a header. 3hat if the column heading Average is 0no n* but not the column containing the a+erage> 5ind the column containing ,+erage rather than hard coding the +alue A. , slight modification using 4,TC2 to find the column yields =?M<<TUP("F*ed"U A20%1$U MA9(G("Ave*#"e"U A10%1U 0))N notice that the heading is not sorted. ,s an e6ercise* use 2LOO8$% to find ,+erage and then 4,TC2 to find the ro containing 5red. ,s a final e6ample* rite a formula to assign grades based on a studentMs a+erage score. ,ssume that a score less than B1 is an 5* less than A1 is an D* less than E1 is a D* less than -1 is a C* less than <1 is a 7* and <1 to 100 is an ,. ,ssume that the +alues in Table 1E are in /heet2.

$hapter #3 $alc as a Simple Database

3"8

The formula =?M<<TUP(A3U JSheet2.JAJ20JBJ&U 2) is an ob+ious solution. Dollar signs are used so that the formula can be copied and pasted to a different location and it ill still reference the same +alues in Table 1E. (able #A: ,ssociate scores to a grade. A
1 " ' & ! /core 0 B1 A1 E1 -1 <1

7
"rade 5 D D C 7 ,

A%%3#++ returns a string with a cellXs address


$se ,DDHD// to return a te6t representation of a cell address based on the ro * column* and sheetN ,DDHD// is fre@uently used ith 4,TC2. The supported forms for ,DDHD// are as follo s' A))=@SS(*o1U co/-:,) A))=@SS(*o1U co/-:,U #7s) A))=@SS(*o1U co/-:,U #7sU sheet) The ro and column are integer +alues here ,DDHD//&1N 1) returns YAY1. The abs argument specifies hich portion is considered absolute and hich portion is considered relati+e &see Table 1-)N an absolute address is specified using the g character. The sheet is included as part of the address only if the sheet argument is used. The sheet argument is treated as a string. $sing A))=@SS(MA9(G("Bo7"UA10A> U 0)U 2) ith the data in Table 1E returns Y7Y".
Calc supports numerous po erful functions that are not discussed here. 5or e6ample* the HO3* COL$4#* HO3/* and COL$4#/ statements are not discussedN a curious person ould in+estigate these functions.

,ip

(able #-: Halues supported b2 the abs argument to ,DD3)SS. ;alue


1 2

*escription
$se absolute addressing. This is the default +alue if the argument is missing or an in+alid +alue is used. A))=@SS(2U >U 1) returns gDg2. $se an absolute ro reference and a relati+e column reference. A))=@SS(2U >U 2U "B/#h") returns 7lah.Dg2. $se a relati+e ro reference and an absolute column reference. A))=@SS(2U >U 3) returns gD2. $se relati+e addressing. A))=@SS(2U >U 5) returns D2.

3 =

$hapter #3 $alc as a Simple Database

3"#

?% 3#C, converts a string to a cell or range


$se I#DIHDCT to con+ert a string representation of a cell or range address to a reference to the cell or range. Table 1< contains e6amples accessing data as sho n in Table 1E. (able #.: )*amples using 0@D03)$(. Exa(ple
I#DIHDCT&U,2U) I#DIHDCT&"1) /$4&I#DIHDCT&U71'7BU)) I#DIHDCT&,DDHD//&2N 1))

Co((ent
Heturns cell ,2* hich contains 7ob. If Cell "1 contains the te6t ,2* then this returns 7ob. Heturns the sum of the range 71'7B* hich is 10&. Heturns the contents of cell g,g2* hich is 7ob.

=FF+#, returns a cell or range offset from another


$se O55/DT to return a cell or range offset by a specified number of ro s and columns from a gi+en reference point. The first argument* specifies the reference point. The second and third arguments specify the number of ro s and columns to mo+e from the reference pointN in other ords* here the ne range starts. The O55/DT function has the follo ing synta6' <FFS@9(*e+e*e,ceU *o1sU co/-:,s) <FFS@9(*e+e*e,ceU *o1sU co/-:,sU he "ht) <FFS@9(*e+e*e,ceU *o1sU co/-:,sU he "htU 1 dth)

,ip

If the idth or height is included* the O55/DT function returns a range. If both the idth and height are missing* a cell reference is returned.

If the height or idth are missing* they default to 1. If the height is present* then a range reference is returned rather than a cell reference. $sing +alues from Table <* Listing 1< uses O55/DT to obtain the @uiF scores for the student named 7ob. Listing #.. $omple* e*ample of O''S)(. =SUM(<FFS@9(I!)I=@(9(A))=@SS(MA9(G("Bo7"UA10A1$U 0)U 5))U 0U 0U 1U 2)) In its entirety* Listing 1< is comple6 and difficult to understand. Table 20 isolates each function in Listing 1<* pro+iding an easy to understand e6planation of ho the e6ample or0s. (able 98: Brea4down of Listing #.. Function
4,TC2&U7obUN,1',1AN 0) ,DDHD//&=N =) I#DIHDCT&UgDg=U) O55/DT&gDg=N 0N 0N 1N 2) /$4&D='D=)

*escription
Heturn = because 7ob is the fourth entry in column ,. Heturn gDg=. Con+ert gDg= into a reference to the cell D=. Heturn the range D='D=. Heturn the sum of 7obMs @uiF scores.

,lthough Listing 1< or0s as intended* it brea0s easily and une6pectedly. Consider* for e6ample* hat happens if the range is changed to ,2',1A. 4,TC2 returns an offset into the pro+ided range* so MA9(G("Bo7"UA20A1$ U 0) returns 3 rather than =. A))=@SS(3U 5) returns gDg3 rather than gDg= and 7ettyMs @uiF scores are returned instead of 7obMs. Listing 20 uses a slightly different method to obtain 7obMs @uiF scores.
$hapter #3 $alc as a Simple Database 3"9

Listing 98. Better use of O''S)(.

=SUM(<FFS@9(A1U MA9(G("Bo7"U A10A1$U 0)C1U 3U 1U 2))


Table 21 contains a description of each function used in Listing 20. To help con+ince yourself that Listing 20 is better than Listing 1<* replace ,1 ith ,2 in both Listing 20 and Table 21 and notice that you still obtain 7obMs @uiF scores. (able 9#: Brea4down of Listing 98. Function
4,TC2&U7obUN,1',1AN 0).1 O55/DT&,1N 3N 3N 1N 2) /$4&D='D=)

*escription
Heturn 3 because 7ob is the fourth entry in column ,. Heturn the range D='D=. Heturn the sum of 7obMs @uiF scores. The first argument to O55/DT can be a range so you can use a defined range name.

,ip

?%#O returns cells inside a specified range


I#DDQ returns the cells specified by a ro and column number. The ro and column number are relati+e to the upper left corner of the specified reference range. 5or e6ample* using =I!)@V(B20)3U 1U 1) returns the cell 72. Table 22 lists sho s the synta6 for using the I#DDQ function. (able 99: S2nta* for 0@D);. !$ntax
I#DDQ&reference) I#DDQ&referenceN ro ) I#DDQ&referenceN ro N column)

*escription
Heturn the entire range. Heturn the specified ro in the range. Heturn the cell specified by ro and column. , ro and column of 1 returns the cell in the upper left corner of the range. , reference range can contain multiple ranges. The range argument specifies hich range to use.

I#DDQ&referenceN ro N columnN range)

The I#DDQ function can return an entire range* a ro * or a single column &see Table 22). The ability to inde6 based on the start of the reference range pro+ides some interesting uses. $sing the +alues sho n in Table <* Listing 21 finds and returns 7obMs @uiF scores. Table 23 contains a listing of each function used in Listing 21. Listing 9#. 3eturn BobVs Kui1 scores. =SUM(<FFS@9(I!)@V(A20%1$U MA9(G("Bo7"U A20A1$U 0))U 0U 3U 1U 2)) (able 93: Brea4down of Listing 9#. Function
4,TC2&U7obUN,2',1AN 0) I#DDQ&,2',1AN 3) O55/DT&,='"=N 0N 3N 1N 2) /$4&D='D=)
$hapter #3 $alc as a Simple Database

*escription
Heturn 3 because 7ob is the third entry in column ,2',1A. Heturn ,='"=cthe ro containing 7obMs @uiF scores. Heturn the range D='D=. Heturn the sum of 7obMs @uiF scores.
3"3

,ip

, simple range contains one contiguous rectangular region of cells. It is possible to define a multi.range that contains multiple simple ranges. If the reference consists of multiple ranges* you must enclose the reference or range name in parentheses.

If reference argument to the I#DDQ function is a multi.range* then the range argument specifies hich simple range to use &see Table 2=). (able 9": Using 0@D); with a multi!range. Function
YI#DDQ&72'"2N 1N 2) YI#DDQ&7B'"BN 1N 2) YI#DDQ&&72'"2N7B'"B)N 1N 2) YI#DDQ&&72'"2N7B'"B)N 1N 2N 1) YI#DDQ&&72'"2N7B'"B)N 1N 2N 2)

&eturns
<3 AB <3 <3 AB

%atabase/specific functions
,lthough e+ery Calc function can be used for database manipulation* the functions in Table 2B are specifically designed for use as a database. The descriptions in Table 2B use the follo ing terms interchangeably' ro and record* cell and field* and database and all ro s. (able 9%: Database functions in a $alc document. Function
D,CDH,"D DCO$#T DCO$#T, D"DT D4,Q D4I# D%HOD$CT D/TDDC D/TDDC% D/$4 DC,H DC,H%

*escription
Heturn the a+erage of all fields that matches the search criteria. Count the number of records containing numeric data that match the search criteria. Count the number of records containing te6t data that match the search criteria. Heturn the contents of a field that matches the search criteria. Heturn the ma6imum content of a field that matches the search criteria. Heturn the minimum content of a field that matches the search criteria. Heturn the product of the fields that matches the search criteria. Calculate the standard de+iation using the fields that match the search criteria. The fields are treated as a sample. Calculate the standard de+iation using the fields that match the search criteria. The fields are treated as the entire population. Heturn the sum of all fields that matches the search criteria. Calculate the +ariance using the fields that match the search criteria. The fields are treated as a sample. Calculatesthe +ariance using the fields that match the search criteria. The fields are treated as the entire population.

The synta6 for the database functions are identical. )(<U!9(d#t#7#seU d#t#7#se + e/dU se#*ch c* te* #)
$hapter #3 $alc as a Simple Database 3""

The database argument is the cell range that defines the database. The cell range should contain the column labels &see Listing 22). The follo ing e6amples* assume that the data from Table < is placed in /heet 1 and the filter criteria in Table 12 is placed in /heet 2. Listing 99. (he database argument includes the headers. =)(<U!9(A10%1$U "9est 2"U Sheet2.A10%3) The database field specifies the column on hich the function operates after the search criteria is applied and the data ro s are selected. The database field can be specified using the column header name or as an integer. If the column is specified as an integer* 0 specifies the entire data range* 1 specifies the first column* 2 specifies the second column* and so on. Listing 23 calculates the a+erage test score for the ro s that match the search criteria. Listing 93. R(est 9S is column 3. =)A?@=A%@(A10%1$U "9est 2"U Sheet2.A10%3) =)A?@=A%@(A10%1$U 3U Sheet2.A10%3) The search criteria is the cell range containing search criteria. The search criteria is identical to the ad+anced filtersN criteria in the same ro is connected by ,#D and criteria in different ro s is connected by OH.

Conclusion
, Calc document pro+ides sufficient database functionality to satisfy the needs of most people. The infre@uently used database functions* such as O55/DT and I#DDQ* are orth the time to learn and they can sa+e yourself time in the long run.

$hapter #3 $alc as a Simple Database

3"%

$hapter #" Setting up and $ustomi1ing $alc

ntroduction
This chapter describes some common customiFations that you may ish to do. In addition to selecting options from those pro+ided* you can customiFe menus* toolbars* and 0eyboard shortcuts* add ne menus and toolbars* and assign macros to e+ents. 2o e+er* you cannot customiFe conte6t &right.clic0) menus. Other customiFations are made easy by e6tensions that you can install from the LibreOffice ebsite or from other pro+iders.
Changes to menus and toolbars can be sa+ed in a template. 5irst* sa+e the document that as open hen these changes ere made. Then* sa+e that document as a template* as described in Chapter =* $sing /tyles and Templates in Calc.

?ote

2ibre=ffice options
This section co+ers some of the settings that apply to all the components of LibreOffice and are of particular interest to users of Calc. Other general options are discussed in Chapter 2* /etting $p LibreOffice* in the Getting Started guide. 1) Choose ,ools < =ptions &2ibre=ffice < Preferences on a 4ac) to open the Options dialog. The list on the left.hand side of the Options dialog +aries depending on hich LibreOffice component is open. The illustrations in this chapter sho the list as it appears hen Calc is open. 2) Clic0 the e6pansion symbol &R or triangle) by LibreOffice on the left.hand side. , list of subsections drops do n.

'igure 3#8: Options E LibreOffice E User Data page

?ote

The 3evert button has the same effect on all pages of the Options dialog. It resets the options to the +alues that ere in place hen you opened LibreOffice.

$hapter #" Setting up and $ustomi1ing $alc

3"-

*ser %ata options


$ser data is used by templates and 3iFards in LibreOffice. 5or e6ample* Calc uses the first and last name stored here to fill in the $reated and :odified fields in the document properties* the optional ,uthor field often used in the footer of a printed spreadsheet* and the name associated ith comments. If you ant your name to appear* then fill in the form on the LibreOffice E User Data page &5igure 310). If you are using a +ersion of LibreOffice other than $/ Dnglish* some field labels may be different from those sho n in the illustration. /ome of the user data is included automatically in an internal dictionary so that it is recogniFed by the spelling chec0er. If typing errors are made* the program can use this data to suggest replacements. #ote that changes to data ta0e effect only after LibreOffice is restarted.

Print options
On the LibreOffice E $olors page* you can set the print options to suit your default printer and your most common printing method. !ou can change these settings at any time* either through this dialog or during the printing process &by clic0ing the =ptions button on the %rint dialog). /ee Chapter A* %rinting* D6porting* and D.mailing* in this guide for more about these options.

Color options
On the LibreOffice E $olors page* you can specify colors to use in LibreOffice documents. !ou can select a color from a color table* edit an e6isting color* and define ne colors. These colors are stored in your color selection palette and are then a+ailable in all components of LibreOffice.

'igure 3##: Defining colors to use in color palettes in LibreOffice To modify a color' 1) /elect the color to modify from the list or the color table. 2) Dnter the ne +alues that define the color. If necessary* change the settings from H"7 &Hed* "reen* 7lue) to C4!8 &Cyan* 4agenta* !ello * 7lac0) or +ice +ersa. The changed color appears in the lo er of the t o color pre+ie bo6es at the top. 3) 4odify the @ame as re@uired. =) Clic0 the 4odify button. The ne ly defined color is no listed in the Color table.
$hapter #" Setting up and $ustomi1ing $alc 3".

,lternati+ely* clic0 the #dit button to open the Color %ic0er dialog* sho n in 5igure 312. 2ere you can select a color from the indo on the left* or you can enter +alues on the right using your choice of H"7* C4!8* or 2/7 &2ue* /aturation and 7rightness) +alues. The color indo on the left is lin0ed directly ith the color input fields on the rightN as you choose a color in the indo * the numbers change accordingly. The color field at the lo er left sho s the +alue of the selected color on the left and the currently set +alue from the color +alue fields on the right.

'igure 3#9: )diting colors 4odify the color components as re@uired and clic0 =6 to e6it the dialog. The ne ly defined color no appears in the lo er of the color pre+ie bo6es sho n in 5igure 31<. Type a name for this color in the @ame bo6* then clic0 the Add button. , small bo6 sho ing the ne color is added to the Color table. ,nother ay to define or alter colors is through the Colors page of the ,rea dialog* here you can also sa+e and load palettes* a feature that is not possible here. In Calc* dra a temporary dra obGect and use the conte6t menu of this obGect to open the ,rea dialog. If you load a palette in one component of LibreOffice* it is only acti+e in that componentN the other components 0eep their o n palettes.

+ecurity options
$se the LibreOffice E Securit2 page to choose security options for sa+ing documents and for opening documents that contain macros. +ecurity options and warnings If you record changes* sa+e multiple +ersions* or include hidden information or notes in your documents* and you do not ant some of the recipients to see that information* you can set arnings to remind you to remo+e this information* or you can ha+e LibreOffice remo+e some information automatically. #ote that &unless remo+ed) much of this information is retained in a file hether the file is in LibreOfficeMs default OpenDocument format* or has been sa+ed to other formats* including %D5. Clic0 the =ptions button to open a separate dialog ith specific choices &5igure 31=).
$hapter #" Setting up and $ustomi1ing $alc 3%8

'igure 3#3: $hoosing securit2 options for opening and saving documents Passwords for web connections LibreOffice can sa+e any pass ords associated ith ebsites opened by clic0ing on a hyperlin0. If you choose Persistently save passwords for web connections* LibreOffice securely store all pass ords that you use to access files from eb ser+ers.

ill

If you also set a master pass ord* indi+idual pass ords can be accessed only after the master pass ord has been entered. To set a master pass ord* select the Protected by a master password option and clic0 the 4aster Password button. 4acro security Clic0 the 4acro +ecurity button to open the 4acro /ecurity dialog &not sho n here)* you can adGust the security le+el for e6ecuting macros and specify trusted sources. Certificate Path here

?ote

This option appears only on Linu6 and 4ac systems. On 3indo s* LibreOffice uses the default 3indo s location for storing and retrie+ing certificates.

$sers can digitally sign documents using LibreOffice. , digital signature re@uires a personal signing certificate. 4ost operating systems can generate a self.signed certificate. 2o e+er* a personal certificate issued by an outside agency &after +erfiying an indi+idual?s identity) has a higher degree of trust associated ith it than does a self.signed certificate. LibreOffice does not pro+ide a secure method of storing these certificates* but it can access certificates that ha+e been sa+ed using other programs. Clic0 Certificate and select hich certificate store to use.

!ecurit$ options and warnin%s


The follo ing options are on the /ecurity options and arnings dialog &5igure 32E). 3emove personal information on saving /elect this option to al ays remo+e user data from the file properties hen sa+ing the file. To manually remo+e personal information from specific documents* deselect this option and then use the %elete button under File < Properties < (eneral.

$hapter #" Setting up and $ustomi1ing $alc

3%#

Ctrl/click re@uired to follow hyperlinks The default beha+ior in most components of LibreOffice is to $trl5clic4 on a hyperlin0 to open the lin0ed document* but you can choose to open hyperlin0s using a single clic0. 2o e+er* Calc opens hyperlin0s using a single clic0* regardless of the selection for this option. The other options on this dialog should be self.e6planatory.

'igure 3#": Securit2 options and warnings dialog

Appearance options
On the LibreOffice E ,ppearance page* you can specify hich items are +isible and the colors used to display +arious elements of the user interface. These colors are not printed hen you print a spreadsheet.

'igure 3#%: $hanging the color of grid points in $alc

$hapter #" Setting up and $ustomi1ing $alc

3%9

/croll do n the list until you find the section headed +preadsheet. To change the default color for grid lines or other on.screen indicators* clic0 the do n.arro by the color and select a ne color from the drop.do n list. If you ish to sa+e your color changes as a color scheme* clic0 +ave$ type a name in the @ame of color scheme bo6 in the pop.up dialog* and then clic0 =6.

2oading and saving documents


!ou can set the Load(/a+e options to suit the ay you or0. This chapter describes only a fe of the options* those most rele+ant to or0ing ith Calc. /ee Chapter 2* /etting $p LibreOffice* in the Getting Started guide for a description of the other options. If the Options dialog is not already open* clic0 ,ools < =ptions. Clic0 the e6pansion symbol &R or triangle) by 2oadH+ave on the left.hand side to display the list of load(sa+e options pages.

'igure 3#&: Load Save options

(eneral
4any of the choices on the Load Save E General page &5igure 31E) are familiar to users of other office suites. Those of most interest to Calc users are in the Default file format and OD' settings section. /ee Chapter 2* /etting $p LibreOffice* in the Getting Started guide for information about other options. =%F format version LibreOffice by default sa+es documents in OpenDocument 5ormat &OD5) +ersion 1.2 D6tended. 3hile this allo s for impro+ed functionality* there may be bac0 ards compatibility issues. 3hen a file sa+ed in OD5 1.2 D6tended is opened in an editor that uses an earlier +ersion of OD5 &1.0(1.1)* some of the ad+anced features may be lost. T o notable e6amples are cross.references to headings and the formatting of numbered lists. If you plan to share documents ith people ho are use editors that use older +ersions of OD5* you may ish to sa+e the document using OD5 +ersion 1.0(1.1. +i5e optimi5ation for =%F format LibreOffice documents are Q4L files. 3hen you select this option* LibreOffice rites the Q4L data ithout indents and line brea0s. If you ant to be able to read the Q4L files in a te6t editor in a structured form* deselect this option. %ocument type If you routinely share documents ith users of 4icrosoft D6cel* you might Always save as attribute for spreadsheets to one of the D6cel formats. ant to change the

2o e+er* e recommend that you al ays sa+e a or0ing copy in OD/ format and only create an D6cel +ersion if necessary for sharing. ,lso* note that recent and current +ersions of 4icrosoft D6cel can open OD/ files* so this may no longer be needed.

$hapter #" Setting up and $ustomi1ing $alc

3%3

'igure 3#A: $hoosing Load and Save options

?ote

LibreOffice can open and sa+e files in the .6ls6 format produced by 4icrosoft Office 200E* 2010* and later.

>7A Properties
On the Load Save E HB, Properties page* you can choose hether to 0eep any C7, &Cisual 7asic for ,pplications) macros in 4icrosoft Office documents that are opened in LibreOffice.

'igure 3#-: $hoosing Load Save HB, Properties

$hapter #" Setting up and $ustomi1ing $alc

3%"

2oad 7asic code The original C7, code ill be loaded as a disabled LibreOffice 7asic module. !ou can edit the code. 3hen sa+ing the document in LibreOffice format* the 7asic code is sa+ed as ell. 3hen the document is sa+ed in another format* the LibreOffice 7asic code is not sa+ed. #.ecutable code The C7, code ill be loaded ready to be e6ecuted. If this option is not selected* the C7, code ill be commented out so it can be inspected* but ill not run. ,s a safety precaution against +iruses and other malicious code* you may ish to disable the e6ecutable code option. +ave original 7asic code , bac0up copy of the original code* ritten in 7asic* is sa+ed ith the document.

Save original Basic code ta0es precedence o+er Load Basic code. If both options are selected and you edit the disabled code in LibreOffice* the original 4icrosoft 7asic code ill be sa+ed hen sa+ing in a 4icrosoft Office format. To remo+e any possible macro +iruses from the 4icrosoft Office document* deselect /a+e original 7asic code. The document ill be sa+ed ithout the 4icrosoft 7asic code.

4icrosoft =ffice
On the Load Save E :icrosoft Office page* you can choose hat to do hen importing and e6porting 4icrosoft Office OLD obGects &lin0ed or embedded obGects or documents such as spreadsheets or e@uations).

'igure 3#.: $hoosing Load Save :icrosoft Office options /elect the VLW options to con+ert 4icrosoft OLD obGects into the corresponding LibreOffice OLD obGects hen a 4icrosoft document is loaded into LibreOffice &mnemonic' JLK for JloadK). /elect the V/W options to con+ert LibreOffice OLD obGects into the corresponding 4icrosoft OLD obGects hen a document is sa+ed in a 4icrosoft format &mnemonic' J/K for Jsa+eK).

;,42 compatibility
Choices made on the Load Save E +(:L $ompatibilit2 page &5igure 320) affect 2T4L pages imported into LibreOffice and those e6ported from LibreOffice. /ee Chapter 2* /etting up LibreOffice* in the Getting Started guide* and +(:L documentsN importing e*porting in the 2elp* for more information. The main items of interest for Calc users are in the )*port section' LibreOffice Basic and Displa2 warning.

$hapter #" Setting up and $ustomi1ing $alc

3%%

'igure 398: $hoosing +(:L compatibilit2 options #.port / 2ibre=ffice 7asic /elect this option to include LibreOffice 7asic macros &scripts) hen e6porting to 2T4L format. !ou must acti+ate this option before you create the LibreOffice 7asic macroN other ise the script ill not be inserted. LibreOffice 7asic macros must be located in the header of the 2T4L document. Once you ha+e created the macro in the LibreOffice 7asic IDD* it appears in the source te6t of the 2T4L document in the header. If you ant the macro to run automatically hen the 2T4L document is opened* choose ,ools < Customi5e < #vents. /ee Chapter 12* Calc 4acros* for more information. #.port / %isplay warning 3hen the 2ibre=ffice 7asic option &see abo+e) is not selected* the %isplay warning option becomes a+ailable. If the %isplay warning option is selected* then hen e6porting to 2T4L a arning is sho n that LibreOffice 7asic macros ill be lost.

Calc options
Calc must be open in order for the LibreOffice Calc options to be displayed in the Options dialog. Clic0 the e6pansion symbol &R or triangle) by LibreOffice $alc on the left.hand side. , list of subsections drops do n.

'igure 39#: $alc options


$hapter #" Setting up and $ustomi1ing $alc 3%&

(eneral options
In the Options dialog* choose 2ibre=ffice Calc < (eneral.

'igure 399: Selecting general options for $alc

Metrics
Choose the unit of measurement used in spreadsheets and the default tab stops distance.

+pdatin%
Choose hether to update lin0s hen opening a document al ays* only on re@uest* or ne+er. Hegardless of this setting* you can manually update lin0s at any time by selecting ,ools < *pdate < 2inks or pressing '.. /preadsheets that include many or large charts or graphics may load slo ly if this option is set to alwa2s.

nput settin%s section


Press #nter to move selection /pecifies that pressing )nter mo+es the cursor to another cell. If this option is selected* you can also choose the direction the cursor mo+es' up* do n* left* or right. If this option is not selected* pressing )nter places the data into the cell but does not mo+e the cursor. Press #nter to switch to edit mode /pecifies that pressing )nter puts the selected cell into edit mode. To end Ddit mode and mo+e the cursor in the desired direction* press )nter again. #.pand formatting /pecifies hether to automatically apply the formatting attributes of an inserted cell to empty adGacent cells. If* for e6ample* an inserted cell has the bold attribute* this attribute ill also apply to empty adGacent cells. 2o e+er* cells that already ha+e a special format ill not be modified by this function. To see the affected range* press $trl5T &multiplication sign on the number pad). The format ill also apply to all ne +alues inserted ithin this range.

$hapter #" Setting up and $ustomi1ing $alc

3%A

#.pand references when new columnsHrows are inserted /pecifies hether to e6pand references hen inserting columns or ro s adGacent to the reference range. This is only possible if the reference range* here the column or ro is inserted* originally spanned at least t o cells in the desired direction. D6ample' If the range ,1'71 is referenced in a formula and you insert a ne column after column 7* the reference is e6panded to ,1'C1. If the range ,1'71 is referenced and a ne ro is inserted under ro 1* the reference is not e6panded* since there is only a single cell in the +ertical direction. If you insert ro s or columns in the middle of a reference area* the reference is al ays e6panded. ;ighlight selection in columnHrow headings /pecifies hether to highlight column and ro headers in the selected columns or ro s. *se printer metrics for te.t formatting /elect this option to use the properties of the default printer to format the display of a spreadsheet. Those properties can be found by choosing File < Printer +ettings and then select the Properties button for the default printer. If the printer has options for page setup* those settings ill be applied to Calc documents. If this option is not selected* pages ill be configured for a generic printer. +how overwrite warning when pasting data %asting contents of the clipboard into a cell ill replace the contents of that cell ith hat is in the clipboard. /elect this option to be alerted to a possible loss of data hen pasting.

%efaults
Dnter the number of or0sheets to be opened by default hen you start a ne spreadsheet and either accept the default sheet prefi6 or type a ne one. ,fter a spreadsheet has been created* you can add ne sheets and change the label of any tabN see Chapter 1* Introducing Calc* for more information.

>iew options
The options on the LibreOffice $alc E Hiew page &5igure 323) affect the ay the document loo0s and beha+es hen +ie ed onscreen. indo

;isual aids section


(rid lines "rid lines are the borders around the cells of a spreadsheet hen +ie ed onscreen. The options are' +how* +how on colored cells* or ;ide. If grid lines are hidden* tables ill be displayed on a solid bac0ground ith no grid around cells. The color choice o+errides the selection made in ,ools < =ptions < 2ibre=ffice < Appearance < +preadsheet < (rid lines.

?ote

To print grid lines* choose Format < Page < +heet < Print < (rid.

$hapter #" Setting up and $ustomi1ing $alc

3%-

'igure 393: Selecting view options for $alc Page breaks /pecifies hether to +ie the page brea0s ithin a defined print area. ;elplines 8hile 4oving /pecifies hether to +ie helplines hen mo+ing dra ings* frames* graphics* and other obGects. These lines help you align obGects.

'igure 39": +elplines visible when moving a graphic


$hapter #" Setting up and $ustomi1ing $alc 3%.

In 5igure 32=* the graph ith the dar0 bac0ground represents the image in its original location. The lighter area represents the position of the image as it is being mo+ed. 2elplines are the horiFontal and +ertical dotted lines at the corners of the lighter obGect.

ObAects section
Choose hether to sho or hide graphics* charts* and dra ing obGects.

Coo( section
/elect the +ynchroni5e sheets option to apply any selected Foom &magnification) factor to all sheets in the spreadsheet. If this option is not selected* separate Foom factors can be applied to indi+idual sheets.

*ispla$ section
/elect +arious options for the onscreen display. Formulas Display the content of a cell as a formula or as the results of that formula. Dero values Display a Fero in a cell hen the cell has a +alue of Fero* or display an empty cell. Comment indicator /elect this option to sho a small triangle in the top right corner of a cell that contains a comment. If tips are enabled in ,ools < =ptions < 2ibre=ffice < (eneral* the comment ill become +isible hen the mouse pointer ho+ers o+er the cell. Tips ill appear regardless of the setting of this option. To al ays display a comment* right.clic0 on the cell and select +how comment from the conte6t menu. >alue highlighting /elect this option to highlight all +alues* or results of formulas* in the sheet. Te6t is highlighted in blac0N numbers in blueN and formulas* logical +alues* dates* and so on* in green. 3hen this command is acti+e* any colors assigned in the document are not displayed. Anchor If an inserted obGect* such as a picture* is anchored to a cell* an image of an anchor ill appear in the cell to hich the obGect is anchored. ,e.t overflow If a cell contains te6t that is ider than the idth of the cell* the te6t is displayed o+er empty neighboring cells in the same ro . If there is no empty neighboring cell* a small triangle at the cell border indicates that the te6t continues. If this option is selected* te6t ill rap inside the cell and the height of the ro ill e6pand to accommodate the hight of the e6panded cell. +how references in color /elect this option to pro+ide a +isual aid to assist the editing of a formula. Dach reference is then highlighted in color in the formula* and the referenced cell range is enclosed by a colored border as soon as the cell containing the reference is selected for editing.

'igure 39%: 'ormula references E visual aids


$hapter #" Setting up and $ustomi1ing $alc 3&8

Window section
The follo ing elements of the spreadsheet indo can be made +isible or in+isible' column and ro headers* horiFontal and +ertical scroll bars* sheet tabs* and* if an outline has been defined* outline symbols. If the +heet tabs option is not selected* you can only s itch bet een the sheets by using the #a+igator. #ote that there is a slider bet een the horiFontal scrollbar and the sheet tabs that may be set to one end.

'igure 39&: <indow options

Calculate options
$se the LibreOffice $alc E $alculate page to define the calculation settings for spreadsheets.

'igure 39A: $alc calculation options

$hapter #" Setting up and $ustomi1ing $alc

3&#

terative references section


Iterati+e references are formulas that are continuously repeated until the problem is sol+ed. In this section you can choose the number of appro6imation steps carried out during iterati+e calculations and the degree of precision of the ans er. terations /elect this option to enable iterations. If this options is not selected* an iterati+e reference causes an error message. +teps /ets the ma6imum number of iteration steps. 4inimum Change /pecifies the difference bet een t o consecuti+e iteration step results. If the result of the iteration is lo er than the minimum change +alue* then the iteration ill stop.

*ate section
/elect the start date for the internal con+ersion from days to numbers. 1"H'1H1)00 &default) X /ets December 30* 1-<< as day Fero. In calculations* 1anuary 1* 1<00 is used as day one. 11H11H1011 &/tarCalc 1.0) X /ets 1anuary 1* 1<00 as day Fero. $se this setting for /tarCalc 1.0 spreadsheets containing date entries. 11H11H101& X /ets 1anuary 1* 1<0= as day Fero. $se this setting for spreadsheets that are imported from foreign formats.

Ot"er options
/pecify a +ariety of options rele+ant to spreadsheet calculation. Case sensitive /pecifies hether to distinguish bet een upper and lo er case in te6ts hen comparing cell contents. 5or e6ample: type ?Test? in cell ,1N and ?test? in 71. Then type the formula UY,1Y71U in cell C1. If the Case sensitive option is chec0ed* ',LS) ill appear in the cellN if the analysis as case insensiti+e* (3U) ill appear in the cell. This option is not applied to the DQ,CT te6t function* hich is al ays case.sensiti+e. %ecimal places Limits the number of decimals to be displayed for numbers ith the general number format. This o+errides the setting applied in Format < Cells < ?umbers < ?umber < (eneral. This setting refers to ho numbers are displa2ed. 3hen decimal places are limited* calculations are not affected because of rounding. Precision as shown The +alue entered into this field defines the precision used to perform calculations. ,ll numbers ill be rounded to the desired decimal places. #umbers ill be displayed according to the pre+ious setting but calculations ill be less precise because rounded numbers are used in the calculations. +earch criteria Q and R< must apply to whole cells The default search method in Calc is to search for any instance of the target regardless of the position of the target ithin a ord. 5or e6ample* hen searching for day* Calc ill match 5riday* /unday* and days. /elect this option to search an e6act occurence of the target. 3ild card symbols can be used to e6pand the search to match the default condition. That is* searching for ZdayZ ill match 5riday* /unday* and days.

$hapter #" Setting up and $ustomi1ing $alc

3&9

#nable regular e.pressions in formulas /pecifies that regular e6pressions &an e6tended set of ild cards) are enabled hen searching and also for character string comparisons. This relates to the database functions* and to CLOO8$%* 2LOO8$% and /D,HC2. Automatically find column and row labels Calc ill name the range of data* under a column heading or to the right of a ro heading* using the te6t in those headings. D6ample' Cell DB contains the te6t )urope. 7elo * in cell DA* is the +alue 100 and in cell DE the +alue 200. If the Automatically find column and row labels option is selected* you can rite the follo ing formula in cell ,1' Y/$4&Durope).
3hen calculations in+ol+e a range that includes an empty cell* ta0e note of the setting for %isplay Dero values in the 2ibre=ffice Calc < >iew options. If this option is not selected* a +alue of Fero ill display as an empty cell. Dmpty cells and the +alue Fero are treated differently by many functions. 5or e6ample* C"un! ould not include an empty cell as an item to be counted. The a+erage of eight cells* one of hich contains the +alue /$r"* is not the same as the a+erage of se+en cells &an empty cell is not included in determining the a+erage).

Caution

Formula options
$se the LibreOffice $alc E 'ormula options page to specify hether to use Calc or D6cel synta6* as ell as choosing hich separators you prefer to use in formulas. The separators choices o+erride the defaults in Calc and D6cel synta6.

'igure 39-: 'ormula options

$hapter #" Setting up and $ustomi1ing $alc

3&3

For(ula options
Formula synta. /ynta6 is the format in hich formulas are ritten. Choose the synta6 most appropriate for your or0. If you regularly open or sa+e to 4icrosoft D6cel formats* you may ish to use one of the D6cel synta6es. To illustrate the differences bet een synta6es* assume a spreadsheet contains t o sheets. The cell C= can be referenced in three ays'

Calc A1 Yg/heet2.C= X the default synta6 for Calc. #.cel A1 Y/heet2lC= X the default of 4icrosoft D6cel. #.cel 31C1 Y/heet2lHV3WCV2W X tthe relati+e ro and column addressing used in D6cel.
*se #nglish function names The default names for functions in Calc are those for the user?s locale. 5or Dnglish users* the localiFed names are the same as the Dnglish names. 3hen the language set by locale is not Dnglish* you may ish to e6press functions in DnglishN if so* select this option to change formula input and display* function iFard* and formula tips.

*etailed calculation settin%s


4ost users ill not need to change the default setting. 5or custom settings* select Custom and clic0 %etails to choose reference synta6 and hether to treat empty strings as Fero.

!eparators
/eparators are used in functions to distinguish points in the range used in the function' the symbols used bet een elements. Dnter the separator character to be used for functions* ro arrays* and column arrays. 5or e6ample* a comma can be used as a separator in functions and instead of riting Y/$4&,1N71NC1) the function ould be e6pressed as Y/$4&,1*71*C1).

+ort 2ists
/ort lists are used for more than sorting* for e6ample filling a series of cells during data entry. They are lists that are sorted in a particular order but not alphabetically or numericallyN for e6ample* days of the ee0. In addition to the supplied lists* you can define and edit your o n lists* as described in JDefining a fill seriesK in Chapter 2* Dntering* Dditing* and 5ormatting Data.

'igure 39.: Defining sorting lists in $alc

$hapter #" Setting up and $ustomi1ing $alc

3&"

Change options
In the Options dialog* choose 2ibre=ffice Calc < Changes.

'igure 338: $alc options for highlighting changes On this page you can specify options for highlighting recorded changes in spreadsheets. !ou can assign specific colors for insertions* deletions* and other changes* or you can let Calc assign colors based on the author of the changeN in the latter case* one color ill apply to all changes made by that author. The selections made here are applied hen change recording is enabled under File < Changes < 3ecord.

Compatibility options
In the Options dialog* choose 2ibre=ffice Calc < Compatibility. This page pro+ides a @uic0 ay to s itch bet een LibreOfficeMs default 0ey bindings and OpenOffice.orgMs legacy default 0ey bindings for Calc. 4ost of the defaults are identical* but there are some differences.

'igure 33#: $ompatibilit2 options for $alc 4e2 bindings The actions associated ith the t o 0ey binding choices are sho n in Table .

$hapter #" Setting up and $ustomi1ing $alc

3&%

(able 9&: De2 bindings 6ey 7inding 7ac0space Delete ControlRD &CommandRD on 4ac) ,ltRDo n,rro &OptionRDo n,rro on 4ac) %efault Opens Delete Contents dialog Immediately deletes contents 5ills cell content do n selection select header of range no action in empty cell ithin =pen=ffice.org legacy Immediately deletes contents Opens Delete Contents dialog Opens the /election List dialog Increases ro height

(rid options
The "rid page defines the grid settings for spreadsheets. $sing a grid helps you determine the e6act position of any charts or other obGects you may add to a spreadsheet. !ou can also set this grid in line ith the snap grid. If you ha+e acti+ated the snap grid but ish to mo+e or create indi+idual obGects ithout snap positions* you can press the $trl 0ey to deacti+ate the snap grid for as long as needed. In the Options dialog* choose 2ibre=ffice Calc < (rid.

Grid section
Snap to grid acti+ates the snap function. Hisible grid displays grid points on the screen. These points are not printed.

&esolution section
2ere you can set the unit of distance for the spacing bet een horiFontal and +ertical grid points and subdi+isions &intermediate points) of the grid. S2nchroni1e a*es changes the current grid settings symmetrically.

'igure 339: $alc grid options

Print options
In the Options dialog* choose 2ibre=ffice Calc < Print. /ee Chapter A* %rinting* D6porting* and D. mailing* for more about the options on this page.

$hapter #" Setting up and $ustomi1ing $alc

3&&

%efault colors for charts


$se ,ools < =ptions < Charts < %efault Colors to change the default colors used for charts or to add ne data series to the list pro+ided.

'igure 333: Defining chart colors To change the default color for a data series* select it in the left.hand column and then clic0 on the re@uired color in the color table. To add another data series* clic0 Add* then select the ne series and clic0 on the re@uired color. To add ne colors to the color table* see JColor optionsK on page 3=<.

AutoCorrect functions
/ome people find some or all of the items in LibreOfficeMs ,utoCorrect function annoying because they change hat you type hen you do not ant it changed. 4any people find some of the ,utoCorrect functions @uite helpfulN if you do* then select the rele+ant options. 7ut if you find une6plained changes appearing in your document* this is a good place to loo0 to find the cause. To open the ,utoCorrect dialog* clic0 ,ools < AutoCorrect =ptions. !ou need to ha+e a document open for this menu item to appear. In Calc* this dialog has four tabs* as sho n in 5igure 33=. Options are described in the 2elpN many ill be familiar to users of other office suites.

$hapter #" Setting up and $ustomi1ing $alc

3&A

'igure 33": (he ,uto$orrect dialog in $alc

Customi5ing the user interface


4enu font
If you ant to change the menu font from that supplied by LibreOffice to the system font for your operating system* do this' 1) Choose ,ools < =ptions < 2ibre=ffice < >iew. 2) Chec0 *se system font for user interface and clic0 =6.

4enu content
In addition to changing the menu font* you can add and rearrange items on the menu bar* add items to menus* and ma0e other changes. To customiFe menus' 1) Choose ,ools < Customi5e. On the CustomiFe dialog* go to the 4enus page &5igure 33B).

'igure 33%: $ustomi1e menus


$hapter #" Setting up and $ustomi1ing $alc 3&-

2) In the +ave n drop.do n list &h)* choose hether to sa+e this changed menu for Calc or for a selected document. 3) In the section 2ibre=ffice Calc 4enus* select from the 4enu drop.do n list &b) the menu that you ant to customiFe. The list includes all the main menus as ell as sub.menus* hich are menus that are contained under another menu. 5or e6ample* in addition to 'ile* )dit* Hiew* and so on* there is 'ile n Send and 'ile n(emplates. The commands a+ailable for the selected menu are sho n in the central part of the dialog. =) To customiFe the selected menu* clic0 on the 4enu &c) or 4odify &f) buttons. !ou can also add commands to a menu by clic0ing on the Add button &e). These actions are described in the follo ing sections. B) $se the up and do n arro s &g) ne6t to the Dntries list &d) to mo+e the selected menu item to a different position. A) 3hen you ha+e finished ma0ing all your changes* clic0 =6 &not sho n in picture) to sa+e them.

Creatin% a new (enu


In the :enus page of the CustomiFe dialog* clic0 ?ew &b) to display the dialog sho n in 5igure 33A. 1) Type a name for your ne menu in the 4enu name bo6. 2) $se the up and do n arro buttons to mo+e the ne menu into the re@uired position in the list of menu items. Clic0 =6 to sa+e and return to the CustomiFe dialog. The ne menu no appears on the list of menus in the CustomiFe dialog. &It ill appear on the menu bar itself after you sa+e your customiFations.) ,fter creating a ne menu* you need to add some commands to it* as described in J,dding a command to a menuK on page 3E0.

'igure 33&: ,dding a new menu

Modif$in% existin% (enus


To modify an e6isting menu* select it in the 4enu list and clic0 the 4enu button &c) to drop do n a list of modifications' 4ove* 3ename* %elete. #ot all of these modifications can be applied to all the entries in the 4enu list. 5or e6ample* 3ename and %elete are not a+ailable for the supplied menus.

$hapter #" Setting up and $ustomi1ing $alc

3&.

To mo+e a menu &such as 'ile)* choose 4enu < 4ove. , dialog similar to the one sho n in 5igure 33A &but ithout the 4enu name bo6) opens. $se the up and do n arro buttons to mo+e the menu into the re@uired position. To mo+e submenus &such as 'ile X Send)* select the main menu &5ile) in the 4enu list and then* in the 4enu Content section of the dialog* select the submenu &/end) in the Dntries list and use the arro 0eys to mo+e it up or do n in the se@uence. /ubmenus are easily identified in the Dntries list by a small blac0 triangle on the right hand side of the name.

)ddin% a co((and to a (enu


!ou can add commands to the supplied menus and to menus you ha+e created. On the CustomiFe dialog* select the menu in the 4enu list and clic0 the Add button in the 4enu Content section of the dialog.

'igure 33A: ,dding a command to a menu On the ,dd Commands dialog* select a category and then the command* and clic0 Add. The dialog remains open* so you can select se+eral commands. 3hen you ha+e finished adding commands* clic0 Close. 7ac0 on the CustomiFe dialog* you can use the up and do n arro buttons to arrange the commands in your preferred se@uence.

Modif$in% (enu entries


In addition to changing the se@uence of entries on a menu or submenu* you can add submenus* rename or delete the entries* and add group separators. To begin* select the menu or submenu in the 4enu list near the top of the CustomiFe page* then select the entry in the Dntries list under 4enu Content. Clic0 the 4odify button and choose the re@uired action from the drop.do n list of actions. 4ost of the actions should be self.e6planatory. 7egin a group adds a separator line after the highlighted entry.

$hapter #" Setting up and $ustomi1ing $alc

3A8

Creatin% an accelerator
!ou can allocate a letter in a custom menuMs name to be used as a 0eyboard shortcut. &That letter ill become underlined.) 3hen you press ,ltR that letter* that menu or command ill be in+o0ed. D6isting submenus can also be edited to change the letter hich is used to select them using the 0eyboard hen the menu is open. To create an accelerator' 1) /elect a menu item from 4enu or #ntry from the 4enu Content. 2) Clic0 the 4enu button if 4enu as selected or the 4odify button if an Dntry as selected. 3) /elect 3ename. =) ,dd a tilde &k) in front of the letter to use as an accelerator. 5or e6ample* if you had created a ne menu named Art* you ould do this' a) /elect Art from 4enu. b) /elect 4enu and then 3ename. c) Insert a tilde before the letter , in ,rt. d) Clic0 =6 to close the Hename and CustomiFe dialogs. The , in the menu item ,rt is no underlined. %ress ,lt5, and the Art menu ill open.

Caution

3hen assigning an accelerator* be careful not to use a letter that is already assigned to a menu or command associated ith a menu item. The same letter.0ey combinations can be used for commands associated ith different menu items but not for those associated ith the same menu or menu item.

,oolbars
!ou can customiFe toolbars in se+eral ays* including choosing hich icons are +isible and loc0ing the position of a doc0ed toolbar* as described in Chapter 1* Introducing LibreOffice* of the Getting Started guide. This section describes ho to create ne toolbars and add other icons &commands) to the list of those a+ailable on a toolbar. To get to the toolbar customiFation dialog* do any of the follo ing'

On the toolbar* clic0 the arro at the end of the toolbar and choose Customi5e ,oolbar. Choose >iew < ,oolbars < Customi5e from the menu bar. Choose ,ools < Customi5e from the menu bar and pic0 the ,oolbars page &5igure 33-).
To customiFe a toolbar' 1) In the +ave n drop.do n list* choose hether to sa+e this changed toolbar for Calc or for a selected document. 2) In the section 2ibre=ffice Calc ,oolbars* select from the ,oolbar drop.do n list the toolbar that you ant to customiFe. 3) !ou can create a ne toolbar by clic0ing on the ?ew button* or customiFe e6isting toolbars by clic0ing on the ,oolbar or 4odify buttons* and add commands to a toolbar by clic0ing on the Add button. These actions are described belo . =) 3hen you ha+e finished ma0ing all your changes* clic0 =6 to sa+e them.

$hapter #" Setting up and $ustomi1ing $alc

3A#

'igure 33-: (he (oolbars page of the $ustomi1e dialog

Creatin% a new toolbar


To create a ne toolbar' 1) Choose ,ools < Customi5e < ,oolbars from the menu bar. 2) Clic0 ?ew. On the #ame dialog* type the ne toolbar?s name and choose from the +ave n drop.do n list here to sa+e this ne toolbar' for Calc or for a selected document. The ne toolbar no appears on the list of toolbars in the CustomiFe dialog. ,fter creating a ne toolbar* you need to add some commands to it* as described belo .

)ddin% a co((and to a toolbar


If the list of a+ailable buttons for a toolbar does not include all the commands you ant on that toolbar* you can add commands. 3hen you create a ne toolbar* you need to add commands to it. 1) On the Toolbars page of the CustomiFe dialog* select the toolbar in the Toolbar list and clic0 the Add button in the Toolbar Content section of the dialog.
$hapter #" Setting up and $ustomi1ing $alc 3A9

2) The ,dd Commands dialog is the same as for adding commands to menus &5igure 33E). /elect a category and then the command* and clic0 Add. The dialog remains open* so you can select se+eral commands. 3hen you ha+e finished adding commands* clic0 Close. If you insert an item hich does not ha+e an associated icon* the toolbar ill display the full name of the item' the ne6t section describes ho to choose an icon for a toolbar command. 3) 7ac0 on the CustomiFe dialog* you can use the up and do n arro buttons to arrange the commands in your preferred se@uence. =) 3hen you are done ma0ing changes* clic0 =6 to sa+e.

C"oosin% icons for toolbar co((ands


Toolbar buttons usually ha+e icons* not ords* on them* but not all of the commands ha+e associated icons. To choose an icon for a command* select the command and clic0 4odify < Change icon. On the Change Icon dialog &5igure 33<)* scroll through the a+ailable icons* select one* and clic0 =6 to assign it to the command.

'igure 33.: $hange 0con dialog To use a custom icon* create it in a graphics program and import it into LibreOffice by clic0ing the mport button on the Change Icon dialog. Custom icons must be 1A 6 1A or 2A 6 2A pi6els in siFe and cannot contain more than 2BA colors.

6eyboard shortcuts
In addition to using the built.in 0eyboard shortcuts &listed in ,ppendi6 ,)* you can define your o n. !ou can assign shortcuts to standard LibreOffice functions or your o n macros and sa+e them for use ith the entire LibreOffice suite or only for Calc.
7e careful hen reassigning your operating systemMs or LibreOfficeMs predefined shortcut 0eys. 4any 0ey assignments are uni+ersally understood shortcuts* such as '# for 2elp* and are al ays e6pected to pro+ide certain results. ,lthough you can easily reset the shortcut 0ey assignments to the LibreOffice defaults* changing some common shortcut 0eys can cause confusion* frustration and possible data loss or corruption* especially if other users share your computer.

Caution

$hapter #" Setting up and $ustomi1ing $alc

3A3

?ote

/hortcut 0eys that are grayed out in the listing on the CustomiFe dialog* such as '# and '#8= are not a+ailable for reassignment.

To adapt shortcut 0eys to your needs* use the CustomiFe dialog* as described belo . 1) /elect ,ools < Customi5e < 6eyboard. The De2board page of the CustomiFe dialog opens. 2) To ha+e the shortcut 0ey assignment a+ailable only ith Calc* select Calc in the upper right corner of the pageN other ise select 2ibre=ffice to ma0e it a+ailable to e+ery component. 3) #e6t select the re@uired function from the $ategor2 and 'unction lists. =) #o select the desired shortcut 0eys in the Shortcut 4e2s list and clic0 the 4odify button at the upper right. B) Clic0 =6 to accept the change. #o the chosen shortcut 0eys ill e6ecute the function chosen in step 3 abo+e hene+er they are pressed.
,ll e6isting shortcut 0eys for the currently selected 'unction are listed in the De2s selection bo6. If the De2s list is empty* it indicates that the chosen 0ey combination is free for use. If it ere not* and you anted to reassign a shortcut 0ey combination that is already in use* you must first delete the e6isting 0ey.

?ote

Exa(pleD )ssi%nin% st$les to s"ortcut 0e$s


!ou can configure shortcut 0eys to @uic0ly assign styles in your document. 1) On the De2board page of the CustomiFe dialog* choose the shortcut 0eys you ant to assign a style to. In this e6ample* e ha+e chosen $trl53. 2) In the 'unctions section at the bottom of the dialog* scroll do n in the Category list to St2les. Clic0 the R sign to e6pand the list of styles. 3) Choose the category of style. &This e6ample uses a cell style* but you can also choose page styles.) The 'unction list no displays the names of the a+ailable styles for the selected category. The e6ample sho s LibreOfficeMs predefined cell styles. =) To assign $trl53 to be the shortcut 0ey combination for the 2eading style* select +eading in the 'unction list* and then clic0 4odify. $trl53 no appears in the De2s list on the right* and +eading appears ne6t to $trl53 in the /hortcut 0eys bo6 at the top. B) 4a0e any other re@uired changes* and then clic0 =6 to sa+e these settings and close the dialog.

!avin% c"an%es to a file


Changes to the shortcut 0ey assignments can be sa+ed in a 0eyboard configuration file for use at a later time* thus permitting you to create and apply different configurations as the need arises. To sa+e 0eyboard shortcuts to a file' 1) ,fter ma0ing your 0eyboard shortcut assignments* clic0 the +ave button on the CustomiFe dialog. 2) In the /a+e 8eyboard Configuration dialog* select ,ll files from the +ave as ,ype list. 3) #e6t enter a name for the 0eyboard configuration file in the File name bo6* or select an e6isting file from the list. If you need to* bro se to find a file from another location. =) Clic0 +ave. , confirmation dialog appears if you are about to o+er rite an e6isting file* other ise there ill be no feedbac0 and the file ill be sa+ed.

$hapter #" Setting up and $ustomi1ing $alc

3A"

'igure 3"8: ,ssigning a cell st2le to a 4e2 combination

Loadin% a saved 0e$board confi%uration


To load a sa+ed 0eyboard configuration file and replace your e6isting configuration* clic0 the 2oad button near the bottom right of the CustomiFe dialog* and then select the configuration file from the Load 8eyboard Configuration dialog.

&esettin% t"e s"ortcut 0e$s


To reset all of the 0eyboard shortcuts to their default +alues* clic0 the 3eset button near the bottom right of the CustomiFe dialog. $se this feature ith care as no confirmation dialog ill be displayedN the defaults ill be set ithout any further notice or user input.

&unnin% (acros fro( 0e$ co(binations


!ou can also define shortcut 0ey combinations that ill run macros. These shortcut 0eys are strictly user.definedN none are built in. 5or more information on macros* see Chapter 12* Calc 4acros.

Adding functionality with e.tensions


,n e6tension is a pac0age that can be installed into LibreOffice to add ne functionality. ,lthough indi+idual e6tensions can be found in different places* the official LibreOffice e6tension repository is at http'((e6tensions.libreoffice.org(. /ome e6tensions are free of chargeN others are a+ailable for a fee. Chec0 the descriptions to see hat licenses and fees apply to the ones that interest you.

$hapter #" Setting up and $ustomi1ing $alc

3A%

nstalling e.tensions
To install an e6tension that is listed in the repository* follo these steps' 1) In LibreOffice* select ,ools < #.tension 4anager from the menu bar. In the D6tension 4anager dialog* clic0 the (et more e.tensions online lin0. 2) , bro ser indo ill open. 5ind the e6tension you ant and clic0 the (et Fe.tension nameG lin0. 3) Depending on your operating system and bro ser settings* you may be able to select =pen with 2ibre=ffice from the do nload options and install the e6tenstion automatically. =) If the e6tension is do nloaded and sa+ed* return to the D6tension 4anager dialog and clic0 Add. 5ind and select the e6tension you ant to install and clic0 =pen. The e6tension begins installing. !ou may be as0ed to accept a license agreement. B) 3hen the installation is complete* the e6tension is listed in the D6tension 4anager dialog. To install an e6tension that is not listed in the repository* do nload the e6tension* then continue ith step 3 abo+e.

?ote

To install a shared e6tension* you need rite access to the LibreOffice installation directory.

'igure 3"#: (he )*tension :anager dialog

$hapter #" Setting up and $ustomi1ing $alc

3A&

,ppendi* , De2board Shortcuts

ntroduction
!ou can use Calc ithout a pointing de+ice such as a mouse or trac0ball* by using its built.in 0eyboard shortcuts. LibreOffice has a general set of 0eyboard shortcuts* a+ailable in all components* and a component. specific set directly related to the or0 of that component. 5or help ith LibreOfficeMs 0eyboard shortcuts or using LibreOffice ith a 0eyboard only* search the 2elp supplied ith LibreOffice &also a+ailable online at http'((help.libreoffice.org) using the JshortcutK or JaccessibilityK 0ey ords. In addition to using the built.in 0eyboard shortcuts listed in this ,ppendi6* you can define your o n. /ee Chapter 1=* /etting $p and CustomiFing Calc* for instructions. 5ormatting and editing shortcuts are described in Chapter 2* Dntering* Dditing* and 5ormatting Data.

?ote for 4ac users


/ome 0eystro0es and menu items are different on a 4ac from those used in 3indo s and Linu6. The table belo gi+es some common substitutions for the instructions in this chapter. 5or a more detailed list* see the application 2elp. Windows or Linux
,ools < =ptions menu selection 3ight!clic4 $trl 6$ontrol7 '% '##

Mac equivalent
2ibre=ffice < Preferences $ontrol5clic4 &$ommand) ShiftRR'% R(

Effect
,ccess setup options Opens a conte6t menu $sed ith other 0eys Opens the #a+igator Opens the /tyles and 5ormatting indo

?avigation and selection shortcuts


(able 9A: Spreadsheet navigation shortcuts !"ortcut #e$s
$trl5+ome $trl5)nd +ome )nd $trl5Left ,rrow

Effect
4o+es the cursor to the first cell in the sheet &cell ,1). 4o+es the cursor to the last cell on the sheet that contains data. 4o+es the cursor to the first cell of the current ro . 4o+es the cursor to the last cell of the current ro in a column containing data. 4o+es the cursor to the left edge of the current data range. If the column to the left of the cell that contains the cursor is empty* the cursor mo+es to the ne6t column to the left that contains data. 4o+es the cursor to the right edge of the current data range. If the column to the right of the cell that contains the cursor is empty* the cursor mo+es to the ne6t column to the right that contains data.

$trl53ight ,rrow

,ppendi* , De2board Shortcuts

3A-

!"ortcut #e$s
$trl5Up ,rrow

Effect
4o+es the cursor to the top edge of the current data range. If the ro abo+e the cell that contains the cursor is empty* the cursor mo+es up to the ne6t ro that contains data. 4o+es the cursor to the bottom edge of the current data range. If the ro belo the cell that contains the cursor is empty* the cursor mo+es do n to the ne6t ro that contains data. /elects all cells containing data from the current cell to the end of the continuous range of data cells* in the direction of the arro pressed. If used to select ro s and columns together* a rectangular cell range is selected. 4o+es one sheet to the left. In the page pre+ie it mo+es to the pre+ious print page. 4o+es one sheet to the right. In the page pre+ie it mo+es to the ne6t print page. 4o+es the +ie able ro s up one screen. 4o+es the +ie able ro s do n one screen. 4o+es the +ie able columns one screen to the left. 4o+es the +ie able columns one screen to the right. ,dds the pre+ious sheet to the current selection of sheets. If all the sheets in a spreadsheet are selected* this combination only selects the pre+ious sheet. 4a0es the pre+ious sheet the current sheet. ,dds the ne6t sheet to the current selection of sheets. If all the sheets in a spreadsheet are selected* this combination only selects the ne6t sheet. 4a0es the ne6t sheet the current sheet. /elects the data range that contains the cursor. , range is a contiguous cell range that contains data and is bounded by empty ro s and columns. The JVK 0ey is the multiplication sign on the numeric 0ey pad. /elects the matri6 formula range that contains the cursor. The THU 0ey is the di+ision sign on the numeric 0ey pad. 7y default* mo+es the cursor do n one cell in a selected range. To specify the direction that the cursor mo+es* choose ,ools < =ptions < 2ibre=ffice Calc < (eneral.

$trl5Down ,rrow

$trl5Shift5,rrow

$trl5Page Up $trl5Page Down Page Up Page Down ,lt5Page Up ,lt5Page Down Shift5$trl5Page Up

Shift5$trl5Page Down

$trl5T

$trl5 )nter Y in a selected range

,ppendi* , De2board Shortcuts

3A.

Function key shortcuts


(able 9-: 'unction 4e2 shortcuts !"ortcut #e$s
'# Shift5'# $trl5'# '9

Effect
Displays the LibreOffice help bro ser. 3hen the help bro ser is already open '# Gumps to the main help page. Displays conte6t help. Displays the comment that is attached to the current cell. / itches to Ddit mode and places the cursor at the end of the contents of the current cell. If the cursor is in an input bo6 in a dialog that has a minimiFe button* the dialog is hidden and the input bo6 remains +isible. %ress '9 again to sho the hole dialog. Opens the 5unction 3iFard. 4o+es the cursor to the input line here you can enter a formula for the current cell. Opens the :anage @ames dialog. / itches bet een $pper Initials* $%%DH and lo er cases modes. /ho s or hides the Database Sources pane. Hearranges the relati+e or absolute references &for e6ample* ,1* g,g1* g,1* ,g1) in the input field. /ho s or hides the @avigator. Traces dependents. 4o+es the cursor to the #ame bo6. Chec0s spelling in the current sheet. Opens the (hesaurus if the current cell contains te6t. Traces precedents. / itches bet een the standard and e*tended selection modes. In this mode* you can use the arro 0eys to e6tend the selection. !ou can also clic0 in another cell to e6tend the selection. / itches bet een the standard and add selection modes. In this mode* you can easily add indi+idual cells to a range. 2ighlights cells containing numeric +alues &not te6t) blue* and formulas &te6t or number) green* or stop this highlight. Hecalculates all of the formulas in the sheet. $pdates the selected chart. Opens the /tyles and 5ormatting indo here you can apply a formatting style to the contents of the cell or to the current sheet. "roups the selected data range. $ngroups the selected data range.

$trl5'9 Shift5$trl5'9 $trl5'3 Shift5'3 '" Shift5'" '% Shift5'% Shift5$trl5'% 'A $trl5'A Shift5'A '-

Shift5'$trl5''. $trl5'. '## &$ommand5( on 4ac) '#9 $trl5'#9

,ppendi* , De2board Shortcuts

3-8

Arrow key shortcuts


(able 9.. ,rrow 4e2 shortcuts !"ortcut #e$s
,lt5Down ,rrow ,lt5Up ,rrow ,lt5Shift5,rrow De2 ,lt5,rrow De2 E on a selected obGect

Effect
Increases the height of current ro . Decreases the height of current ro . OptimiFes the column idth or ro height based on the current cell. 4o+es ith one pi6el a selected obGect &chart* image* dra ing* form control) to ards the pressed arro &a pressed arro ithout ,lt ill mo+e it less accurately).

Cell formatting shortcuts


$trl5# opens the 5ormat Cells dialog.
The shortcuts listed in Table Table 30 do not or0 under any Linu6 des0top tested. If you ould li0e to ha+e the functionality described in this table* you must create custom 0ey se@uences as e6plained in Chapter 1=* /etting $p and CustomiFing Calc.

?ote

?ote

The shortcut 0eys sho n in Table Table 30 do not use the number 0eys on the number pad. They use the number 0eys abo+e the letter 0eys on the main 0eyboard.

(able 38: $ell formatting shortcut 4e2s !"ortcut #e$s


$trl5Shift5# $trl5Shift59 $trl5Shift53 $trl5Shift5" $trl5Shift5% $trl5Shift5&

Effect
T o decimal places* thousands separator /tandard e6ponential format /tandard date format /tandard currency format /tandard percentage format &t o decimal places) /tandard format

,ppendi* , De2board Shortcuts

3-#

Pivot table shortcuts


(able 3#: Pivot table shortcut 4e2s !"ortcut #e$s
(ab Shift5(ab Up arrow Down arrow Left arrow 3ight arrow +ome )nd ,lt53 ,lt5$ ,lt5D $trl5Up ,rrow $trl5Down ,rrow $trl5Left ,rrow $trl53ight ,rrow $trl5+ome $trl5)nd ,lt5O Delete

Effect
Changes the focus by mo+ing for ard through the areas and buttons of the dialog. Changes the focus by mo+ing bac0 ard through the areas and buttons of the dialog. 4o+es the focus up one item in the current dialog area. 4o+es the focus do n one item in the current dialog area. 4o+es the focus one item to the left in the current dialog area. 4o+es the focus one item to the right in the current dialog area. /elects the first field in the current layout area. /elects the last field in the current layout area. Copies or mo+es the current field into the JHo K area. Copies or mo+es the current field into the JColumnK area. Copies or mo+es the current field into the JDataK area. 4o+es the current field up one place. 4o+es the current field do n one place. 4o+es the current field one place to the left. 4o+es the current field one place to the right. 4o+es the current field to the first place. 4o+e the current field to the last place. Displays the options for the current field. Hemo+es the current field from the area.

,ppendi* , De2board Shortcuts

3-9

Chart shortcuts
(able 39: $hart shortcut 4e2s
!"ortcut #e$s
(ab Shift5(ab 2ome Dnd Dsc ,rro 0eys ,rro 0eys in pie charts 52 in titles 53 CtrlR53 R(X R(X in pie charts

Effect
/elects ne6t obGect. /elects pre+ious obGect. /elects first obGect. /elects last obGect. Cancels selection. 4o+es the obGect in the direction of the arro . 4o+es the selected pie segment in the direction of the arro . Dnters te6t input mode. Opens group so you can edit the indi+idual components &in legend and data series). D6its group &in legend and data series). Dnlarges or reduces the chart. 4o+es the selected pie segment off or into the pie chart.

,ppendi* , De2board Shortcuts

3-3

,ppendi* B Description of 'unctions

Functions available in Calc


Calc pro+ides all of the commonly used functions found in modern spreadsheet applications. /ince many of CalcMs functions re@uire +ery specific and carefully calculated input arguments* the descriptions in this appendi6 should not be considered complete references for each function. Hefer to the application 2elp or the LibreOffice i0i for details and e6amples of all functions. On the i0i* start ith http'((help.libreoffice.org(Calc(5unctionsPbyPCategory O+er 300 standard functions are a+ailable in Calc. 4ore can be added through e6tensions to Calc &see Chapter 1=). The follo ing tables list CalcMs functions organiFed into ele+en categories.
5unctions hose names end ith SA%% are pro+ided for compatibility ith 4icrosoft D6cel functions. They return the same results as the corresponding functions in D6cel & ithout the suffi6)* hich though they may be correct* are not based on international standards. Calc automatically changes the function to P,DD for rele+ant functions in imported D6cel spreadsheets.

?ote

,erminology: numbers and arguments


/ome of the descriptions in this appendi6 define limitations on the number of +alues or arguments that can be passed to the function. /pecifically* functions that refer to the follo ing arguments may lead to confusion'

?umberS1$ numberS"$ ... numberS'1 #umber 1 to 30 a list of up to 30 numbers


There is a significant difference bet een a list of numbers &or integers) and the number of arguments a function ill accept. 5or* e6ample the SU: function ill only accept a ma6imum of 30 arguments. This limit does #OT mean that you can only sum 30 numbers* but that you can only pass 30 separate arguments to the function. ,rguments are +alues separated by commas* and can include ranges hich often refer to multiple +alues. Therefore one argument can refer to se+eral +alues* and a function that limits input to 30 arguments may in fact accept more then 30 separate numerical +alues. This appendi6 attempts to clarify this situation by using the term arguments* rather than any of the other phrases. In the LibreOffice Calc functions* parameters mar0ed as UoptionalU can be left out only hen no parameter follo s. 5or e6ample* in a function ith four parameters* here the last t o parameters are mar0ed as UoptionalU* you can lea+e out parameter = or parameters 3 and =* but you cannot lea+e out parameter 3 alone.
In the tables of functions in this ,ppendi6* se+eral bugs are listedN if you ish to chec0 on the progress of fi6ing those bugs* you can +isit http'((bugs.libreoffice.org( and enter the bug number.

?ote

,ppendi* B Description of 'unctions

3-&

4athematical functions
(able 33: :athematical functions !$ntax
,7/&#umber) ,CO/&#umber) ,CO/2&#umber) ,COT&#umber) ,COT2&#umber) ,/I#&#umber) ,/I#2&#umber) ,T,#&#umber) ,T,#2&numberP6* numberPy)

*escription
Heturns the absolute +alue of the gi+en ?umber. Heturns the in+erse cosine of the gi+en ?umber in radians. Heturns the in+erse hyperbolic cosine of the gi+en ?umber in radians. Heturns the in+erse cotangent of the gi+en ?umber in radians. Heturns the in+erse hyperbolic cotangent of the gi+en ?umber in radians. Heturns the in+erse sine of the gi+en ?umber in radians. Heturns the in+erse hyperbolic sine of the gi+en ?umber in radians. Heturns the in+erse tangent of the gi+en ?umber in radians. Heturns the in+erse tangent of the specified 6 and y coordinates in radians. numberS. is the +alue for the 6 coordinate. numberSy is the +alue for the y coordinate. Heturns the in+erse hyperbolic tangent of the gi+en ?umber. &,ngle is returned in radians.) This is the bit ise J,#DK of t o positi+e integers hose +alues are less than 2o=-. 7oth parameters are re@uired. 7ug E1-10* concerning parameter names in 7IT,#D* 7ITOH* and 7ITQOH.

,T,#2&#umber) 7IT,#D&#umber* #umber)

7ITL/2I5T&#umber* /hift)

The bit ise left shift of an integer +alue. 7oth parameters are re@uired. ?umber is an integer less than 2o=-. +hift is the number of bits to mo+e by. This is the bit ise JOHK of t o positi+e integers hose +alues are less than 2o=-. 7oth parameters are re@uired. The bit ise right shift of an integer +alue. 7oth parameters are re@uired. ?umber is an integer less than 2o=-. +hift is the number of bits to mo+e by. This is the bit ise Je6clusi+e OHK of t o positi+e integers hose +alues are less than 2o=-. 7oth parameters are re@uired. Hounds up the gi+en ?umber to the nearest multiple of the +alue of +ignificance. 4ode is an optional +alue. If the mode +alue is gi+en and not e@ual to Fero* and if number and significance are negati+e* then rounding is done based on the absolute +alue of number. Omit this +alue for D6cel compatibility. Heturns the number of combinations for elements ithout repetition. countS1 is the total number of elements. countS" is the number to be combined from the elements. This is the same as the nCr function on a calculator.

7ITOH&#umber* #umber) 7ITH/2I5T&#umber* /hift)

7ITQOH&number* number) CDILI#"&#umber* /ignificance* 4ode)

CO47I#&countP1* countP2)

,ppendi* B Description of 'unctions

3-A

!$ntax
CO47I#,&countP1* countP2)

*escription
Heturns the number of combinations for a gi+en number of obGects &repetition included). countS1 is the total number of elements. countS" is the number to choose from the elements. Con+erts a +alue from one unit of measurement to another. value is the @uantity to be con+erted. The first te.t is the official abbre+iation for the measurement in @uestion &for e6ample* UmiU for miles). The second te.t parameter gi+es the unit to hich it is to be con+erted. 7oth te6t arguments must be ithin @uotes and are case sensiti+e. The con+ersion is done according to a table in the configuration &main.6cd). 7ug A<B3<' This function does not or0. Heturns the cosine of the ?umber &the angle in radians). Heturns the hyperbolic cosine of the ?umber &the angle in radians). Heturns the cotangent of the ?umber &the angle in radians). Heturns the hyperbolic cotangent of the ?umber &the angle in radians). Heturns the number of empty cells. range is the cell range in hich the empty cells are counted. Heturns the number of cells that meet the criteria ithin a cell range. range is the range to hich the criteria are to be applied. criteria indicates the criteria in the form of a number* a regular e6pression* or a character string by hich the cells are counted. Heturns the number of cells that meet multiple criteria in multiple cell ranges. range 1 &re@uired)* range "$ J$ are the ranges to hich the criteria are to be applied. criteria 1 &re@uired)* criteria "$ J$ indicate the criteria in the form of a number* a regular e6pression* or a character string by hich the cells are e+aluated. ,ll ranges must ha+e the same dimension and siFe. Heturns the cosecant of an angle gi+en in radians &1(/I#&Q)). Heturns the hyperbolic cosecant of a hyperbolic angle &1(/I#2&Q)). Con+erts the gi+en ?umber in radians to degrees. Con+erts from one pre.Duro currency to another. value is the +alue to be con+erted. The fromScurrency is the I/O =21E code of the currency from hich value is to be con+erted. The toScurrency is the I/O =21E code of the currency to hich value is to be con+erted. The entries are not case sensiti+e. The abo+e parameters are re@uired. The optional fullSprecision parameter* if omitted* is 0 or 5,L/D rounds the result to the decimals of the toScurrency. If fullPprecision is TH$D* the result is not rounded. triangulationSprecision is optional. If triangulationSprecision is gi+en and eY3* the intermediate result of a triangular con+ersion &currency1* D$HO* currency2) is rounded to that precision. If triangulationSprecision is omitted* the intermediate result is not rounded. ,lso if toScurrency is UD$HU* triangulationSprecision is used as if triangulation as needed
3--

CO#CDHT&+alue* te6t* te6t)

CO/&#umber) CO/2&#umber) COT&#umber) COT2&#umber) CO$#T7L,#8&range) CO$#TI5&range* criteria)

CO$#TI5/&range 1* criteria 1* range 2* criteria 2* p*)

C/C&,ngle) C/C2&,ngle) DD"HDD/&#umber) D$HOCO#CDHT&+alue* fromPcurrency* toPcurrency* fullPprecision* triangulationPprecision)

,ppendi* B Description of 'unctions

!$ntax

*escription
and con+ersion from Duro to Duro as applied. Con+ersion rates and currency codes can be found here' http'((ec.europa.eu(economyPfinance(euro(adoption(con+ersion( inde6Pen.htm The Cyprus pound has been omitted from this list but is JC!%K. 7ug E1-B0' These are #OT case sensiti+e as stated in the 5unction 3iFard.

DCD#&#umber) DQ%&#umber) 5,CT&#umber) 5LOOH&#umber* /ignificance* 4ode)

Hounds the gi+en ?umber up to the nearest e+en integer* and a negati+e number do n to the ne6t e+en number. Heturns e raised to the po er of the gi+en ?umber. Heturns the factorial of the gi+en ?umber. Hounds the gi+en ?umber do n to the nearest multiple of +ignificance. +ignificance is the +alue to hose multiple the number is to be rounded do n. 4ode is an optional +alue. If it is indicated and non.Fero and if the number and significance are negati+e* rounding is done based on the absolute +alue of the number. #ote' 4any application user interfaces ha+e a 5LOOH function ith only t o parameters* and some hat different semantics than gi+en here &e.g.* they operate as if there as a non.Fero mode +alue). These 5LOOH functions are inconsistent ith the standard mathematical definition of 5LOOH. Heturns the greatest common di+isor of one or more positi+e integers. ntegers . is a list of up to 30 integers* at least one of hich must be greater than Fero* hose greatest common di+isor is to be calculated. This gi+es a result based on international standards. Heturns the greatest common di+isor of a list of numbers. ?umberKsL O is a list of up to 30 numbers* additional to ?umberKsL separated by commas. This gi+es the same results as 4/ D6cel. Hounds the gi+en ?umber do n to the nearest integer. Heturns the least common multiple of one or more integers. nteger 1$ nteger "$ J$ nteger '1 are integers hose lo est common multiple is to be calculated. ?umberKsL O is a list of up to 30 numbers* additional to ?umberKsL* separated by commas. The result is the lo est common multiple of a list of numbers. Heturns the natural logarithm* based on the constant e= of the gi+en ?umber. Heturns the logarithm of the gi+en ?umber &+alue e0) to the specified base. 7ase is the base for the logarithm calculation. If omitted* 10 is assumed. Heturns the base.10 logarithm of a ?umber e0. Heturns the remainder after a number is di+ided by a di+isor. %ividend is the number to be di+ided. %ivisor is the number by hich the di+idend is di+ided.

"CD&Integer 1* Integer 2* p* Integer 30))

"CDP,DD&#umber&s)* #umber&s)1* p* #umber&s)30)

I#T&#umber) LC4&Integer 1* Integer 2* p* Integer 30) LC4P,DD&#umber&s)* #umber&s)1* p* #umber&s)30) L#&#umber) LO"&#umber* 7ase)

LO"10&#umber) 4OD&Di+idend* Di+isor)

,ppendi* B Description of 'unctions

3-.

!$ntax
4HO$#D&#umber* 4ultiple) 4$LTI#O4I,L &#umber&s)* #umber&s)1* p* #umber&s)30)

*escription
Heturns ?umber rounded to the nearest multiple of 4ultiple. Heturns the factorial of the sum of the arguments di+ided by the product of the factorials of the arguments. ?umberKsL O is a list of up to 30 numbers* additional to ?umberKsL* separated by commas. Hounds ?umber up if positi+e and do n if negati+e* to the nearest odd integer. Heturns the +alue of %I to fourteen decimal places. Heturns the result of a number raised to a po er. 7ase is the number that is to be raised to the gi+en po er. #.ponent is the e6ponent by hich the base is to be raised. 4ultiplies all the numbers gi+en as arguments and returns the product. ?umber 1 to ?umber '1 are up to 38 arguments hose product is to be calculated* separated by commas. Heturns the integer result of a di+ision operation. ?umerator is the number that ill be di+ided. %enominator is the number the numerator ill be di+ided by. Con+erts the gi+en ?umber in degrees to radians. Heturns a random number bet een 0 and 1. This number ill recalculate e+ery time data is entered* $trl5Shift5'. or '. is pressed. Heturns an integer random number bet een 7ottom and ,op &inclusi+e). This number ill recalculate hen the $trl5Shift5'. 0ey combination is pressed &not 5< alone). Hounds the gi+en number to count &optional) decimal places. If the count parameter is omitted or Fero* number rounds to the nearest integer. If count is negati+e* the function rounds to the nearest 10* 100* 1000 and so on. Hounds the gi+en number do n* to count &optional) decimal places. If the count parameter is omitted or Fero* number rounds do n to the nearest integer. If count is negati+e* the function rounds do n to the nearest 10* 100* 1000 and so on. #umber rounds to ard Fero. Hounds the gi+en number up to count &optional) decimal places. If the count parameter is omitted or Fero* number rounds up to the nearest integer. If count is negati+e* the function rounds up to the nearest 10* 100* 1000 and so on. #umber rounds a ay from Fero. Heturns the secant of an Angle gi+en in radians. /DC&6)Y1(CO/&6). Heturns the hyperbolic secant of an Angle gi+en in radians. /DC2&6)Y1(CO/2&6).

ODD&#umber) %I&) %O3DH&7ase* D6ponent)

%HOD$CT&#umber 1* #umber 2* p* #umber 30) I$OTID#T&#umerator* Denominator) H,DI,#/&#umber) H,#D&)

H,#D7DT3DD# &7ottom* Top)

HO$#D&number* count)

HO$#DDO3#&number* count)

HO$#D$%&number* count)

/DC&,ngle) /DC2&,ngle)

,ppendi* B Description of 'unctions

3.8

!$ntax
/DHID//$4&Q* #* 4* Coefficients)

*escription
Heturns the sum of a po ers series. /DHID//$4&Q* #* 4* Coefficients) Y coefficientP1Z6in R coefficientP2Z6i&nRm) R coefficientP3Z6i&nR2m) R...R coefficientPiZ6i&nR&i.1)m). O is the number as an independent +ariable. ? is the starting po er. 4 is the increment. Coefficients is a series of coefficients. 5or each coefficient the series sum is e6tended by one section. !ou can only enter coefficients using a cell range.

/I"#&#umber) /I#&number) /I#2&number) /IHT&number) /IHT%I&#umber) /$7TOT,L&5unction* range)

Heturns the sign of the gi+en ?umber. The function returns the result 1 for a positi+e sign* X1 for a negati+e sign* and 0 for Fero. Heturns the sine of the gi+en number &angle in radians). Heturns the hyperbolic sine of the gi+en number &angle in radians). Heturns the positi+e s@uare root of the gi+en number. The +alue of the number must be positi+e. Heturns the s@uare root of the product of the gi+en ?umber and %I. Calculates subtotals. If a range already contains subtotals* these are not used for further calculations. Function is a +alue that stands for another function such as ,+erage* Count* 4in* /um* Car. range is the range hose cells are included. ,dds all the numbers in a range of cells. ?umber 1$ number "$ J$ number '1 are up to 30 arguments hose sum is to be calculated. !ou can also enter a range using cell references. ,dds the cells specified by the gi+en criteria. The search supports regular e6pressions. range is the range to hich the criteria are to be applied. criteria is the cell in hich the search criterion is sho n* or the search criterion itself. sumSrange &optional) is the range from hich +alues are summedN if it has not been entered* the +alues found in the range are summed. If supplied* sumSrange must be the same siFe and shape as range. Totals the +alues of cells in a range that meet multiple criteria in multiple ranges. sumSrange &re@uired) is the cell range from hich the +alues are to be totaled. range 1 &re@uired) is the cell range to be e+aluated by criteria 1 &re@uired)* range " by criteria " and so on. ,ll ranges must ha+e the same siFe and shape. Calculates the sum of the s@uares of numbers &totaling up of the s@uares of the arguments) number 1$ number "$ J$ number '1 are up to 30 arguments* the sum of hose s@uares is to be calculated. Heturns the tangent of the gi+en number &angle in radians). Heturns the hyperbolic tangent of the gi+en number &angle in radians).

/$4&number 1* number 2* p* number 30) /$4I5&range* criteria* sumPrange)

/$4I5/&sumPrange* range 1* criteria 1* range 2* criteria 2* p*)

/$4/I&number 1* number 2* p* number 30)

T,#&number) T,#2&number)

,ppendi* B Description of 'unctions

3.#

!$ntax
TH$#C&number* count)

*escription
Truncates a number by remo+ing decimal places. number is the number hose decimal places are to be trimmed. count &optional) is the number of decimal places hich are retained. If count is missing or Fero* it effecti+ely truncates to a decimal integer. If count is negati+e* it truncates to the left of the decimal point.

Financial analysis functions


A note about dates
Date +alues used as parameters for CalcMs financial functions must comply ith I/O-A01 and be entered surrounded by double @uotes. 5or e6ample* a date representing ,ugust A* 200=* must be entered J200=.0-.0AK* single digits are padded ith leading Feroes. If you do not enter the date +alues as re@uired by the function* you ill not get the correct results. Date formats are locale specific and ill allo other formats to be used. ,mong others* the enP$/ locale allo s J200=(0-(0AK and J0-(0A(200=K for e6ample. Chec0 the 2elp for the acceptable formatting.

A note about interest rates


!ou can enter interest rates in either of t o ays'

,s a decimal. To enter an interest rate as a decimal* di+ide it by 100 before entering it into a
function. 5or e6ample* to compute a loan ith a 3.2Bd interest rate* enter .839% into the function.

,s a percentage. To enter an interest rate as a percentage* type in the interest rate


follo ed by the Z 0ey. 5or e6ample* to compute a loan ith a 3.2Bd interest rate* enter 3.9%Z into the function. If you enter it as 3.9%* the function ill treat it as a 32Bd interest rate. ,ccounting systems +ary in the number of days in a month or a year used in calculations. The follo ing table gi+es the integers used for the basis parameter used in some of the financial analysis functions. (able 3": Basis calculation t2pes :asis
0 or missing 1 2 3 =

Calculation
$/ method &#,/D)* 12 months of 30 days each. D6act number of days in months* e6act number of days in year. D6act number of days in month* year has 3A0 days. D6act number of days in month* year has 3AB days. Duropean method* 12 months of 30 days each.

,ppendi* B Description of 'unctions

3.9

(able 3%: 'inancial anal2sis functions !$ntax


,CCHI#T&Issue* 5irst interest* /ettlement* Hate* %ar* 5re@uency* 7asis)

*escription
Calculates the accrued interest of a security in the case of periodic payments. ssue is the issue date of the security. First interest is the first interest date of the security. +ettlement is the maturity date. 3ate is the annual nominal rate of interest &coupon interest rate). Par is the par +alue of the security. Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Calculates the accrued interest of a security in the case of one.off payment at the settlement date. ssue is the issue date of the security. +ettlement is the maturity date. 3ate is the annual nominal rate of interest &coupon interest rate). Par is the par +alue of the security. 7asis indicates ho the year is to be calculated. Calculates the amount of depreciation for a settlement period as degressi+e amortiFation. $nli0e ,4OHLI#C* a depreciation coefficient that is independent of the depreciable life is used here. Cost is the ac@uisition cost. %ate purchased is the date of ac@uisition. First period is the end date of the first settlement period. +alvage is the sal+age +alue of the capital asset at the end of the depreciable life. Period is the settlement period to be considered. 3ate is the rate of depreciation. 7asis indicates ho the year is to be calculated. Calculates the amount of depreciation for a settlement period as linear amortiFation. If the capital asset is purchased during the settlement period* the proportional amount of depreciation is considered. Cost is the ac@uisition cost. %ate purchased is the date of ac@uisition. First period is the end date of the first settlement period. +alvage is the sal+age +alue of the capital asset at the end of the depreciable life. Period is the settlement period to be considered. 3ate is the rate of depreciation. 7asis indicates ho the year is to be calculated. Heturns the number of days from the first day of interest payment on a security until the settlement date. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Heturns the number of days in the current interest period in hich the settlement date falls. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated.

,CCHI#T4&Issue* /ettlement* Hate* %ar* 7asis)

,4OHDD"HC&Cost* Date purchased* 5irst period* /al+age* %eriod* Hate* 7asis)

,4OHLI#C&Cost* Date purchased* 5irst period* /al+age* %eriod* Hate* 7asis)

CO$%D,!7/&/ettlement* 4aturity* 5re@uency* 7asis)

CO$%D,!/&/ettlement* 4aturity* 5re@uency* 7asis)

,ppendi* B Description of 'unctions

3.3

!$ntax
CO$%D,!/#C&/ettlement* 4aturity* 5re@uency* 7asis)

*escription
Heturns the number of days from the settlement date until the ne6t interest date. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Heturns the date of the first interest date after the settlement date* and formats the result as a date. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Heturns the number of coupons &interest payments) bet een the settlement date and the maturity date. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Heturns the date of the interest date prior to the settlement date* and formats the result as a date. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Calculates the cumulati+e interest payments &the total interest) for an in+estment based on a constant interest rate. 3ate is the periodic interest rate. ?P#3 is the payment period ith the total number of periods. #%DH can also be a non.integer +alue. The Hate and ?P#3 must refer to the same unit* and thus both must be calculated annually or monthly. pv is the current +alue in the se@uence of payments. + is the first period. # is the last period. ,ype is the due date of the payment at the beginning &1) or end &0) of each period. Calculates the accumulated interest for a period. 3ate is the interest rate for each period. ?per is the total number of payment periods. The 3ate and ?per must refer to the same unit* and thus both must be calculated annually or monthly. Pv is the current +alue. +tart period the first payment period for the calculation. #nd period the last payment period for the calculation. ,ype is the due date of the payment at the beginning &1) or end &0) of each period. Heturns the cumulati+e interest paid for an in+estment period ith a constant interest rate. 3ate is the periodic interest rate. ?P#3 is the payment period ith the total number of periods. ?P#3 can also be a non.integer +alue. The 3ate and ?P#3 must refer to the same unit* and thus both must be calculated annually or monthly. P> is the current +alue in the se@uence of payments. + is the first period. # is the last period. ,ype is the due date of the payment at the beginning &1) or end &0) of each period.

CO$%#CD&/ettlement* 4aturity* 5re@uency* 7asis)

CO$%#$4&/ettlement* 4aturity* 5re@uency* 7asis)

CO$%%CD&/ettlement* 4aturity* 5re@uency* 7asis)

C$4I%4T&Hate* #%DH* p+* /* D* Type)

C$4I%4TP,DD&Hate* #per* %+* /tart period* Dnd period* Type)

C$4%HI#C&Hate* #%DH* %C* /* D* Type)

,ppendi* B Description of 'unctions

3."

!$ntax
C$4%HI#CP,DD&Hate* #per* %+* /tart period* Dnd period* Type)

*escription
Calculates the cumulati+e redemption of a loan in a period. 3ate is the interest rate for each period. ?per is the total number of payment periods. The 3ate and ?per must refer to the same unit* and thus both must be calculated annually or monthly. Pv is the current +alue. +tart period is the first payment period for the calculation. #nd period is the last payment period for the calculation. ,ype is the due date of the payment at the beginning &1) or end &0) of each period. Heturns the depreciation of an asset for a specified period using the fi6ed.declining balance method. Cost is the initial cost of an asset. +alvage is the +alue of an asset at the end of the depreciation. 2ife defines the period o+er hich an asset is depreciated. Period is the length of each period. The life must be entered in the same date unit as the depreciation period. month &optional) denotes the number of months for the first year of depreciation. Heturns the depreciation of an asset for a specified period using the arithmetic.declining method. #ote that the boo0 +alue ill ne+er reach Fero under this calculation type. Cost fi6es the initial cost of an asset. +alvage fi6es the +alue of an asset at the end of its life. 2ife is the number of periods defining ho long the asset is to be used. Period defines the length of the period. The period must be entered in the same time unit as the life. Factor &optional) is the factor by hich depreciation decreases. If no +alue is entered* a +alue of 2 is assumed* ma0ing this double declining. Calculates the allo ance &discount) of a security as a percentage. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). Price is the price of the security per 100 currency units of par +alue. 3edemption is the redemption +alue of the security per 100 currency units of par +alue. 7asis indicates ho the year is to be calculated. Con+erts a @uotation that has been gi+en as a decimal fraction into a decimal number. Fractional dollar is a number gi+en as a decimal fraction. &In this number* the decimal +alue is the numerator of the fraction.) Fraction is a hole number that is used as the denominator of the decimal fraction. Con+erts a @uotation that has been gi+en as a decimal number into a mi6ed decimal fraction. The decimal of the result is the numerator of the fraction that ould ha+e Fraction as the denominator. %ecimal dollar is a decimal number. Fraction is a hole number that is used as the denominator of the decimal fraction. Calculates the number of periods re@uired by an in+estment to attain the desired +alue. 3A,# &a constant) is the interest rate to be calculated for the entire duration. Dntering the interest rate di+ided by the periods per year* can calculate the interest after each period. pv is the present +alue. F> is the desired future +alue of the in+estment.

D7&Cost* /al+age* Life* %eriod* month)

DD7&Cost* /al+age* Life* %eriod* 5actor)

DI/C&/ettlement* 4aturity* %rice* Hedemption* 7asis)

DOLL,HDD&5ractional dollar* 5raction)

DOLL,H5H&Decimal dollar* 5raction)

D$H,TIO#&H,TD* p+* 5C)

,ppendi* B Description of 'unctions

3.%

!$ntax
D$H,TIO#P,DD &/ettlement* 4aturity* Coupon* !ield* 5re@uency* 7asis)

*escription
Calculates the duration of a fi6ed interest security in years. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). Coupon is the annual coupon interest rate &nominal rate of interest). Iield is the annual yield of the security. Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Calculates the effecti+e annual rate of interest on the basis of the nominal interest rate and the number of interest payments per annum. #ominal interest refers to the amount of interest due at the end of a calculation period. ?ominal rate is the annual nominal rate of interest. ?pery is the number of interest payments per year. Calculates the effecti+e annual rate of interest on the basis of the nominal interest rate and the number of interest payments per annum. #ominal interest refers to the amount of interest due at the end of a calculation period. ?=4 is the nominal interest. P is the number of interest payment periods per year. Heturns the future +alue of an in+estment based on periodic* constant payments and a constant interest rate. 3ate is the periodic interest rate. ?P#3 is the total number of periods. P4, is the annuity paid regularly per period. P> &optional) is the present cash +alue of an in+estment. ,ype &optional) defines hether the payment is due at the beginning &1) or the end &0) of a period. Calculates the accumulated +alue of the starting capital for a series of periodically +arying interest rates. Principal is the starting capital. +chedule is a series of interest rates. +chedule has to be entered ith cell references* or ith a list. Calculates the annual interest rate that results hen a security &or other item) is purchased at an in+estment +alue and sold at a redemption +alue ith no interest being paid. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security is sold. nvestment is the purchase price. 3edemption is the selling price. 7asis indicates ho the year is to be calculated. Calculates the periodic amortiFation for an in+estment ith regular payments and a constant interest rate. 3ate is the periodic interest rate. Period is the period for hich the compound interest is calculated. ?P#3 is the total number of periods during hich annuity is paid. PeriodY?P#3* if compound interest for the last period is calculated. pv is the present cash +alue in se@uence of payments. F> &optional) is the desired +alue &future +alue) at the end of the periods. ,ype &optional) defines hether the payment is due at the beginning &1) or the end &0) of a period.

D55DCTP,DD&#ominal rate* #pery)

D55DCTICD&#O4* %)

5C&Hate* #%DH* %4T* %C* Type)

5C/C2DD$LD&%rincipal* /chedule)

I#TH,TD&/ettlement* 4aturity* In+estment* Hedemption* 7asis)

I%4T&Hate* %eriod* #%DH* p+* 5C* Type)

,ppendi* B Description of 'unctions

3.&

!$ntax
IHH&Calues* "uess)

*escription
Calculates the internal rate of return for an in+estment. The +alues represent cash flo +alues at regular inter+alsN at least one +alue must be negati+e &payments)* and at least one +alue must be positi+e &income). >alues is an array or cell range containing the +alues. (uess &optional) is the estimated +alue. If you can pro+ide only a fe +alues* you should pro+ide an initial guess to enable the iteration. Calculates the le+el of interest for unchanged amortiFation installments. rate sets the periodic interest rate. Period is the number of installments for calculation of interest. totalSperiods is the total number of installment periods. invest is the amount of the in+estment. Calculates the modified 4acauley duration for a security ith an assumed par +alue of 100 currency units. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). Coupon is the annual nominal rate of interest &coupon interest rate) Iield is the annual yield of the security. Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Calculates the modified internal rate of return of a series of in+estments. >alues corresponds to the array or the cell reference for cells hose content corresponds to the payments. investment is the rate of interest of the in+estments &the negati+e +alues of the array) reinvestSrate is the rate of interest of the rein+estment &the positi+e +alues of the array). Calculates the yearly nominal interest rate* gi+en the effecti+e rate and the number of compounding periods per year. effectSrate is the effecti+e interest rate. npery is the number of periodic interest payments per year. Heturns a percentage. Calculates the yearly nominal rate of interest* gi+en the effecti+e rate and the number of compounding periods per year. #ffectiveSrate is the effecti+e annual rate of interest. ?pery is the number of interest payments per year. Heturns a number. Heturns the number of periods for an in+estment based on periodic* constant payments and a constant interest rate. 3ate is the periodic interest rate. P4, is the constant annuity paid in each period. P> is the present +alue &cash +alue) in a se@uence of payments. F> &optional) is the future +alue* hich is reached at the end of the last period. If 5C is omitted it is assumed to be Fero. ,ype &optional) defines hether the payment is due at the beginning &1) or the end &0) of a period. Heturns the net present +alue of an in+estment based on a series of periodic cash flo s and a discount rate. 3ate is the discount rate for a period. value 1$ value "$ ...$ value '1 are +alues representing deposits or ithdra als.

I/%4T&rate* %eriod* totalPperiods* in+est)

4D$H,TIO#&/ettlement* 4aturity* Coupon* !ield* 5re@uency* 7asis)

4IHH&Calues* in+estment* rein+estPrate)

#O4I#,L&effectPrate* npery)

#O4I#,LP,DD&Dffecti+ePrate* #pery)

#%DH&Hate* %4T* %C* 5C* Type)

#%C&Hate* +alue 1* +alue 2* p* +alue 30)

,ppendi* B Description of 'unctions

3.A

!$ntax
ODD5%HICD&/ettlement* 4aturity* Issue* 5irst coupon* Hate* !ield* Hedemption* 5re@uency* 7asis)

*escription
Calculates the price per 100 currency units par +alue of a security* ha+ing an odd &short or long) first period. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). ssue is the date of issue of the security. First coupon is the first interest date of the security. 3ate is the annual rate of interest. Iield is the annual yield of the security. 3edemption is the redemption +alue per 100 currency units of par +alue. Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Calculates the yield of a security that has an odd &short or long) first period. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). ssue is the date of issue of the security. First coupon is the first interest date of the security. 3ate is the annual rate of interest. Price is the price of the security. 3edemption is the redemption +alue per 100 currency units of par +alue. Fre@uency is the number of interest payments per year &1* 2 or =). 7asis is chosen from a list of options and indicates ho the year is to be calculated. Calculates the price per 100 currency units par +alue of a security* that has an odd &short or long) last period. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). 2ast interest is the last interest date of the security. 3ate is the annual rate of interest. Iield is the annual yield of the security. 3edemption is the redemption +alue per 100 currency units of par +alue. Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Calculates the yield of a security that has an odd &short or long) last period. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). 2ast interest is the last interest date of the security. 3ate is the annual rate of interest. Price is the price of the security. 3edemption is the redemption +alue per 100 currency units of par +alue. Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. , function follo ing the 7lac0 /choles formula. It calculates the pricing of a barrier option. spot &re@uired) is the price(+alue of the asset. vol &re@uired) is the annual +olatility of the asset. rebate &re@uired) is the amount of money paid at maturity if the barrier as hit. putHcall &re@uired) is a string to define if the option is a &p)ut( or a &c)all. knock &re@uired) &i)n(&o)ut is a string to define if the option is of type 0noc0.&i)n or 0noc0.&o)ut. barrierStype &re@uired) is a string to define hether the barrier is obser+ed &c)ontinuosly or only at the &e)nd(maturity. greek is an optional parameter* hich if left out causes the function to return the option price. If included* the function returns price sensiti+ities &"ree0s) to one of the input parameters* such as J+egaK for sensiti+ity to +olatility.
3.-

ODD5!IDLD&/ettlement* 4aturity* Issue* 5irst coupon* Hate* %rice* Hedemption* 5re@uency* 7asis)

ODDL%HICD&/ettlement* 4aturity* Last interest* Hate* !ield* Hedemption* 5re@uency* 7asis)

ODDL!IDLD&/ettlement* 4aturity* Last interest* Hate* %rice* Hedemption* 5re@uency* 7asis)

O%TP7,HHIDH&spot* +ol* r* rf* T* stri0e* barrierPlo * barrierPup* rebate* put(call* 0noc0 in(out* barrierPtype* gree0)

,ppendi* B Description of 'unctions

!$ntax
O%TP%HO7P2IT&spot* +ol* drift* T* barrierPlo * barrierPup)

*escription
Heturns the probability that an asset hits a barrier assuming it follo s

dS = dt + vol dW S

spot is the price(+alue + of the underlying asset. vol is the annual +olatility of the underlying asset. drift is the Z +alue of the formula. , is the time to maturity. barrierSlow is the lo er barrier and set to Fero if there is no lo er barrier. barrierSup is the upper barrier and is set to Fero if there is no upper barrier. ,ll parameters are re@uired. O%TP%HO7PI#4O#D!&spot* +ol* drift* T* barrierPlo * barrierPup* put(call* stri0e) Heturns the probability that an asset ill at maturity end up bet een t o barrier le+els* assuming it follo s

dS = dt + vol dW . &If the last t o optional parameters* S


put(call and stri0e* are specified* the probability of /PT in Vstri0e* upper barrierW for a call* and /PT in Vlo er barrier* stri0eW for a put ill be returned). /PT is the spot at maturity and ignores the possibility of 0noc0.out before maturity. spot &re@uired) is the price(+alue of the asset. vol &re@uired) is the annual +olatility of the asset. drift &re@uired) is the parameter q from the formula abo+e. , is the time to maturity in years. barrierSlow &re@uired) is the lo er barrier and set to Fero if there is no lo er barrier. barrierSup &re@uired) is the upper barrier and is set to Fero if there is no upper barrier. putHcall &optional) is the &p)ut(&c)all indicator. strike &optional) is the stri0e le+el.

O%TPTO$C2&spot* +ol* r* rf* T* barrierPlo * barrierPup* foreign(domestic* 0noc0 in(out* barrierPtype* gree0)

Heturns the pricing of a touch(no.touch option. spot &re@uired) is the price(+alue of the asset. vol &re@uired) is the annual +olatility of the asset. r &re@uired) is the interest rate continuously compounded. rf &re@uired) is the foreign interest rate continuously compounded. , &re@uired) is the time to maturity entered in years. strike &re@uired) is the stri0e le+el of the option. barrierSlow &re@uired) is the lo er barrier and set to Fero if there is no lo er barrier. barrierSup &re@uired) is the upper barrier and is set to Fero if there is no upper barrier. foreignHdomestic &re@uired) is a string to define if the option pays one unit of &d)omestic currency &cash or nothing) or &f)oreign currency &asset or nothing). knock &re@uired) &i)n(&o)ut is a string to define if the option is of type 0noc0.&i)n &touch) or 0noc0.&o)ut &no touch). barrierStype &re@uired) is a string to define hether the barrier is obser+ed &c)ontinuously or only at the &e)nd(maturity. greek is an optional parameter* hich if left out causes the function to return the option price. If included* the function returns price sensiti+ities &"ree0s) to one of the input parameters* such as JthetaK for time sensiti+ity.

,ppendi* B Description of 'unctions

3..

!$ntax
%4T&Hate* #%DH* %C* 5C* Type)

*escription
Heturns the periodic payment for an annuity ith constant interest rates. 3ate is the periodic interest rate. ?P#3 is the number of periods in hich annuity is paid. P> is the present +alue &cash +alue) in a se@uence of payments. F> &optional) is the desired +alue &future +alue) to be reached at the end of the periodic payments. ,ype &optional) defines hether the payment is due at the beginning &1) or the end &0) of a period. Heturns for a gi+en period the payment on the principal for an in+estment that is based on periodic and constant payments and a constant interest rate. 3ate is the periodic interest rate. Period is the amortiFation period. ?P#3 is the total number of periods during hich annuity is paid. P> is the present +alue in the se@uence of payments. F> &optional) is the desired &future) +alue. ,ype &optional) defines hether the payment is due at the beginning &1) or the end &0) of a period. Calculates the price per 100 currency units of par +alue of an interest.bearing security. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). 3ate is the annual nominal rate of interest &coupon interest rate). Iield is the annual yield of the security. 3edemption is the redemption +alue per 100 currency units of par +alue. Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Calculates the price per 100 currency units of par +alue of a discounted security. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). %iscount is the discount of a security as a percentage. 3edemption is the redemption +alue per 100 currency units of par +alue. 7asis indicates ho the year is to be calculated. Calculates the price per 100 currency units of par +alue of a security* that pays interest on the maturity date. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). ssue is the date of issue of the security. 3ate is the interest rate of the security on the issue date. Iield is the annual yield of the security. 7asis indicates ho the year is to be calculated. Heturns the present +alue of an in+estment resulting from a series of regular payments. 3ate defines the interest rate per period. ?P#3 is the total number of payment periods. P4, is the regular payment made per period. F> &optional) defines the future +alue remaining after the final installment has been made. ,ype &optional) defines hether the payment is due at the beginning &1) or the end &0) of a period.

%%4T&Hate* %eriod* #%DH* %C* 5C* Type)

%HICD&/ettlement* 4aturity* Hate* !ield* Hedemption* 5re@uency* 7asis)

%HICDDI/C&/ettlement* 4aturity* Discount* Hedemption* 7asis)

%HICD4,T&/ettlement* 4aturity* Issue* Hate* !ield* 7asis)

%C&Hate* #%DH* %4T* 5C* Type)

,ppendi* B Description of 'unctions

"88

!$ntax
H,TD&#%DH* %4T* %C* 5C* Type* "uess)

*escription
Heturns the constant interest rate per period of an annuity. ?P#3 is the total number of periods* during hich payments are made &payment period). P4, is the constant payment &annuity) paid during each period. P> is the cash +alue in the se@uence of payments. F> &optional) is the future +alue* hich is reached at the end of the periodic payments. ,ype &optional) defines hether the payment is due at the beginning &1) or the end &0) of a period. (uess &optional) determines the estimated +alue of the interest ith iterati+e calculation. Calculates the amount paid out at maturity for a fully in+ested security. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures. nvestment is the purchase sum. %iscount is the percentage discount on ac@uisition of the security. 7asis indicates ho the year is to be calculated. Calculates the interest rate resulting from the profit &return) of an in+estment. P is the number of periods used for calculating the interest rate. pv is the present +alue &must be e0). F> is the final +alue of the security. Heturns the straight.line depreciation of an asset for one period. The amount of the depreciation is constant during the depreciation period. Cost is the initial cost of an asset. +alvage is the +alue of an asset at the end of the depreciation. 2ife is the number of periods in the useful life of the asset. Heturns the arithmetically declining +alue of an asset &depreciation) for a specified period. It uses the /um.of. !ears?.Digits method. Cost is the initial cost of an asset. +alvage is the +alue of an asset after depreciation. 2ife is the period fi6ing the time span o+er hich an asset is depreciated. Period defines the period for hich the depreciation is to be calculated. 4ust use the same units as life. Calculates the bond e@ui+alent yield for a treasury bill. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). The settlement and maturity date must be ithin a year of each other. %iscount is the percentage discount on ac@uisition of the security. Calculated using the 3A0 days in a year basis &basis 2). Calculates the price per 100 currency units face +alue of a treasury bill. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). The settlement and maturity date must be ithin a year of each other. %iscount is the percentage discount upon ac@uisition of the security.

HDCDICDD&/ettlement* 4aturity* In+estment* Discount* 7asis)

HHI&%* p+* 5C)

/L#&Cost* /al+age* Life)

/!D&Cost* /al+age* Life* %eriod)

T7ILLDI&/ettlement* 4aturity* Discount)

T7ILL%HICD&/ettlement* 4aturity* Discount)

,ppendi* B Description of 'unctions

"8#

!$ntax
T7ILL!IDLD&/ettlement* 4aturity* %rice)

*escription
Calculates the yield of a treasury bill. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). The settlement and maturity date must be ithin a year of each other. Price is the price &purchase price) of the treasury bill per 100 currency units of par +alue. Heturns the depreciation of an asset for a specified or partial period using a +ariable declining balance method. Cost is the initial +alue of an asset. +alvage is the +alue of an asset at the end of the depreciation. 2ife is the depreciation duration of the asset. + is the start period of the depreciation* entered in the same date unit as 2ife. end is the last period of the depreciation* entered in the same date unit as 2ife. Factor &optional) is the depreciation factor. If factor is omitted* a factor of t o is assumed &the double.declining balance method). ,ype is an optional parameter. Type Y 1 means a s itch to linear depreciation. In Type Y 0* no s itch is made. Calculates the internal rate of return for a list of payments hich ta0e place on different dates. The calculation is based on a 3AB days per year basis* ignoring leap years. If the payments ta0e place at regular inter+als* use the IHH function. >alues and %ates are a series of payments and the series of associated date +alues entered as cell references. Calues shall include at least one negati+e +alue and one positi+e +alue. (uess &optional) is a guess for the internal rate of return. If omitted* the +alue 10d is assumed. Calculates the capital +alue &net present +alue) for a list of payments hich ta0e place on different dates. The calculation is based on a 3AB days per year basis* ignoring leap years. If the payments ta0e place at regular inter+als* use the #%C function. 3ate is the internal rate of return for the payments. >alues and %ates are a series of payments and the series of associated date +alues entered as cell references. The first +alue.date pair indicates the start of the payments* other dates can be in any order. Calues shall include at least one negati+e +alue and one positi+e +alue. Calculates the yield of a security that pays periodic interest. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). 3ate is the annual rate of interest. Price is the price &purchase price) of the security per 100 currency units of par +alue. 3edemption is the redemption +alue per 100 currency units of par +alue. Fre@uency is the number of interest payments per year &1* 2 or =). 7asis indicates ho the year is to be calculated. Calculates the annual yield of a non.interest.bearing security. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). Price is the price &purchase price) of the security per 100 currency units of par +alue. 3edemption is the redemption +alue per 100 currency units of par +alue. 7asis indicates ho the year is to be calculated.

CD7&Cost* /al+age* Life* /* end* 5actor* Type)

QIHH&Calues* dDates* "uess)

Q#%C&Hate* Calues* Dates)

!IDLD&/ettlement* 4aturity* Hate* %rice* Hedemption* 5re@uency* 7asis)

!IDLDDI/C&/ettlement* 4aturity* %rice* Hedemption* 7asis)

,ppendi* B Description of 'unctions

"89

!$ntax
!IDLD4,T&/ettlement* 4aturity* Issue* Hate* %rice* 7asis)

*escription
Calculates the annual yield of a security* the interest of hich is paid on the date of maturity. +ettlement is the date of purchase of the security. 4aturity is the date on hich the security matures &e6pires). ssue is the date of issue of the security. 3ate is the interest rate of the security on the issue date. Price is the price &purchase price) of the security per 100 currency units of par +alue. 7asis indicates ho the year is to be calculated.

+tatistical analysis functions


Calc includes o+er E0 statistical functions hich enable the e+aluation of data from simple arithmetic calculations* such as a+eraging* to ad+anced distribution and probability computations. /e+eral other statistics.based functions are a+ailable through the ,dd.ins hich are noted at the end of this appendi6. (able 3&: Statistical anal2sis functions !$ntax
,CDDDC&number 1* number 2* p* number 30)

*escription
Heturns the a+erage of the absolute de+iations of data points from their mean. Displays the diffusion in a data set. number 1$ number "$ J$ number '1 are +alues or ranges that represent a sample. Dach number can also be replaced by a reference. Heturns the a+erage of the arguments. number 1$ number "$ J$ number '1 are numerical +alues or ranges. Te6t is ignored. Heturns the a+erage of the arguments. The +alue of te6t is ta0en to be 0. value 1$ value "$ J$ value '1 are +alues or ranges. ,+erages the arguments that meet the conditions. If the optional averageSrange is omitted* range* hich is re@uired* is the range of cells that ill be a+eraged. criteria is a re@uired +alue hich determines hich cells in range are a+eraged. If the optional averageSrange is used* it a+erages the +alues of cells of a range that is constructed using the top left cell of range and applying the dimensions* shape and siFe* of averageSrange. If no cell in range matches the criteria +alue* an Drror is returned. If no numbers are in the range to be a+eraged* an Drror is returned. ,+erages the +alues of the cells in a range that meet multiple criteria in multiple ranges. averageSrange* range 1 and criteria 1 are re@uired +alues. ,+erages the +alues of cells in averageSrange that meet the criteria 1 in range 1 and the criteria " in range "* and so on. ,ll ranges must ha+e the same dimension and siFe* else an Drror is returned. , logical ,#D is applied bet een each array result of each selectionN a cell of averageSrange is e+aluated only if the same position in each array is the result of a criteria match. If no numbers are in the result set to be a+eraged* an Drror is returned.

,CDH,"D&number 1* number 2* p* number 30) ,CDH,"D,&+alue 1* +alue 2* p* +alue 30) ,CDH,"DI5&range* criteria* a+eragePrange)

,CDH,"DI5/&a+eragePrange* range 1* criteria 1* range 2* criteria 2* p* range 30* criteria 30)

,ppendi* B Description of 'unctions

"83

!$ntax
7&trials* /%* TP1* TP2)

*escription
Heturns the probability of a sample ith binomial distribution. trials is the number of independent trials. +P is the probability of success on each trial. ,S1 defines the lo er limit for the number of trials. ,S" &optional) defines the upper limit for the number of trials. Heturns the +alue of the probability density function or the cumulati+e distribution function for the beta distribution. number is the +alue bet een +tart and #nd at hich to e+aluate the function. alpha is a parameter to the distribution. beta is a parameter to the distribution. +tart &optional) is the lo er bound for number. #nd &optional) is the upper bound for number. Cumulative &optional) can be 0 or 5alse to calculate the probability density function. It can be any other +alue or True or omitted to calculate the cumulati+e distribution function.

7DT,DI/T&number* alpha* beta* /tart* Dnd* Cumulati+e)

7DT,I#C&numberN alpha* beta* /tart* Dnd)

Heturns the in+erse of the cumulati+e beta probability density function. number is the +alue bet een +tart and #nd at hich to e+aluate the function. alpha is a parameter to the distribution. beta is a parameter to the distribution. +tart &optional) is the lo er bound for number. #nd &optional) is the upper bound for number. Heturns the indi+idual term binomial distribution probability. O is the number of successes in a set of trials. trials is the number of independent trials. +P is the probability of success on each trial. C Y 0 calculates the probability of a single e+ent and C Y 1 calculates the cumulati+e probability. Heturns the probability +alue that a hypothesis ill be confirmed from the indicated chi s@uare. The probability determined by C2IDI/T can also be determined by C2ITD/T. ?umber is the chi.s@uare +alue of the random sample used to determine the error probability. degreesSfreedom is the degrees of freedom of the e6periment. This function is defined by the OD5 as LD",C!.C2IDI/T. $se C2I/IDI/T for possible greater accuracy.

7I#O4DI/T&Q* trials* /%* C)

C2IDI/T&#umber* degreesPfreedom)

C2II#C&number* degreesPfreedom)

Heturns the in+erse of the one.tailed probability of the chi. s@uared distribution. number is the +alue of the error probability. degreesSfreedom is the degrees of freedom of the e6periment. This function is defined by the OD5 as LD",C!.C2II#C. $se C2I/II#C for possible greater accuracy.

C2I/IDI/T&#umber* Degrees of 5reedom* Cumulati+e)

Heturns the +alue of the probability density function or the cumulati+e distribution function for the chi.s@uare distribution. ?umber is the +alue at hich you ant to e+aluate the distribution. %egrees of Freedom is the number of degrees of freedom. Cumulative &optional) is a logical +alue that determines the form of the function. If cumulati+e is TH$D* C2I/IDI/T returns the cumulati+e distribution functionN if 5,L/D* it returns the probability density function. If omitted* it is assumed TH$D.

,ppendi* B Description of 'unctions

"8"

!$ntax
C2I/II#C&%robability* Degrees of 5reedom)

*escription
Heturns the in+erse of C2I/IDI/T&6* Degrees of 5reedom* TH$D&)). Probability is the probability +alue for hich the in+erse of the chi s@uare distribution is to be calculated. %egrees of Freedom is the number of degrees of freedom.

C2ITD/T&DataP7* dataPD)

Heturns the chi.s@uare distribution from a random distribution of t o test series based on the chi.s@uare test for independence. The probability determined by C2ITD/T can also be determined ith C2IDI/T* in hich case the chi s@uare of the random sample must then be passed as a parameter instead of the data ro . %ataS7 is the array of the obser+ations. dataS# is the range of the e6pected +alues. This function is defined by the OD5 as LD",C!.C2ITD/T. Heturns the &1.alpha) confidence inter+al for a normal distribution. alpha is the le+el of the confidence inter+al. +,%#> is the standard de+iation for the total population. si5e is the siFe of the total population. Heturns the correlation coefficient bet een t o data sets. %ataS1 is the first data set. %ataS" is the second data set. 7oth arrays shall be the same siFe and shape. ,ny empty element or non.numeric +alue in an element ill cause the corresponding element to be ignored. Counts ho many numbers are in the list of arguments. Te6t entries are ignored. value 1$ value "$ J$ value '1 are +alues or ranges hich are to be counted. Counts ho many +alues are in the list of arguments. Te6t entries are also counted* e+en hen they contain an empty string of length 0. If an argument is an array or reference* empty cells ithin the array or reference are ignored. value 1$ value "$ J$ value '1 are up to 30 arguments representing the +alues to be counted. Heturns the co+ariance of the product of paired de+iations. %ataS1 is the first data set. %ataS" is the second data set. ,ny empty element or non.numeric +alue in an element ill cause the corresponding element to be ignored. Heturns the smallest +alue for hich the cumulati+e binomial distribution is less than or e@ual to a criterion +alue. trials is the total number of trials. +P is the probability of success for one trial. alpha is the threshold probability to be reached or e6ceeded. Heturns the sum of s@uares of de+iations based on a sample mean. number 1$ number "$ J$ number '1 are numerical +alues or ranges representing a sample. Heturns the +alue of the probability density function or the cumulati+e distribution function for the e6ponential distribution. ?umber is the +alue of the function. lambda is the parameter +alue. C is a logical +alue that determines the form of the function. C Y 0 calculates the density function* and C Y 1 calculates the distribution function.

CO#5IDD#CD&alpha* /TDDC* siFe)

COHHDL&DataP1* DataP2)

CO$#T&+alue 1* +alue 2* p* +alue 30) CO$#T,&+alue 1* +alue 2* p* +alue 30)

COC,H&DataP1* DataP2)

CHIT7I#O4&trials* /%* alpha)

DDC/I&number 1* number 2* p* number 30) DQ%O#DI/T&#umberN lambda* C)

,ppendi* B Description of 'unctions

"8%

!$ntax
5DI/T&#umber* degreesPfreedomP1* degreesPfreedomP2)

*escription
Calculates the +alues of an 5 probability distribution. ?umber is the +alue for hich the 5 distribution is to be calculated. degreesSfreedomS1 is the degrees of freedom in the numerator in the 5 distribution. degreesSfreedomS" is the degrees of freedom in the denominator in the 5 distribution. In the OD5 specification this is named LD",C!.5DI/T and a ne 5DI/T has been defined hich has yet to be implemented in Calc. Heturns the in+erse of the 5 probability distribution. number is the probability +alue for hich the in+erse 5 distribution is to be calculated. degreesSfreedomS1 is the number of degrees of freedom in the numerator of the 5 distribution. degreesSfreedomS" is the number of degrees of freedom in the denominator of the 5 distribution. In the OD5 specification this is named LD",C!.5I#C and a ne 5I#C has been defined hich has yet to be implemented in Calc. Heturns the 5isher transformation for the gi+en ?umber. 5I/2DH is a synonym for ,T,#2. Heturns the in+erse of the 5isher transformation for the gi+en ?umber. 5I/2DHI#C is a synonym for T,#2. D6trapolates future +alues based on e6isting 6 and y +alues. value is the 6 +alue* for hich the y +alue of the linear regression is to be returned. dataSI is the array or range of 0no n !.+alues. dataSO is the array or range of 0no n Q. +alues. Does not or0 for e6ponential functions. 7oth arrays must be the same siFe and shape. , non.numeric +alue in an element causes the corresponding element to be ignored. Heturns the result of an 5 test. dataS1 is the first record array. dataS" is the second record array. Heturns the +alue of the "amma function. ?umber is the +alue for hich the "amma function is to be calculated. Heturns the +alue of the probability density function or the cumulati+e distribution function for the "amma distribution. ?umber is the +alue for hich the "amma distribution is to be calculated. alpha is the parameter ,lpha of the "amma distribution. beta is the parameter 7eta of the "amma distribution. Cumulative Y 0 calculates the density function* and Cumulative Y 1 calculates the distribution. Heturns the in+erse of the ",44,DI/T&#umber* alpha* beta* TH$D&)). This function allo s you to search for +ariables ith different distribution. ?umber is the probability +alue for hich the in+erse "amma distribution is to be calculated. alpha is the parameter ,lpha of the "amma distribution. beta is the parameter 7eta of the "amma distribution.

5I#C&number* degreesPfreedomP1* degreesPfreedomP2)

5I/2DH&#umber) 5I/2DHI#C&#umber) 5OHDC,/T&+alue* dataP!* dataPQ)

5TD/T&dataP1* dataP2) ",44,&#umber) ",44,DI/T&#umber* alpha* beta* Cumulati+e)

",44,I#C&#umber* alpha* beta)

",44,L#&#umber) ",$//&#umber)

Heturns the natural logarithm of the "amma function for the gi+en ?umber. Heturns 0.B less than the standard normal cumulati+e distribution for the gi+en ?umber.

,ppendi* B Description of 'unctions

"8&

!$ntax
"DO4D,#&number 1* number 2* p* number 30) 2,H4D,#&number 1* number 2* p* number 30)

*escription
Heturns the geometric mean of a sample. number 1$ number "$ J$ number '1 are numerical arguments or ranges that represent the sample. Heturns the harmonic mean of a data set. The harmonic mean is the reciprocal of the arithmetic mean of reciprocals. number 1$ number "$ J$ number '1 are +alues or ranges for hich you ant to calculate the harmonic mean. Heturns the hypergeometric distribution. O is the number of successes achie+ed in the random sample. nSsample is the siFe of the random sample. successes is the number of successes in the total population. nSpopulation is the siFe of the total population. This function does not fully comply ith the OD5 +1.2 specification* ha+ing no logical Cumulative parameter. Calculates the y.+alue at hich a line ill intersect the y.a6is by using 0no n 6.+alues and y.+alues. dataSI is the array of !.+alues. dataSO is the array of Q.+alues #umbers or names* arrays or references containing numbers must be used here.

2!%"DO4DI/T&Q* nPsample* successes* nPpopulation)

I#TDHCD%T&dataP!* dataPQ)

8$HT&number 1* number 2* p* number 30)

Heturns the 0urtosis of a data set &at least = +alues re@uired). number 1$ number "$ J$ number '1 are numerical arguments or ranges representing a random sample of distribution. 8urtosis characteriFes the relati+e pea0edness or flatness of a distribution compared ith the normal distribution. %ositi+e 0urtosis indicates a relati+ely pea0ed distribution &compared to the normal distribution)* hile negati+e 0urtosis indicates a relati+ely flat distribution.

L,H"D&data* Han0Pc)

Heturns the Han0Pc.th largest +alue in a data set. data is the cell range of data. 3ankSc is the ran0ing of the +alue &2nd largest* 3rd largest* etc.) ritten as an integer. Heturns the in+erse of the lognormal distribution for the gi+en number* a probability +alue. mean is the arithmetic mean of the standard logarithmic distribution. +,%#> is the standard de+iation of the standard logarithmic distribution. Heturns the +alue of the probability density function or the cumulati+e distribution function for the lognormal distribution ith the mean and standard de+iation gi+en. ?umber* a probability +alue. mean is the mean +alue of the standard logarithmic distribution. +,%#> is the standard de+iation of the standard logarithmic distribution. Cumulative &optional) Y 0 calculates the density function* Cumulative Y 1 calculates the distribution. Heturns the ma6imum +alue in a list of arguments. number 1$ numberS"$ J$ number '1 are numerical +alues or ranges. #one.numbers are ignored.

LO"I#C&numberN mean* /TDDC)

LO"#OH4DI/T&#umber* mean* /TDDC* Cumulati+e)

4,Q&number 1* number 2* p* number 30)

,ppendi* B Description of 'unctions

"8A

!$ntax
4,Q,&+alue 1* +alue 2* p* +alue 30)

*escription
Heturns the ma6imum +alue in a list of arguments. $nli0e 4,Q* te6t and logical +alues can be entered. Te6t is e+aluated as 0* logical True is treated as 1 and logical 5alse as 0. value 1$ value "$ J$ value '1 are +alues or ranges. Heturns the median of a set of numbers. number 1$ number "$ J$ number '1 are +alues or ranges* hich represent a sample. Dach number can also be replaced by a reference. 4DDI,# logically ran0s the numbers &lo est to highest). If gi+en an odd number of +alues* 4DDI,# returns the middle +alue. If gi+en an e+en number of +alues* 4DDI,# returns the arithmetic a+erage of the t o middle +alues.

4DDI,#&number 1* number 2* p* number 30)

4I#&number 1* number 2* p* number 30) 4I#,&+alue 1* +alue 2* p* +alue 30)

Heturns the minimum +alue in a list of arguments. number 1$ number "$ J$ number '1 are numerical +alues or ranges. Heturns the minimum +alue in a list of arguments. Te6t and logical +alues are e+aluated. Te6t is e+aluated as 0* logical True is treated as 1 and logical 5alse as 0. value 1$ value "$ J$ value '1 are +alues or ranges. Heturns the most common +alue in a data set. number 1$ number "$ J$ number '1 are numerical +alues or ranges. If se+eral +alues ha+e the same fre@uency* it returns the smallest +alue. ,n error occurs if a +alue does not appear more than once. Heturns the negati+e binomial distribution. O is the +alue returned for unsuccessful tests. 3 is the +alue returned for successful tests. +P is the probability of the success of an attempt. #D"7I#O4DI/T returns the probability that there ill be 6 failures before the r.th success* hen the constant probability of a success is sp.

4ODD&number 1* number 2* p* number 30)

#D"7I#O4DI/T&Q* H* /%)

#OH4DI/T&#umber* 4ean* /TDDC* C)

Heturns the +alue of the probability density function or the cumulati+e distribution function for the normal distribution ith the mean and standard de+iation gi+en. ?umber is the +alue for hich the normal distribution is to be calculated. 4ean is the mean +alue of the normal distribution. +,%#> is the standard de+iation of the normal distribution. C Y 0 or 5,L/D it calculates the probability density function* and C Y 1* TH$D or omitted* it calculates the cumulati+e distribution function.

#OH4I#C&number* mean* /TDDC)

Heturns the in+erse of the normal distribution for the gi+en probability +alue* number* in the distribution. mean is the mean +alue in the normal distribution. +,%#> is the standard de+iation of the normal distribution. Heturns the standard normal cumulati+e distribution for the gi+en ?umber. This function is defined as LD",C!.#OH4/DI/T in the OD5 +1.2 specification. This is e6actly #OH4DI/T&6*0*1*TH$D&)).

#OH4/DI/T&#umber)

,ppendi* B Description of 'unctions

"8-

!$ntax
#OH4/I#C&number)

*escription
Heturns the in+erse of the standard normal distribution for the gi+en probability +alue* number. number must be 0 f number f 1. This function is defined as LD",C!.#OH4/I#C in the OD5 +1.2 specification. Heturns the %earson correlation coefficient* r* of t o data sets. %ataS1 is the array of the first data set. %ataS" is the array of the second data set. 5or an empty element or an element of type Te6t or 7oolean in %ataS1 the element at the corresponding position of %ataS" is ignored* and +ice +ersa. 7oth arrays must be the same siFe and shape. Heturns the alpha.percentile of data +alues in an array. data is the array of data. Alpha is the percentile +alue bet een 0 and 1. If ,lpha is not a multiple of 1(&n . 1)* %DHCD#TILD interpolates to determine the +alue bet een t o data points. Heturns the percentage ran0 &percentile) of the gi+en value in a sample. data is the array of data in the sample. Heturns the number of permutations for a gi+en number of obGects ithout repetition. CountS1 is the total number of obGects. CountS" is the number of obGects in each permutation. Heturns the number of permutations for a gi+en number of obGects &repetition allo ed* meaning an obGect can combine ith itself). CountS1 is the total number of obGects. CountS" is the number of obGects in each permutation. Heturns the +alues of the distribution function for a standard normal distribution for the gi+en number. %2I&number) is a synonym for #OH4DI/T&number*0*1*5,L/D&)). Heturns the probability* or the cumulati+e distribution function for the %oisson distribution of ?umber. mean is the middle +alue of the %oisson distribution. Cumulative Y 0 calculates the probability density function* and Cumulative Y 1 calculates the distribution. Heturns the probability that +alues in a range are bet een t o limits. data is the array or range of data in the sample. probability is the array or range of the corresponding probabilities. +tart is the start +alue of the inter+al hose probabilities are to be summed. #nd &optional) is the end +alue of the inter+al hose probabilities are to be summed. If this parameter is missing* then #nd Y +tart +alue is assumed. Heturns the @uartile of a data set. data is the array of data in the sample. ,ype is the number of the @uartile to return. &0 Y 4in* 1 Y 2Bd* 2 Y B0d &4edian)* 3 Y EBd and = Y 4a6). 7ased on the statistical ran0 of the data points in data* I$,HTILD returns the percentile +alue indicated by ,ype. The percentile is calculated as ,ype di+ided by =. The same algorithm used in %DHCD#TILD is used here to interpolate bet een t o data points.

%D,H/O#&DataP1* DataP2)

%DHCD#TILD&data* ,lpha)

%DHCD#TH,#8&data* +alue) %DH4$T&CountP1* CountP2)

%DH4$T,TIO#,&CountP1* CountP2)

%2I&number)

%OI//O#&#umber* mean* Cumulati+e)

%HO7&data* probability* /tart* Dnd)

I$,HTILD&data* Type)

,ppendi* B Description of 'unctions

"8.

!$ntax
H,#8&+alue* Data* Type)

*escription
Heturns the ran0 of the gi+en value in a sample. %ata is the array or range of data in the sample. ,ype &optional) is the ran0ing order* if omitted or 0 data is ran0ed in ascending order* if not 0 data is ran0ed in descending order. Heturns the s@uare of the %earson product moment correlation coefficient based on the gi+en +alues. dataSI is an array of data points. dataSO is an array of data points. The arguments shall be either numbers or names* arrays* or references that contain numbers. If an array or reference argument contains Te6t* Logical +alues* or empty cells* those +alues are ignoredN ho e+er* cells ith the +alue Fero are included. 7oth arrays must ha+e the same siFe and shape.

H/I&dataP!* dataPQ)

/8D3&number 1* number 2* p* number 30) /8D3%&number 1* number 2* p* number 30)

Heturns the s0e ness of a distribution. number 1$ number "$ J$ number '1 are numerical +alues or ranges. There must be a minimum of three numbers. Calculates the s0e ness of a distribution using the population of a random +ariable. number 1$ number "$ J$ number '1 are numerical +alues or ranges. There must be a minimum of three numbers. Heturns the slope of the linear regression line. dataSI is the array or matri6 of ! data. dataSO is the array or matri6 of Q data. 7oth arrays must ha+e the same siFe and shape. 5or an empty element or an element of type Te6t or 7oolean in y the element at the corresponding position of 6 is ignored* and +ice +ersa. Heturns the Han0Pc.th smallest +alue in a data set. data is the cell range of data. 3ankSc is the ran0 of the +alue &2nd smallest* 3rd smallest* etc.) ritten as an integer. Con+erts a random +ariable to a normaliFed +alue. ?umber is the +alue to be standardiFed. mean is the arithmetic mean of the distribution. +,%#> is the standard de+iation of the distribution. Computes the sample standard de+iation of a set of numbers. number 1$ number "$ J$ number '1 are numerical +alues or ranges representing a sample based on an entire population. Calculates the standard de+iation using a sample set of +alues* including +alues of type Te6t and Logical. value 1$ value "$ J$ value '1 are +alues or ranges representing a sample deri+ed from an entire population. Te6t has the +alue 0.

/LO%D&dataP!* dataPQ)

/4,LL&data* Han0Pc)

/T,#D,HDITD&#umber* mean* /TDDC)

/TDDC&number 1* number 2* p* number 30)

/TDDC,&+alue 1* +alue 2* p* +alue 30)

/TDDC%&number 1* number 2* p* number 30)

Calculates the standard de+iation using the population of a random +ariable* including +alues of type Te6t and Logical. number 1$ number "$ J$ number '1 are numerical +alues or ranges representing a sample based on an entire population.

,ppendi* B Description of 'unctions

"#8

!$ntax
/TDDC%,&+alue 1* +alue 2* p* +alue 30)

*escription
Calculates the standard de+iation based on the entire population. value 1$ value "$ J$ value '1 are +alues or ranges representing a sample deri+ed from an entire population. Te6t has the +alue 0. Logical 5,L/D is 0 and logical TH$D is 1. Heturns the standard error of the predicted y +alue for each 6 in the regression. dataSI is the array or matri6 of ! data. dataSO is the array or matri6 of Q data. 7oth arrays must ha+e the same siFe and shape and contain at least three numbers. Heturns the t.distribution for the gi+en ?umber. degreesSfreedom is the number of degrees of freedom for the t.distribution. mode Y 1 returns the one.tailed test* mode Y 2 returns the t o.tailed test. This function is named LD",C!.TDI/T in the OD5 +1.2 specification. Heturns the in+erse of the t.distribution* for the gi+en number associated ith the t o.tailed t.distribution. degreesSfreedom is the number of degrees of freedom for the t.distribution. Heturns the mean of a data set* ignoring a proportion of high and lo +alues. data &re@uired) is the array of data in the sample. Alpha &re@uired) is the fractional number of data points to e6clude from the calculation. 5or e6ample* if Alpha Y 0.2* = points are trimmed from a data set of 20 points &20 6 0.2)' 2 from the top and 2 from the bottom of the set. Heturns the probability associated ith a /tudentMs t.Test. dataS1 is the dependent array or range of data for the first record. dataS" is the dependent array or range of data for the second record. mode Y 1 calculates the one.tailed distribution* mode Y 2 the t o. tailed distribution. ,ype of t. test to perform' paired &1)* e@ual +ariance &homoscedastic) &2)* or une@ual +ariance &heteroscedastic) &3). Calculates the +ariance based on a sample. number 1$ number "$ J$ number '1 are numerical +alues or ranges representing a sample based on an entire population. He@uires at least t o numbers. Dstimates a +ariance based on a sample. value 1$ value "$ J$ value '1 are +alues or ranges representing a sample deri+ed from an entire population. Te6t is e+aluated as 0. Logical TH$D is e+aluated as 1 and 5,L/D as 0. Calculates a +ariance based on the entire population. number 1$ number "$ J$ number '1 are numerical +alues or ranges representing an entire population. Calculates the +ariance based on the entire population. The +alue of te6t is 0. value 1$ value "$ J$ value '1 are +alues or ranges representing an entire population. Te6t is e+aluated as 0. Logical TH$D is e+aluated as 1 and 5,L/D as 0.

/TD!Q&dataP!* dataPQ)

TDI/T&#umber* degreesPfreedom* mode)

TI#C&number* degreesPfreedom)

THI44D,#&data* ,lpha)

TTD/T&dataP1* dataP2* mode* Type)

C,H&number 1* number 2* p* number 30)

C,H,&+alue 1* +alue 2* p* +alue 30)

C,H%&number 1* number 2* p* number 30) C,H%,&+alue 1* +alue 2* p* +alue 30)

,ppendi* B Description of 'unctions

"##

!$ntax
3DI7$LL&#umber* ,lpha* beta* C)

*escription
Heturns the +alues of the 3eibull distribution at the gi+en ?umber. Alpha is the alpha parameter of the 3eibull distribution. beta is the beta parameter of the 3eibull distribution. C indicates the type of function' CY 0 the probability density function is calculated* CY1 the cumulati+e distribution function is calculated. Heturns the t o.tailed % +alue of a F test ith standard distribution. data is the array of the data. mu is the +alue to be tested. sigma &optional) is the standard de+iation of the total population. If this argument is missing* the standard de+iation of the sample is processed.

TTD/T&data* mu* sigma)

%ate and time functions


$se these functions for inserting* editing* and manipulating dates and times. LibreOffice handles and computes a date(time +alue as a number. 3hen you assign the number format J#umberK to a date or time +alue* it is displayed as a number. 5or e6ample* 01(01(2000 12'00 %4* con+erts to 3AB2A.B. This is Gust a matter of formattingN the actual +alue is al ays stored and manipulated as a number. To see the date or time displayed in a standard format* change the number format &date or time) accordingly. To set the default date format used by Calc* go to ,ools < =ptions < 2ibre=ffice Calc < Calculate.

Caution

3hen entering dates* slashes or dashes used as date separators may be interpreted as arithmetic operators. To 0eep dates from being interpreted as parts of formulas* and thus returning erroneous results* al ays place them in @uotation mar0s* for e6ample* U12(0-(B2U. /ee also , note about dates on page 3<2.

(able 3A: Data and time functions !$ntax


D,TD&year* month* day)

*escription
Con+erts a date ritten as year* month* day to an internal serial number and displays it in the cellMs formatting. year is an integer bet een 1B-3 and <<BA or 0 and <<. month is an integer bet een 1 and 12. day is an integer bet een 1 and 31. Heturns the difference in years* months* or days of t o date numbers* +tart date and #nd date. nterval is entered as JyK* JmK or JdK* to return the +alue in years* months or days or as JymK* JmdK or JydK for months ignoring the years +alueN days ignoring the months and years +aluesN or days ignoring the months and years +alues. +tart date and #nd date must be entered using double @uotes. Heturns the date serial number for te6t in double @uotes using the current locale. te.t is a +alid date e6pression. Heturns the day* as an integer* of the gi+en date +alue. ?umber is the date serial number &a negati+e date(time +alue can be entered) or a date +alue entered in double @uotes.

D,TDDI5&/tart date* Dnd date* Inter+al)

D,TDC,L$D&te6t) D,!&#umber)

,ppendi* B Description of 'unctions

"#9

!$ntax
D,!/&DateP2* DateP1)

*escription
Calculates the difference* in days* bet een t o date +alues. %ateS1 is the start date. %ateS" is the end date. If %ateS" is an earlier date than %ateS1* the result is a negati+e number. Dates can be entered as numbers or te6t. Heturns the difference bet een t o dates based on the 3A0 day year used in interest calculations. If %ateS" is earlier than %ateS1* the function ill return a negati+e number. ,ype &optional) determines the type of difference calculation' the $/ method &0) or the Duropean method &r0). Dates can be entered as numbers or te6t. Calculates the number of days in the month of the gi+en %ate. Date can be entered as a number or te6t. Calculates the number of days in the year of the gi+en %ate. Date can be entered as a number or te6t. Heturns the date of Daster /unday for the entered year. year is an integer bet een 1B-3 and <<BA or 0 and << &1<66 or 2066 depending on the option set).. Heturns the serial number of the date a number of 4onths a ay from the gi+en +tart date. Only months are consideredN days are not used for calculation. 4onths is the number of months before &negati+e) or after &positi+e) the start date. +tart date may be entered as te6t or a number. Heturns the serial number date of the last day of a month hich falls 4onths a ay from the gi+en +tart date. 4onths is the number of months before &negati+e) or after &positi+e) the start date. +tart date may be entered as te6t or a number. Heturns the hour* as an integer* for the gi+en time +alue. ?umber is a time +alue and can be either te6t or a number. Determines hether a gi+en %ate falls ithin a leap year. Heturns either 1 &TH$D) or 0 &5,L/D). %ate must be a full date for te6t* a reference to a date +alue or a serial number. Heturns the minute* as an integer* for the gi+en time +alue. ?umber is a time +alue. Heturns the month* as an integer* for the gi+en date +alue. ?umber is a time +alue. Calculates the difference* in months* bet een t o date +alues. +tart date is the start &earlier) date. #nd date is the end date. ,ype determines the type of calculation and is one of t o possible +aluesN 1 returns the difference bet een the calendar month +alues in the t o dates* disregarding the day +aluesN 0 returns the number of months that separate the dates ta0ing into account the day +alues of the t o dates. If #nd date is an earlier date than +tart date* the result is a negati+e number.

D,!/3A0&DateP1* DateP2* Type)

D,!/I#4O#T2&Date) D,!/I#!D,H&Date) D,/TDH/$#D,!&year)

DD,TD&/tart date* 4onths)

DO4O#T2&/tart date* 4onths)

2O$H&#umber) I/LD,%!D,H&Date)

4I#$TD&#umber) 4O#T2&#umber) 4O#T2/&/tart date* Dnd date* Type)

,ppendi* B Description of 'unctions

"#3

!$ntax
#DT3OH8D,!/&/tart date* Dnd date* 2olidays)

*escription
Heturns the number of or0days bet een +tart date and #nd date. 2olidays can be deducted. +tart date is the date from hich the calculation is carried out. #nd date is the date up to hich the calculation is carried out. If the start or end date is a or0day* the day is included in the calculation. ;olidays &optional) is a list of holidays. Dnter a cell range in hich the holidays are listed indi+idually. /aturdays and /undays are considered non. or0days. Heturns the computer system date and time. The +alue is updated hen your document recalculates. #O3&) is a function ithout arguments. Heturns the second* as an integer* for the gi+en time +alue. ?umber is a time +alue. Heturns the time +alue from +alues for hours* minutes and seconds. This function can be used to con+ert a time based on these three elements to a decimal time +alue. hour* minute and second must all be integers. Heturns the time serial number +alue from te.t enclosed by @uotes in a time entry format. The +alue of the decimal number returned is the result of the date system used under LibreOffice to calculate date entries. Heturns the current computer system date. The +alue is updated hen your document recalculates. TOD,!&) is a function ithout arguments. Heturns the day of the ee0 for the gi+en ?umber &date +alue). The day is returned as an integer based on the type. ,ype determines the type of calculation' ,ype Y 1 &assumed if ,ype is omitted)* the ee0days are counted &1.E) starting from /unday &4onday Y 2)N ,ype Y 2* the ee0days are counted &1.E) starting from 4onday &4onday Y 1)N ,ype Y 3* the ee0days are counted &0.A) starting from 4onday &4onday Y 0). Calculates the number of the calendar ee0 of the year for the gi+en date ?umber. mode sets the start of the ee0 and the calculation type' 1 Y /unday* any other +alue Y 4onday. Calculates the calendar ee0 of the year for a %ate. %ate is the date ithin the calendar ee0. 3eturn type sets the start of the ee0 and the calculation type' 1 Y /unday* 2 Y 4onday. This function returns the same results as the 3DD8#$4 function in D6cel. Calculates the difference in ee0s bet een t o dates* +tart date and #nd date. ,ype is one of t o possible +alues* 0 &number of hole ee0s in the inter+al) or 1 &returns the number of different ee0s in hich the t o dates appear). This function uses the I/O ee0number. Calculates the number of ee0s in a year for a gi+en %ate. , ee0 that spans t o years is added to the year in hich most days of that ee0 occur &so any ee0 containing four or more days in the calendar year of %ate is counted).

#O3&)

/DCO#D&#umber) TI4D&hour* minute* second)

TI4DC,L$D&te6t)

TOD,!&)

3DD8D,!&#umber* Type)

3DD8#$4&#umber* mode)

3DD8#$4P,DD&Date* Heturn type)

3DD8/&/tart date* Dnd date* Type)

3DD8/I#!D,H&Date)

,ppendi* B Description of 'unctions

"#"

!$ntax
3OH8D,!&/tart date* Days* 2olidays)

*escription
Heturns a date serial number hich is a specified number of or0 days &%ays) before or after an input date* +tart date. ;olidays &optional) is a list of holidays. Dnter a cell range in hich the holidays are listed indi+idually. 3or0 days e6clude /aturdays and /undays. This function does not fully implement the OD5+1.2 specification hich allo s you to set the non. or0 days. Heturns the calendar year as an integer according to the internal calculation rules. ?umber is the date +alue in date serial number format or as a te6t date* for hich the year is to be returned. D6tracts the number of years &including fractional part) bet een t o date +alues* +tart date and #nd date. 7asis is a +alue either omitted or bet een 0 and =* chosen from a list of options and indicates ho the year is to be calculated &see 2elp files). If omitted it is e+aluated as 0. Calculates the difference in years bet een t o dates' the +tart date and the #nd date. ,ype calculates the type of difference. %ossible +alues are 0 &inter+al) and 1 &in calendar years).

!D,H&#umber)

!D,H5H,C&/tart date* Dnd date* 7asis)

!D,H/&/tart date* Dnd date* Type)

2ogical functions
$se the logical functions to test +alues and produce results based on the result of the test. These functions are conditional and pro+ide the ability to rite longer formulas based on input or output. (able 3-: Logical functions !$ntax
,#D&Logical +alue 1* Logical +alue 2* p* Logical +alue 30)

*escription
Heturns TH$D if all arguments are TH$D. If any element is 5,L/D* this function returns the 5,L/D +alue. 2ogical value 1$ 2ogical value "$ J$ 2ogical value '1 are conditions to be chec0ed. ,ll conditions can be either TH$D or 5,L/D. If a range is entered as a parameter* only logical +alues in the range are e+aluated. The result is TH$D if the logical +alue in all cells ithin the cell range is TH$D. 7ug E0A32' Concerning range statement gi+en in 2elp. /et the logical +alue to 5,L/D. The 5,L/D&) function does not re@uire any arguments. /pecifies a logical test to be performed. ,est is any +alue or e6pression that can be TH$D or 5,L/D. ,henSvalue &optional) is the +alue that is returned if the logical test is TH$D. =therwiseSvalue &optional) is the +alue that is returned if the logical test is 5,L/D. D+aluates valueP if it is not an error it returns the result for value* or else it returns the alternative value. If value e+aluates to a logical +alue* then either 1 &for TH$D)* or 0 &for 5,L/D) is returned.
"#%

5,L/D&) I5&TestN ThenP+alue* Other iseP+alue)

I5DHHOH&+alue* alternati+e +alue)

,ppendi* B Description of 'unctions

!$ntax
I5#,&+alue* alternati+e +alue)

*escription
D+aluates valueP if it is not a h#(, error it returns the result for value* or else it returns the alternative value. If value e+aluates to a logical +alue* then either 1 &for TH$D)* or 0 &for 5,L/D) is returned. He+erses the logical +alue. 2ogical value is the TH$D or 5,L/D +alue to be re+ersed. Heturns TH$D if at least one argument is TH$D. Heturns the +alue 5,L/D if all the arguments ha+e the logical +alue 5,L/D. 2ogical value 1$ 2ogical value "$ J$ 2ogical value '1 are conditions to be chec0ed. ,ll conditions can be either TH$D or 5,L/D. /ets the logical +alue to TH$D. The TH$D&) function does not re@uire any arguments. Computes the logical QOH of the parameters. If an e+en number of parameters is TH$D it returns 5,L/D* if an odd number of parameters is TH$D it returns TH$D.

#OT&Logical +alue) OH&Logical +alue 1* Logical +alue 2* p* Logical +alue 30)

TH$D&) QOH&Logical +alue 1* Logical +alue 2* p* Logical +alue 30)

nformation functions
These functions pro+ide information &or feedbac0) regarding the results of a test for a specific condition* or a test for the type of data or content a cell contains. (able 3.: 0nformational functions !$ntax
CDLL&infoPtype* Heference)

*escription
Heturns information on a cell such as its address* formatting or contents of a cell based on the +alue of the infoPtype argument. infoStype specifies the type of information to be returned and comes from a predefined list of arguments. /ee 2elp files for complete listing. infoStype is not case sensiti+e* but it must be enclosed ithin @uotes. 3eference is the address of the cell to be e6amined. If 3eference is a range* the cell reference mo+es to the top left of the range. If 3eference is missing* Calc uses the position of the cell in hich this formula is located. Calculates the current +alue of a formula at the actual position. Displays in the current location* the formula contained in a cell cell at 3eference position. If no formula at 3eference can be found* or if the presented argument is not a reference* returns the error +alue h#(,. Heturns information about the or0ing en+ironment. ,e.t is a string constant entered in double @uotes ta0en from a list of arguments. /ee the 2elp files for the listing. Heturns TH$D if the referenced cell is blan0* else returns 5,L/D. If value is of type #umber* Te6t* or Logical* return 5,L/D. If value is a reference to a cell* e6amine the cellN if it is blan0 &has no +alue)* return TH$D* but if it has a +alue* return 5,L/D. , cell ith the empty string is not considered blan0.

C$HHD#T&) 5OH4$L,&Heference)

I#5O&Te6t)

I/7L,#8&+alue)

,ppendi* B Description of 'unctions

"#&

!$ntax
I/DHH&+alue)

*escription
Heturns TH$D if the +alue refers to any error +alue e6cept h#(,. !ou can use this function to control error +alues in certain cells. If an error occurs* the function returns a logical or numerical +alue. value is any +alue or e6pression in hich a test is performed to determine hether an error +alue not e@ual to h#(, is present. The I/DHHOH tests if the cells contain general error +alues. I/DHHOH recogniFes the h#(, error +alue. If an error occurs* the function returns a logical or numerical +alue. value is any +alue here a test is performed to determine hether it is an error +alue. Heturns TH$D if the gi+en value is an e+en integer* or 5,L/D if the value is odd. If the value is not an integer* the function e+aluates only the integer part of the +alue. Tests for e+en numbers. Heturns TH$D &1) if the integer part of ?umber returns a hole number hen di+ided by 2. Heturns TH$D if a cell is a formula cell. If an error occurs* the function returns a logical or numerical +alue. reference indicates the reference to a cell in hich the test ill be performed. Heturns TH$D if the cell contains a logical number format. The function is used in order to chec0 for both TH$D and 5,L/D +alues in certain cells. If an error occurs* the function returns a logical or numerical +alue. value is the cell reference to be tested for logical number format. Heturns TH$D if value contains the h#(, &+alue not a+ailable) error +alue. If an error occurs* the function returns a logical or numerical +alue. value is the cell* +alue or e6pression to be tested. Heturn TH$D if the parameter does not ha+e type Te6t* else return 5,L/D. If an error occurs* the function returns a logical or numerical +alue. value is any +alue or e6pression here a test is performed to determine hether it is a te6t or numbers or a 7oolean +alue. Dmpty cells are considered non.te6t and ill return TH$D. Heturns TH$D if value e+aluates to a number. If an error occurs* the function returns a logical or numerical +alue. value is any e6pression to be tested to determine hether it is a number or te6t. TH$D &1) and 5,L/D &0) are e+aluated as numbers. Heturns TH$D if value e+aluates as an odd integer* else 5,L/D. value is truncated to an integer before e+aluation. TH$D &1) and 5,L/D &0) are e+aluated as numbers. Te6t returns an error. Tero is e+aluated 5,L/D. Heturns 1 if ?umber does not return a hole number hen di+ided by 2* else 0. ?umber is the number to be tested. Does not return logical type TH$D(5,L/D li0e I/ODDN returns number.

I/DHHOH&+alue)

I/DCD#&+alue)

I/DCD#P,DD&#umber) I/5OH4$L,&reference)

I/LO"IC,L&+alue)

I/#,&+alue)

I/#O#TDQT&+alue)

I/#$47DH&+alue)

I/ODD&+alue)

I/ODDP,DD&#umber)

,ppendi* B Description of 'unctions

"#A

!$ntax
I/HD5&+alue)

*escription
Heturns TH$D if value is of type reference &including a reference list)* else return 5,L/D. If an error occurs* the function returns a logical or numerical +alue. It does not e+aluate the content of the reference. Heturns TH$D if value is of type te6t* else 5,L/D. If an error occurs* the function returns a logical or numerical +alue. >alue is a +alue* number* 7oolean +alue* or error +alue to be tested. If value is a reference* the content of the reference is e+aluated. Heturn the number of value. If value is a reference the reference content is e+aluated. If value is a logical +alue* 1 is returned for TH$D* else 0. If value is an error it is returned. Te6t returns a 0. Heturns the error +alue h#(,. D+aluates value and returns a number indicating its type. If an error occurs* the function returns the error. The numerical +alue from hich the data type is determined isN 1 Y number* 2 Y te6t* = Y 7oolean +alue* - Y formula* 1A Y error +alue. If value references an empty cell* an error is returned. The results of a formula in a reference are not e+aluated.

I/TDQT&+alue)

#&+alue)

#,&) T!%D&+alue)

%atabase functions
This section deals ith functions used ith data organiFed as one ro of data for one record. The Database category should not be confused ith the 7ase database component in LibreOffice. , Calc database is simply a range of cells that comprises a bloc0 of related data here each ro contains a separate record. There is no connection bet een a database in LibreOffice and the Database category in LibreOffice Calc. The database functions use the follo ing common arguments'

%atabase is a range of cells hich define the database. %atabase field specifies the column hich the function operates on after the search
criteria of the first parameter is applied and the data ro s are selected. It is not related to the search criteria itself. The number 0 specifies the hole data range. To reference a column by using the column header name* place @uotation mar0s around the header name.

+earch criteria is a cell range containing the search criteria.. Dmpty cells in the search
criteria range ill be ignored.
,ll of the search criteria arguments for the database functions support regular e6pressions. 5or e6ample* Jall.Z can be entered to find the first location of Jall follo ed by any characters. To search for te6t that is also a regular e6pression* precede e+ery character ith a m character. !ou can s itch the automatic e+aluation of regular e6pressions on and off in ,ools < =ptions < 2ibre=ffice Calc < Calculate.

?ote

,ppendi* B Description of 'unctions

"#-

(able "8: Database average !$ntax


D,CDH,"D&Database* Database field* /earch criteria) DCO$#T&Database* Database field* /earch criteria) DCO$#T,&Database* Database field* /earch criteria) D"DT&Database* Database field* /earch criteria)

*escription
Heturns the a+erage of the +alues in a gi+en database field from the records &ro s) in a database that match the search criteria. %atabase field cannot be 0 or empty. Counts the number of records &ro s) in a database that match the search criteria and contain numerical +alues. %atabase field can be empty or 0. Counts the number of ro s &records) in a database that match the specified search criteria and contain numeric or alphanumeric +alues. %atabase field can be empty or 0. Heturns the field +alue from a record in a database* hich matches the search criteria. The search criteria must return a single +alue. In case of an error* the function returns either hC,L$Dl for no record or field +alues found* or DrrB02 for more than one cell in the search criteria. Heturns the ma6imum +alue of a field in a database &all records) that matches the specified +earch criteria. The search supports regular e6pressions. Heturns the minimum +alue of a field in a database that matches the specified +earch criteria. The search supports regular e6pressions. 4ultiplies all cells of a data range here the cell contents match the +earch criteria. The search supports regular e6pressions. 5inds the sample standard de+iation in a gi+en field from the records &ro s) in a database that match a search criteria. 5inds the population standard de+iation in a gi+en field from the records &ro s) in a database that match a search criteria. 5inds the sum of +alues in a gi+en field from the records &ro s) in a database that match a search criteria. The search supports regular e6pressions. 5inds the sample +ariance in a gi+en field from the records &ro s) in a database that match a search criteria. 5inds the population +ariance in a gi+en field from the records &ro s) in a database that match a search criteria.

D4,Q&Database* Database field* /earch criteria) D4I#&Database* Database field* /earch criteria) D%HOD$CT&Database* Database field* /earch criteria) D/TDDC&Database* Database field* /earch criteria) D/TDDC%&Database* Database field* /earch criteria) D/$4&Database* Database field* /earch criteria) DC,H&Database* Database field* /earch criteria) DC,H%&Database* Database field* /earch criteria)

,ppendi* B Description of 'unctions

"#.

Array functions
3hen using the 5unction 3iFard for ,rray functions* those returning an array result ha+e the ,rray chec0.bo6 automatically selected. (able "#: ,rra2 functions !$ntax
5HDI$D#C!&data* classes)

*escription
CategoriFes +alues into inter+als and counts the number of +alues in each inter+al. Heturns the results as a +ertical array containing one more result than the number of classes. data is the data that should be categoriFed and counted according to the gi+en inter+als. classes is the array containing the upper boundaries determining the inter+als the +alues in data should be grouped by. Calculates predicted e6ponential gro th by using e6isting data. dataSI is the ! data array. dataSO &optional) is the Q data array. newSdataSO &optional) is the Q data array* for hich the +alues are to be calculated. If newSdataSO is omitted it is assumed to be the same siFe as dataSO. If both arrays are omitted* they are assumed to be the array s1*2*3*...t that is the same siFe as the ! data array. FunctionStype is optional. If FunctionStype Y 1 or omitted* functions in the form y Y bZmi6 are calculated* else y Y mi6 functions are calculated. Heturns the parameters of the &simple or multiple) linear regression e@uation for the gi+en data and* optionally* statistics on this regression. The e@uation for the line is y Y m6 R c* or y Y m161 R m262 R p R c for multiple ranges of 6.+alues* here the dependent y.+alues are a function of the independent 6.+alues. The m.+alues are coefficients corresponding to each 6.+alue* and c is a constant +alue. dataSI is a single ro or column range specifying the y coordinates in a set of data points. dataSO &optional) is a corresponding single ro or column range specifying the 6 coordinates. If dataSO is omitted it defaults to s1*2*3*...* nt. If there is more than one set of +ariables dataSO may be a range ith corresponding multiple ro s or columns. 2inearStype &optional)' if 5,L/D the straight line found is forced to pass through the origin &the constant c is FeroN y Y m6). If omitted* 2inearStype defaults to TH$D &the line is not forced through the origin). stats &optional)' If stats Y 0* only the regression coefficient is calculated. Other ise* other statistics ill be returned* see the 2elp file for full information. Calculates the adGustment of the entered data as an e6ponential regression cur+e &yYbZmi6). dataSI is the ! Data array. dataSO &optional) is the Q data array. FunctionStype &optional)' If FunctionStype Y 0* functions in the form y Y mi6 are calculated. Other ise* y Y bZmi6 functions are calculated. stats &optional). If stats Y 0* only the regression coefficient is calculatedN if stats Y 1 other statistics ill be returned* see the 2elp file for full information. Heturns the determinant of a s@uare array. This function returns a +alue in the current cellN it is not necessary to define a range for the results. array is an array in hich the determinants are defined. The ,rray chec0.bo6 is not automatically selected.

"HO3T2&dataP!* dataPQ* ne PdataPQ* 5unctionPtype)

LI#D/T&dataP!* dataPQ* LinearPtype* stats)

LO"D/T&dataP!* dataPQ* 5unctionPtype* stats)

4DDTDH4&array)

,ppendi* B Description of 'unctions

"98

!$ntax
4I#CDH/D&array) 44$LT&array* array)

*escription
Heturns the in+erse array. array is a s@uare array that is to be in+erted. Calculates the array product of t o arrays. The number of columns for array 1 must e@ual the number of ro s for array 2. array at first place is the first array used in the array product. array at second place is the second array ith the same number of ro s as the first array has columns. 7ug E112-' /ame name for t o +ariables. Heturns the unitary s@uare array of a certain siFe. The unitary array is a s@uare array here the main diagonal &top left to bottom right) elements are set to 1 and all other array elements are set to 0. %imensions refers to the column and ro siFe of the array. 4ultiplies corresponding elements in the gi+en arrays* and returns the sum of those products. Array 1$ Array "$ J$ Array '1 are arrays hose corresponding elements are to be multiplied. ,t least one array must be part of the argument list. If only one array is gi+en* the array elements are summed. ,rrays must ha+e the same siFe and shape. #on numeric elements are treated as 0. The ,rray chec0.bo6 is not automatically selected. Heturns the sum of the difference of the s@uares of corresponding +alues in t o arrays. arrayS. is the first array hose elements are to be s@uared and added. arraySy is the second array hose elements are to be s@uared and subtracted. ,rrays must ha+e the same siFe and shape. The ,rray chec0.bo6 is not automatically selected. Heturns the sum of the sum of the s@uares of the indi+idual +alues in each array. arrayS. is the first array hose arguments are to be s@uared and summed. arraySy is the second array* hose arguments are to be s@uared and summed and then summed ith the result from the first array. ,rrays must ha+e the same siFe and shape. The ,rray chec0.bo6 is not automatically selected. ,dds the s@uares of the difference bet een corresponding +alues in t o arrays. arrayS. is the first array from hose elements the corresponding elements of arraySy are to be subtracted. The results of each subtraction are summed and the results s@uared. ,rrays must ha+e the same siFe and shape. The ,rray chec0.bo6 is not automatically selected. Transposes the ro s and columns of an array. array is the array in the spreadsheet that is to be transposed. Heturns +alues along a linear trend. dataSI is the ! data array. dataSO &optional) is the Q data array. newSdataSO &optional) is the array of the Q data* hich are used for recalculating +alues. If newSdataSO is omitted it is assumed to be the same siFe as dataSO. If both arrays are omitted* they are assumed to be the array s1*2*3*...t that is the same siFe as the ! data array. 2inearStype is optional. If 2inearStype Y 1 or omitted* functions in the form y Y m6 R c are calculated* else y Y m6 functions are calculated.

4$#IT&Dimensions)

/$4%HOD$CT&,rray 1* ,rray 2* p* ,rray 30)

/$4Q24!2&arrayP6* arrayPy)

/$4Q2%!2&arrayP6* arrayPy)

/$4Q4!2&arrayP6* arrayPy)

TH,#/%O/D&array) THD#D&dataP!* dataPQ* ne PdataPQ* LinearPtype)

,ppendi* B Description of 'unctions

"9#

+preadsheet functions
$se spreadsheet functions to search and address cell ranges and pro+ide feedbac0 regarding the contents of a cell or range of cells. !ou can use functions such as 2!%DHLI#8&) and DDD&) to connect to other documents or data sources. (able "9: Spreadsheet functions !$ntax
,DDHD//&ro * column* ,7/* ,1* sheet)

*escription
Heturns a cell address &reference) as te6t* according to the specified ro and column numbers. Optionally* hether the address is interpreted as an absolute address &for e6ample* g,g1) or as a relati+e address &as ,1) or in a mi6ed form &,g1 or g,1) can be determined. The name of the sheet can also be specified. row &re@uired) is the ro number for the cell reference. column &re@uired) is the column number for the cell reference &the number* not the letter). A7+ &optional) determines the type of reference and is a +alue bet een 1 and =. /ee the 2elp files for e6planation of list numbers. Optional A1 if set to 0 uses the H1C1 notation* else it uses the ,1 notation. Optional sheet is the name of the sheet entered in double @uotes. If using H1C1 notation* ,DDHD// returns address strings using the e6clamation mar0 ?l? as the sheet name separator. The function still uses the dot ?.? sheet name separator ith ,1 notation. 3hen opening documents from OD5 1.0(1.1 format* the ,DDHD// functions that sho a sheet name as the fourth parameter ill shift that sheet name to become the fifth parameter. , ne fourth parameter ith the +alue 1 ill be inserted. 3hen sa+ing a document in OD5 1.0(1.1 format* if the ,DDHD// function has a fourth parameter* that parameter ill be remo+ed. , spreadsheet should not be sa+ed in the old OD5 1.0(1.1 format if A1 is set to 0.

,HD,/&reference)

Heturns the number of indi+idual ranges that belong to a multiple range. , range can consist of contiguous cells or a single cell. reference is a reference list of the ranges. The function e6pects a single argument. 4ultiple ranges can be entered using the tilde &k) &$nion) operator or a semicolon &N) as the di+ider* but the semicolon gets automatically con+erted to the tilde operator after the function is entered into the spreadsheet. If you state multiple ranges and you use the semicolon separator* you must enclose them in additional parentheses. The tilde is the union range operator. /ee Chapter E for range operators. 4ultiple ranges can be entered into the reference input bo6 in t o ays. 5irstly they can be be typed directly into the argument?s input bo6* noting the parentheses constraint mentioned abo+e for the semicolon. /econdly* by clic0ing the +hrink button to the right of the input bo6 and then clic0ing and dragging in the sheet to select cell ranges. ,dd the range operator bet een selections. #ote the parentheses constraint abo+e for use of the semicolon. 7ug E122B concerning problems inputting data.

,ppendi* B Description of 'unctions

"99

!$ntax
C2OO/D&Inde6* +alue1* p* +alue30)

*escription
Heturns a +alue from a list of up to 30 +alues. nde. is a reference or number bet een 1 and 30 indicating hich +alue is to be ta0en from the list. value1$ J$ value'1 is the list of +alues entered as any number type* reference* or formula e6pression. Only the selected +alue from the list is e+aluated* any other formulas in the list are not chec0ed for +alidity. Heturns the column number of a reference. If the reference is a single cell* the column number of the cell is returnedN if the parameter is a cell range containing more than one column* the corresponding column numbers are returned in a single.ro array* if the formula is entered as an array formula. If the cell range is not entered as an array formula* only the column number of the first cell ithin the range is determined. If no reference is entered* the column number of the cell in hich the formula is entered is returned as Calc automatically sets the reference to the current cell. Heturns the number of columns in the gi+en reference. array is the reference to a cell range hose total number of columns is to be found. The argument can also be a single cell. Dynamic Data D6change. Heturns the result of a DDD re@uest. If the contents of the lin0ed range or section changes* the returned +alue ill also change. The spreadsheet can be reloaded* or #dit < 2inks selected* to see the updated lin0s. Cross.platform lin0s* for e6ample from an LibreOffice installation running on a 3indo s machine to a document created on a Linu6 machine* are not supported. server is the name of a ser+er application. LibreOffice applications ha+e the ser+er name J/officeK. File is the complete file name* including path. range is the area containing the data to be e+aluated. mode is an optional parameter that controls the method by hich the DDD ser+er con+erts its data into numbers. /ee the 2elp files for information on choices. ,n earlier bug that caused this function to crash LibreOffice has been fi6ed in +=.1.= and later releases.

COL$4#&reference)

COL$4#/&array)

DDD&ser+er* 5ile* range* mode)

DHHOHT!%D&reference)

D+aluates the cell +alue at reference location. If the cell contains an error then a logical or numerical +alue is returned else it returns h#(,. The numerical +alue is the error number &see 2elp for full listing). 5or a cell containing the h#(, error* a +alue of 32EAE is returned.

,ppendi* B Description of 'unctions

"93

!$ntax
"DT%ICOTD,T,&Data 5ield* %i+ot Table* 5ield #ame(Item1* 5ield #ame(Item2* p* 5ield #ame(Item30) This is the synta6 used in the 5unction 3iFard.

*escription
The "DT%ICOTD,T, function returns a calculated result +alue from a pi+ot table. The +alue is addressed using field and item names* so it remains +alid if the layout of the pi+ot table changes. T o different synta6 definitions can be used' the synta6 sho n on the left and "DT%ICOTD,T,&%i+ot Table* Constraints) 5or synta6 1* %ata Field is a string that selects one of the pi+ot table?s data fields. The string can be the name of the source column* or the data field name as sho n in the table &li0e U/um X /alesU). Pivot ,able is a reference to a cell or cell range that is positioned ithin a pi+ot table or contains a pi+ot table. If the cell range contains se+eral pi+ot tables* the table that as created last is used. If no Field ?ame H temO pairs are gi+en* the grand total is returned. Other ise* each pair adds a constraint that the result must satisfy. Field ?ame is the name of a field from the pi+ot table. temO is the name of an item from that field. , ma6imum of 30 Field ?ameH temO pairs can be entered. The second synta6 is assumed if e6actly t o parameters are gi+en* Pivot ,able has the same meaning as in the first synta6. Constraints is a space.separated list. Dntries can be @uoted &single @uotes). The hole string must be enclosed in @uotes &double @uotes)* unless you reference the string from another cell. /ee the 2elp file for detailed information. In some +ersions of LibreOffice* the second synta6 +ariation returns a hHD5 error. /ee 7ug E123=.

2LOO8$%&searchPcriteria* array* Inde6* sorted)

/earches for a +alue gi+en in searchScriteria in the first ro of the gi+en array* and returns the +alue from the ro gi+en in nde. for the column in hich the search item as found. If sorted is 0 or 5,L/D the first ro of array need not be sorted* else the first ro of array must be sorted in alpha.numerical and logical order. The search supports regular e6pressions. 3hen the te6t in a cell that contains the 2!%DHLI#8 function is Ctrl.clic0ed &the cursor becomes a pointing hand hen correctly positioned)* the hyperlin0 opens. *32 specifies the lin0 target. The optional Cell,e.t argument is the te6t displayed in the cell. If either argument is a te6t string* it must be entered in double @uotes. If the Cell,e.t parameter is not specified* the *32 te6t is displayed.

2!%DHLI#8&$HL* CellTe6t)

,ppendi* B Description of 'unctions

"9"

!$ntax
I#DDQ&reference* ro * column* range)

*escription
"i+en a reference* returns the +alue at the gi+en row and column intersection &starting numbering at 1* relati+e to the top left of the reference) of the gi+en area range. If range is not gi+en* it is assumed to be 1 &the first and possibly only area). If row is omitted or empty or 0* an entire column of the gi+en area range in reference is returned. If column is omitted or empty or 0* an entire ro of the gi+en area range in reference is returned. If both* row and column* are omitted or empty or 0* the entire gi+en area range is returned. If reference is a one.dimensional column +ector* column is optional or can be omitted. If reference is a one. dimensional ro +ector* row is optional* hich effecti+ely ma0es row act as the column offset into the +ector* or can be omitted. If row or column ha+e a +alue greater than the dimension of the corresponding gi+en area range* an Drror is returned. The Array chec0bo6 must be selected in this function unless row and column are both included. 7ug E132B' Heturns hC,L$D error hen optional arguments are omitted.

I#DIHDCT&ref* ,1)

Heturns a reference gi+en a string representation of a reference as ref. This function can also be used to return the area of a corresponding string. ref is a reference to a cell or an area &in te6t form) from hich to return the contents. $nless ref refers to a cell containing a reference* ref must be entered in double @uotes. A1 &optional) . if set to 0* the H1C1 notation is used. If this parameter is absent or set to another +alue than 0* the ,1 notation is used. Heturns the contents of a cell either from a one.ro or one. column range or from an array. Optionally* the assigned +alue &of the same inde6) is returned in a different column and ro . ,s opposed to CLOO8$% and 2LOO8$%* search and result +ectors may be at different positionsN they do not ha+e to be adGacent. ,dditionally* the search +ector for the LOO8$% must be sorted ascending* other ise the search ill not return any usable results. The search supports regular e6pressions. +earch criterion is the +alue to be searched forN entered either directly or as a reference. +earch vector is the single.ro or single.column area to be searched. resultSvector is another single.ro or single. column range from hich the result of the function is ta0en. The result is the cell of the result +ector ith the same inde6 as the instance found in the search +ector. 3hen gi+en t o parameters* +earch vector is first e6amined' If +earch vector is s@uare or is taller than it is ide &more ro s than columns)* LOO8$% searches in the first column &similar to CLOO8$%)* and returns the corresponding +alue in the last column. If +earch vector co+ers an area that is ider than it is tall &more columns

LOO8$%&/earch criterion* /earch +ector* resultP+ector)

,ppendi* B Description of 'unctions

"9%

!$ntax

*escription
than ro s)* LOO8$% searches in the first ro &similar to 2LOO8$%)* and returns the corresponding +alue in the last ro . 7ug E1B-<' This fails if an alphabetic character is used for the search criterion.

4,TC2&/earch criterion* loo0upParray* Type)

Heturns the relati+e position of an item in an array that matches a specified +alue. The function returns the position of the +alue found in lookupSarray as a number. +earch criterion is the +alue hich is to be searched for. lookupSarray is the +ector to be searched. , loo0up array can be a single ro or column* or part of a single ro or column. ,ype may ta0e the +alues 1* 0* X1 or be omitted. If ,ype is +alue 1 or omitted* lookupSarray must be sorted ascending and the function finds the largest +alue that is less than or e@ual to +earch criterion. If ,ype is of +alue 0 the function finds the largest +alue that is less than or e@ual to +earch criterion. Calues in lookupSarray do not need to be sorted. If ,ype is of +alue .1* the function returns the smallest +alue that is greater than or e@ual to +earch criterion in a lookupSarray here +alues are sorted in descending order. The search supports regular e6pressions.

O55/DT&reference* ro s* columns* height* idth)

Heturns the +alue of a cell offset by a certain number of ro s and columns from a gi+en reference point. reference is the cell from hich the function searches for the ne reference. rows is the number of cells by hich the reference as corrected up &negati+e +alue) or do n. columns is the number of columns by hich the reference as corrected to the left &negati+e +alue) or to the right. height is the optional +ertical height for an area that starts at the ne reference position. width is the optional horiFontal idth for an area that starts at the ne reference position. Heturns the ro number of a cell reference. If the reference is a cell* it returns the ro number of the cell. If the reference is a cell range* it returns the corresponding ro numbers in a one.column array if the formula is entered as an array formula. If the HO3 function ith a range reference is not used in an array formula* only the ro number of the first range cell ill be returned. reference is a cell* an area* or the name of an area. If a reference is not indicated* Calc automatically sets the reference to the current cell. Heturns the number of ro s in a reference or array. array is the reference or named area hose total number of ro s is to be determined. Heturns the sheet number of a reference or a string representing a sheet name. If no parameters are entered* the result is the sheet number of the spreadsheet containing the formula. reference &optional) is the reference to a cell* an area* or a sheet name string.

HO3&reference)

HO3/&array)

/2DDT&reference)

,ppendi* B Description of 'unctions

"9&

!$ntax
/2DDT/&reference)

*escription
Determines the number of sheets in a reference. If no parameters are entered* the result is the number of sheets in the current document. reference &optional) is the reference to a sheet or an area. ,pplies a style +tyle to the cell containing the formula for a length of time ,ime* after hich the final style +tyle" is applied. /tyles are listed &and may be created) in the Format < +tyles and Formatting &F11) menu and are te6t entries entered in double @uotes. The initial style is applied for ,ime seconds after the cell itself is recalculated. %lease note that a manual recalculation &F0 0ey or ,ools < Cell Contents < 3ecalculate) ill not trigger the initial style. ,ime and +tyle" may together be omittedN +tyle is then applied permanently. This function al ays returns the +alue 0* allo ing it to be added to another function ithout changing the +alue.

/T!LD&/tyle* Time* /tyle2)

CLOO8$%&/earch criterion* array* Inde6* sort order)

/earches the first column of an array for the +alue gi+en by +earch criterion and if found returns the cell +alue at the intersection of the ro in hich it is found and the column inde6 gi+en by nde.. The search supports regular e6pressions. +earch criterion is the +alue searched for in the first column of the array. If te6t* it must be entered in double @uotes. array is the reference* hich must include at least t o columns. nde. is the number of the column in the array that contains the +alue to be returned. The first column has the number 1. If the sort order parameter is omitted or set to TH$D or not 0* it is assumed that the data is sorted in ascending order. If the e6act +earch criterion is not found* the last +alue that is smaller than the criterion ill be returned. If the sort order parameter is set to 5,L/D or Fero* an e6act match must be found* other ise the error Drror' Calue #ot ,+ailable ill be the result. Thus ith a +alue of Fero the data does not need to be sorted in ascending order.

,e.t functions
$se Calcs te6t functions to search and manipulate te6t strings or character codes. (able "3: (e*t functions !$ntax
,H,7IC&Te6t)

*escription
Calculates the +alue of a Homan numeral. The +alue range must be bet een 0 and 3<<< &J444I4K). ,e.t is the te6t that represents a Homan numeral. It is not case sensiti+e and is entered in double @uotes. The ,/C function con+erts full. idth to half. idth ,/CII and 0ata0ana characters. Heturns a te6t string. te.t is the te6t that contains characters to be con+erted.

,/C&te6t)

,ppendi* B Description of 'unctions

"9A

!$ntax
7,2TTDQT&#umber)

*escription
Con+erts a number to Thai te6t* including the Thai currency names. ?umber is any number. U7ahtU is appended to the integral part of the number* and U/atangU is appended to the decimal part of the number. Con+erts a positi+e integer to a specified base then into te6t using the characters from the baseMs numbering system &decimal* binary* he6adecimal* etc.). Only the digits 0.< and the letters ,.T are used. number is the positi+e integer to be con+erted. radi. is the base of the number system. It may be any positi+e integer bet een 2 and 3A. 4inimum length &optional) is the minimum length of the character se@uence that has been created. If the te6t is shorter than the indicated minimum length* Feros are added to the left of the string. Con+erts a number into a character according to the current code table. The number can be a t o.digit or three.digit integer number. number is a number bet een 1 and 2BB representing the code +alue for the character. Hemo+es all non.printing characters from the string entered into te.t. Te6t is entered using double @uotes. Heturns a numeric code for the first character in a te6t string. te.t is the te6t for hich the code of the first character is to be found and is entered in double @uotes. Combines se+eral te6t strings into one string. te.t 1$ te.t "$ J$ te.t '1 are te6t passages that are to be combined into one string. Con+erts te6t ith characters from a number system to a positi+e integer in the decimal system. The radi6 +alue defines the number system to hich the te6t belongs. ,ny characters not in the number system defined are ignored. te.t is the te6t to be con+erted and must be entered using double @uotes. The te.t field is not case.sensiti+e. radi. is the base of the number system from hich the con+ersion is to ta0e place. It may be any positi+e integer bet een 2 and 3A. Con+erts a number to te6t in the locale currency format* rounded to a specified decimal place. value is the number to be con+ertedN it can be a number* a reference to a cell containing a number* or a formula hich returns a number. decimals &optional) is the number of decimal places to be used. If no decimals +alue is specified* all numbers in currency format ill be displayed ith t o decimal places. The currency format is set in the system settings. Compares t o te6t strings and returns TH$D if they are identical. This function is case.sensiti+e. te.tS1 is the first te6t to compare. te.tS" is the second te6t to compare. 7oth arguments if entered directly must be in double @uotes.

7,/D&number* radi6* 4inimum length)

C2,H&number)

CLD,#&te6t) CODD&te6t)

CO#C,TD#,TD&te6t 1* te6t 2* p* te6t 30) DDCI4,L&te6t* radi6)

DOLL,H&+alue* decimals)

DQ,CT&te6tP1* te6tP2)

,ppendi* B Description of 'unctions

"9-

!$ntax
5I#D&findPte6t* te6t* position)

*escription
Loo0s for a string of te6t ithin another string and returns the position in the searched te6t here the searched.for te6t begins. 3here to begin the search can also be defined. The search term can be a number or any string of characters. The search is case.sensiti+e. findSte.t is the te6t to be found. te.t is the te6t hich is being searched. position &optional) is the position in the te6t from hich the search starts. Te6t must be entered in double @uotes. Heturns a number* displayed as te6t* ith a fi6ed number of decimal places and ith or ithout a thousands separator. This function can be used to apply a uniform format to a column of numbers. number is the number to be formatted. %ecimals is the number of decimal places to be displayed. If %ecimals is negati+e* the number is rounded to ,7/&number) %ecimals places to the left from the decimal point. ?o thousands separator &optional) determines hether the thousands separator is used or not. If the parameter is e@ual to 0 or omitted* the thousands separators of the current locale setting are displayed* else the separators are suppressed. The 1I/ function con+erts half. idth to full. idth ,/CII and 0ata0ana characters. Heturns a te6t string. te.t is the te6t that contains characters to be con+erted. This is the complementary function to ,/C. Heturns the number of characters from the left of a te6t string te.t determined by number. If this parameter is omitted* one character is returned. If number is greater than the length of the string* the hole string is returned. Heturns the length of a string including spaces. te.t is the te6t hose length is to be determined. Con+erts all uppercase letters in a te6t string to lo ercase. te.t is the te6t to be con+erted. Heturns a te6t segment of a character string. The parameters specify the starting position and the number of characters to return. te.t is the te6t containing the characters from hich to e6tract. start is the position mar0ing the beginning of the te6t to e6tract. number is the number of characters from that point on to be returned. If number is greater than LD#&te6t) minus start* then the te6t from start to the end of te.t is returned. Con+ert te6t to number* in a locale.independent ay. Con+erts gi+en te6t +alue te.t into a number. If te.t is a reference* it is first dereferenced. decimalSseparator and groupSseparator are optional parameters. If te.t contains a separator* then that separator must be entered into the rele+ant optional parameter. ,ll parameters are entered in double @uotes. Te6t is transformed according to the follo ing rules' 1) /tarting from the beginning* remo+e all occurrences of the groupSseparator before any decimalSseparator. 2) /tarting from the beginning* replace the first occurrence in the te6t of the decimalSseparator character ith the 5$LL /TO% &$R002D) character.

5IQDD&number* Decimals* #o thousands separator)

1I/&te6t)

LD5T&te6t* number)

LD#&te6t) LO3DH&te6t) 4ID&te6t* start* number)

#$47DHC,L$D&te6t* decimalPseparator* groupPseparator)

,ppendi* B Description of 'unctions

"9.

!$ntax

*escription
3) Hemo+e all hitespace characters &B.1=). =) If the first character of the resulting string is a period 5$LL /TO% &$R002D) then prepend a Fero. B) If the string ends in one or more instances of %DHCD#T /I"# &$R002B)* remo+e the percent sign&s). If percent signs ere remo+ed in step B* di+ide the +alue of the returned number by 100 for each percent sign remo+ed.

%HO%DH&te6t) HD%L,CD&Te6t* position* length* ne te6t)

CapitaliFes the first letter in all ords of a te6t string. te.t is the te6t to be con+erted. Heplaces part of a te6t string ith a different te6t string. This function can be used to replace both characters and numbers & hich are automatically con+erted to te6t). The result of the function is al ays displayed as te6t. To perform further calculations ith a number hich has been replaced by te6t* con+ert it bac0 to a number using the C,L$D function. ,ny te6t containing numbers must be enclosed in @uotation mar0s so it is not interpreted as a number and automatically con+erted to te6t. ,e.t is te6t* a part of hich ill be replaced. position is the position ithin the te6t here the replacement ill begin. length is the number of characters in te.t to be replaced. new te.t is the te6t hich replaces te.t.. Hepeats a character string by the gi+en number of copies. te.t is the te6t to be repeated. number is the number of repetitions. The result can be a ma6imum of 2BB characters. Heturns the right.most number of characters of a te.t string. If optional number is omitted* 1 is assumed and the right.most character is returned. If number is greater than the length of te.t* the hole te6t is returned. Con+erts a number into a Homan numeral. The +alue range must be bet een 0 and 3<<<N the modes can be integers from 0 to =. ?umber is the number that is to be con+erted into a Homan numeral. 4ode &optional) indicates the degree of simplification. The higher the +alue* the greater is the simplification of the Homan numeral. Dncrypts a character string by mo+ing the characters 13 positions in the alphabet. ,fter the letter T* the alphabet begins again &Hotation). Dntering te6t encrypted by this method* into the function decrypts the te6t. ,e.t is the character string to be encrypted(decrypted. Heturns the start position of a te6t string ithin a larger string. The start position for the search can be set as an option. The search te6t can be a number or any se@uence of characters. The search is not case.sensiti+e. The search supports regular e6pressions. findSte.t is the te6t to be searched for. te.t is the te6t here the search ill ta0e place. position &optional) is the position in the te6t here the search is to start.

HD%T&te6t* number)

HI"2T&te6t* number)

HO4,#&#umber* 4ode)

HOT13&Te6t)

/D,HC2&findPte6t* te6t* position)

,ppendi* B Description of 'unctions

"38

!$ntax
/$7/TIT$TD&te6t* searchPte6t* ne te6t* occurrence)

*escription
/ubstitutes ne te6t for old te6t in a string. te.t is the te6t in hich te6t segments are to be e6changed. searchSte.t is the te6t segment that is to be replaced &a number of times). new te.t is the te6t that is to replace the te6t segment. occurrence &optional) indicates ho many occurrences of the search te6t are to be replaced. If this parameter is missing* the search te6t is replaced throughout. Heturns value if te6t* else returns a blan0 te6t string. value is the +alue to be e+aluated. , reference can be used as a parameter. If the dereferenced +alue is not of type te6t* the result ill be an empty string. Con+erts a number into te6t according to a gi+en format. number is the numerical +alue to be con+erted. Format is the te6t hich defines the format and can be found on the @umbers tab in the 'ormat $ells dialog. $se decimal and thousands separators according to the language set in the cell format. Heturns a te6t string from hich leading and trailing spaces ha+e been remo+ed* and replaces all internal multiple spaces ith a single space. te.t is the te6t from hich spaces are to be remo+ed. Heturns the character represented by the gi+en number according to the V$#ICODDW /tandard. number is a decimal integer +alue bet een 0 and 111=111. Heturns the V$#ICODDW code point corresponding to the first character of the te6t +alue. te.t is a string from hich the code number is returned. Con+erts the string specified in the te.t parameter to uppercase characters. Con+erts a te6t string into a number. te.t is the te6t to be con+erted to a number.

T&+alue)

TDQT&number* 5ormat)

THI4&te6t)

$#IC2,H&number)

$#ICODD&te6t)

$%%DH&te6t) C,L$D&te6t)

Add/in functions
(able "": ,dd!in functions !$ntax
7D//DLI&Q* #)

*escription
Calculates the modified 7essel function In&6). O is the +alue on hich the function ill be calculated. ? is the order of the 7essel function. Calculates the 7essel function 1n&6) &cylinder function). O is the +alue on hich the function ill be calculated. ? is the order of the 7essel function. Calculates the modified 7essel function 8n&6). O is the +alue on hich the function ill be calculated. ? is the order of the 7essel function.

7D//DL1&Q* #)

7D//DL8&Q* #)

,ppendi* B Description of 'unctions

"3#

!$ntax
7D//DL!&Q* #)

*escription
Calculates the modified 7essel function !n&6)* also 0no n as the 3eber or #eumann function. O is the +alue on hich the function ill be calculated. ? is the order of the 7essel function. Heturns the decimal number for the binary number entered. ?umber is the binary +alue entered as a number or as te6t. Heturns a string representing the he6adecimal number for the binary number entered. ?umber is the binary +alue entered as a number or te6t. Places &optional) is the number of places to be output. Heturns the octal number for the binary number entered. ?umber is the binary +alue entered as a number or te6t.. Places is the number of places to be output. Heturns a comple6 number from a real coefficient and an imaginary coefficient. 3eal num is the real coefficient of the comple6 number. num is the imaginary coefficient of the comple6 number. +uffi. is optional* and may be UiK or UGK. If omitted JiK is assumed. +uffi. must be lo ercase. Con+erts a +alue from one unit of measure to the corresponding +alue in another unit of measure. ?umber is the +alue to be con+erted. From unit is the unit from hich con+ersion is ta0ing place. ,o unit is the unit to hich con+ersion is ta0ing place. , list of abbre+iations for units can be found in the 2elp files. Do not enter the full.stop. Heturns the binary number for the decimal number entered bet een XB12 and B11. ?umber is the decimal number. Places is the number of places to be output. Heturns the he6adecimal number for the decimal number entered. ?umber is the decimal number. Places is the number of places to be output. Heturns the octal number for the decimal number entered. ?umber is the decimal number. Places is the number of places to be output. Heturns TH$D &1) if both numbers are e@ual* other ise returns 5,L/D &0). ?umber " is optional and assumes a +alue of 0 if omitted. Calculates the error function. 2ower limit is the lo er limit of integral. *pper limit &optional) is the upper limit of the integral. If this +alue is missing* the calculation ta0es places bet een 0 and the lo er limit. Calculates the complementary error function bet een 6 and infinity. 2ower limit is the lo er limit of integral &6). Heturns the factorial of ?umber ith increments of 2. If ?umber is e+en* the follo ing factorial is calculated' nZ&#. 2)Z&n.=)Z...Z=Z2. If ?umber is odd* the follo ing factorial is calculated' nZ&#.2)Z&n.=)Z...Z3Z1. Heturns 1 if ?umber is greater than or e@ual to +tep.

7I#2DDC&#umber) 7I#22DQ&#umber* %laces)

7I#2OCT&#umber* %laces)

CO4%LDQ&Heal num* I num* /uffi6)

CO#CDHTP,DD&#umber* 5rom unit* To unit)

DDC27I#&#umber* %laces)

DDC22DQ&#umber* %laces)

DDC2OCT&#umber* %laces)

DDLT,&#umber 1* #umber 2)

DH5&Lo er limit* $pper limit)

DH5C&Lo er limit) 5,CTDO$7LD&#umber)

"D/TD%&#umber* /tep)

,ppendi* B Description of 'unctions

"39

!$ntax
2DQ27I#&#umber* %laces)

*escription
Heturns the binary number for the he6adecimal number entered. ?umber is the he6adecimal number. Places is the number of places to be output. Heturns the decimal number for the he6adecimal number entered. ?umber is the he6adecimal number. Heturns the octal number for the he6adecimal number entered. ?umber is the he6adecimal number. Places is the number of places to be output. Heturns the absolute +alue &modulus) of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the imaginary coefficient of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the argument &the phi angle) of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the conGugated comple6 complement to the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the cosine of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the hyperbolic cosine of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the cotangent of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the cosecant of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the hyperbolic cosecant of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the di+ision of t o comple6 numbers. ?umerator and %enominator are entered in the form U6 R yiU or U6 R yGU. Heturns the po er of e &the Dulerian number) and the comple6 number. Comple. number is entered in the form U6 R yiU or U6 R yGU. Heturns the natural logarithm of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGK. Heturns the common logarithm of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU.

2DQ2DDC&#umber) 2DQ2OCT&#umber* %laces)

I4,7/&Comple6 number)

I4,"I#,H!&Comple6 number)

I4,H"$4D#T&Comple6 number)

I4CO#1$",TD&Comple6 number)

I4CO/&Comple6 number) I4CO/2&Comple6 number)

I4COT&Comple6 number)

I4C/C&Comple6 number) I4C/C2&Comple6 number)

I4DIC&#umerator* Denominator)

I4DQ%&Comple6 number)

I4L#&Comple6 number)

I4LO"10&Comple6 number)

,ppendi* B Description of 'unctions

"33

!$ntax
I4LO"2&Comple6 number)

*escription
Heturns the binary logarithm of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the entered Comple. number raised to the po er ?umber. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the product of the entered Comple. number ith up to 30 other Comple. numbers. The comple6 numbers are entered in the form U6 R yiU or U6 R yGU. Heturns the real coefficient of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the sine of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the hyperbolic sine of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the s@uare root of the entered Comple. number. The comple6 numbers are entered in the form U6 R yiU or U6 R yGU. Heturns the difference of t o comple6 numbers. The comple6 numbers are entered in the form U6 R yiU or U6 R yGU. Heturns the sum of the entered Comple. number ith up to 30 other comple6 numbers. The comple6Pnumbers are entered in the form U6 R yiU or U6 R yGU. Heturns the tangent of the entered Comple. number. The comple6 number is entered in the form U6 R yiU or U6 R yGU. Heturns the binary number for the octal +alue entered. ?umber is the octal number. Places is the number of places to be output. ?umber may be entered as te6t or a number. Heturns the decimal number for the octal +alue entered. ?umber is the octal number. ?umber may be entered as te6t or a number. Heturns the he6adecimal number for the octal +alue entered. ?umber is the octal number. Places is the number of places to be output. ?umber may be entered as te6t or a number.

I4%O3DH&Comple6 number* #umber) I4%HOD$CT&Comple6 number* Comple6 number1* p* Comple6 number30) I4HD,L&Comple6 number)

I4/I#&Comple6 number) I4/I#2&Comple6 number)

I4/IHT&Comple6 number)

I4/$7&Comple6 number 1* Comple6 number 2) I4/$4&Comple6 number* Comple6 number 1* p* Comple6 number30) I4T,#&Comple6 number) OCT27I#&#umber* %laces)

OCT2DDC&#umber)

OCT22DQ&#umber* %laces)

,ppendi* B Description of 'unctions

"3"

,ppendi* $ $alc )rror $odes

ntroduction to Calc error codes


Calc pro+ides feedbac0 for errors of miscalculation* incorrect use of functions* in+alid cell references and +alues* and other user initiated mista0es. The feedbac0 may be displayed ithin the cell that contains the error &5igure 3=2) or on the status bar &5igure 3=3) or in both* depending on the type of error. "enerally spea0ing* if the error occurs in the cell that is selected &or contains the cursor)* the error message is displayed on the status bar. ,s an e6ample* 5igure 3=2 sho s the error code returned hen a column is too narro to display the entire formatted date. The date displayed ithin the input line* 0=(0B(1<<-* ould fit ithin the cell ithout a problem* but the format used by the cell produces the date +alue Sunda2= ,pril 8%= #..-.

'igure 3"9: )rror codes displa2ed within cells 3hen the cell displaying the W3#F error code in 5igure 3=2 is selected* the status bar displays the error message as sho n in 5igure 3=3. This message is more descripti+e than the message displayed in the cell* but it still may not pro+ide enough information to correctly diagnose the problem. 5or fuller e6planations* consult the follo ing tables and the 2elp topic* )rror $odes in LibreOffice $alc.

'igure 3"3: ,n error message displa2ed in the status bar This appendi6 presents error codes in t o tables. This first table e6plains error messages hich are displayed ithin the cell that actually contains the error. D6cept in the case of the WWW error* they all correspond to a Calc error code number. The second table e6plains all of the error codes* listed by code number* including those errors codes in the first table.

,ppendi* $ $alc )rror $odes

"3&

#rror codes displayed within cells


Cell error
hhh

Code
#(,

Explanation of t"e error


The column is too narro to display the complete formatted contents of the cell. This is not really an error +alue* so there is no corresponding numerical error code. The solutions to this problem are to increase the idth of the column. or select Format < Cells < Alignment and clic0 either <rap te*t automatically or Shrin4 to fit cell si1e to ma0e the te6t match the current column idth. 5unction argument is not +alid* or more than one matching cell is found by the D"DT function. , calculation resulted in an o+erflo of the defined +alue range. The formula ithin the cell returns a +alue that does not correspond to the definition of the formula or functions used. This error could also mean that the cell referenced by the formula contains te6t instead of a number. The formula ithin the cell uses a reference that does not e6ist. Dither a column or ro description name could not be resol+ed* or the column* ro * or sheet that contains a referenced cell is missing. ,n identifier could not be e+aluated' no +alid reference* no +alid domain name* no column(ro label* no macro* incorrect decimal di+ider* add.in not found. 5or e6ample* entering in a cell Ysum&bobZB) here there is no cell named JbobK or containing the te6t JbobK generates this error. Di+ision operator ( if the denominator is 0. /ome more functions return this errorN see ne6t table for details.

DrrB02 h#$4l hC,L$D

B02 B03 B1<

hHD5l

B2=

h#,4D>

B2B

hDIC(0l

B32

,ppendi* $ $alc )rror $odes

"3A

(eneral error codes


The follo ing table is an o+er+ie of the most common error messages for LibreOffice Calc.
Drrors described as 0nternal errors should not be encountered by users under normal conditions. Drrors listed as @ot used are not currently assigned to any error condition and ill not occur.

?ote

Code
B01

Messa%e
In+alid character

Explanation of t"e error


Character in a formula is not +alid. This error is the same as the 0nvalid @ame error &B2B) e6cept that it occurs ithin a formula. The cell containing the error ill display the h#,4D> error reference. 5unction argument is not +alidN for e6ample* a negati+e number for the root function. This error also occurs if more than one matching cell is found by the D"DT function. Di+ision by 0* or another calculation that results in an o+erflo of the defined +alue range &a +alue too big or too small). 5unction parameter is not +alidN for e6ample* te6t instead of a number* or a domain reference instead of a cell reference. #ot used. #ot used. #ot used. 4issing brac0et or parenthesisN for e6ample* closing brac0ets but no opening brac0ets. Operator is missingN for e6ample* "=2(3+4) * "* here the operator bet een U2U and U&U is missing. Cariable is missingN for e6ample* hen t o operators are together UY1RZ2U. 5unction re@uires more +ariables than are pro+idedN for e6ample* ,#D&) and OH&). The total number of internal to0ens &that is* operators* +ariables* brac0ets) in the formula e6ceeds B12* or the total number of matrices the formula creates e6ceeds 1B0. This includes basic functions that recei+e too large an array as a parameter. ,n identifier in the formula e6ceeds A= 87 in siFe* or a result of a string operation e6ceeds A= 87 in siFe. /ort operation attempted on too much numerical data &ma6. 100000) or a calculation stac0 o+erflo .

B02

In+alid argument

B03

In+alid floating point operation &cell displays W?*4[) %arameter list error Internal synta6 error In+alid semicolon %air missing %air missing 4issing operator

B0= B0B B0A B0E B0B0<

B10 B11 B12

4issing +ariable 4issing +ariable 5ormula o+erflo

B13 B1=

/tring o+erflo Internal o+erflo

,ppendi* $ $alc )rror $odes

"3-

Code
B1B B1A B1E

Messa%e
Internal synta6 error Internal synta6 error Internal synta6 error

Explanation of t"e error


#ot used. 4atri6 is e6pected on the calculation stac0* but is not a+ailable. $n0no n errorN for e6ample* a document ith a ne er function is loaded in an older +ersion of Calc that does not contain the function. Cariable is not a+ailable. 5ormula yields a +alue that does not correspond to the definition* or a cell that is referenced in the formula contains te6t instead of a number. Compiler creates an un0no n compiler code. #o result. 5ormula refers directly or indirectly to itself and the terations option is not selected under ,ools < =ptions < 2ibre=ffice Calc < Calculate. 5inancial statistics function missed a targeted +alue* or iterations of circular references do not reach the minimum change ithin the ma6imum steps that are set. , column or ro description name could not be resol+ed* or the column* ro * or sheet that contains a referenced cell is missing. ,n identifier could not be e+aluatedN for e6ample* no +alid reference* no +alid domain name* no column(ro label* no macro* incorrect decimal di+ider* add.in not found. Obsolete* no longer used* but could come from old documents if the result is a formula from a domain. Heferences* such as hen a cell references a cell* are too encapsulated or deeply nested. This is an internal error and should not be displayed in LibreOffice. #ot used. Di+ision operator ( if the denominator is 0. /ome more functions return this errorN for e6ample' C,H% ith less than 1 argument /TDDC% ith less than 1 argument C,H ith less than 2 arguments /TDDC ith less than 2 arguments /T,#D,HDITD ith stde+Y0 #OH4DI/T ith stde+Y0

B1B1<

Internal synta6 error #o result &cell displays W>A2*#) Internal synta6 error Internal synta6 error Circular reference

B20 B21 B22

B23

The calculation procedure does not con+erge In+alid references &cell displays W3#F[) In+alid names &cell displays W?A4#9) Internal synta6 error Internal o+erflo

B2=

B2B

B2A B2E

B2-X B31 B32

c Di+ision by Fero

,ppendi* $ $alc )rror $odes

"3.

nde.
'
3D chart appearance <area chart 112 bar chart 10< illumination << line chart 113 pie chart 110 rotation and perspecti+e <rotation* interacti+e <calculation order 1<B calculations lin0ing sheets 1<B cell styles applying 123 description 122 5ill 5ormat mode 12= cells description 1A* 1< information on status bar 21 range 2selecting 2+alidating contents B0 changes accepting or reGecting 2<3 adding comments 2<0 editing comments 2<1 options 3BE recording 2-< re+ie ing 2<3 +ie ing 2<3 chart appearance of 3D <area bac0ground <A colors <E creating -2 data labels <0 editing -E formatting <B formatting 3D <E graphic bac0ground <A grids -A illumination of 3D << interacti+e 3D rotation <mean +alue lines <3 mo+ing elements <A perspecti+e <%osition and /iFe dialog 10A resiFing 10B rotation <titles -A trend lines <2 types 10Q or ! error bars <3 chart elements -chart type -=* -E Chart 3iFard -2 collaboration 2-A color coding for input 20color options 3=1 Color toolbar 1B1 column and line charts 11< column charts 10columns deleting 31 inserting 31
""8

A
absolute reference 1<3 ad+anced functions 21A anchor* +isible 3B2 anchoring of obGects 1B< appearance of 3D chart <appearance options 3== ,pply /tyle list 12= area charts 111 arguments 3Earguments in functions 200 arithmetic operators 1-E array functions =12 arro 0eys na+igating ithin spreadsheets 2A assign styles to shortcut 0eys 12B auto filters 322 ,utoCorrect options 3B< a6es labels -=

7
bar charts 10< 7ase editing data sources 2Ebubble charts 11B

C
Calc sorting records EB Calc options case sensiti+e 3B= changes 3BE dates 3B= grid 3Bgrid lines* +ie ing 3B0 input settings 3=< iterati+e references 3B= page brea0s* +isible 3B1 screen display 3B2 unit of measurement 3=< updating lin0s 3=< Toom 3B2 calculation options 3B3
0nde*

columns* in Calc freeFing 3= selecting 2< comma separated +alues &C/C) 21 comments adding 2<1 editing 2<2 finding 2<2 formatting 2<2 comments on changes adding 2<0 editing 2<1 comparati+e operators 1-comparing documents 2<B concatenation operator 1<1 consolidating data 2=2 create document from template 13creating ne spreadsheets 21 cropping 1B1 C/C file open 21 C/C files 21 customiFing Dnter 0ey 20eyboard shortcuts 3AB menus 3A0 toolbars 3A3

%
data analysis consolidating data 2=2 "oal /ee0 2BE introduction 2=2 4ultiple Operations tool 2B2 scenarios 2=/ol+er 2Bsubtotals 2== data editing* Calc changing data in a cell B= remo+ing data from a cell B3 replacing all data in a cell B= data entry 0eyboard =2 speeding up =A Data range -= Data series -B data source data to te6t 2Eediting 2Eediting using 7ase 2Elin0ing 2EA registering 2EA using in OOo documents 2E+ie ing 2EE data to te6t 2Edatabase functions =10 database range 31Data%ilot

cell formatting 23A data fields 223 data sources 21< filter 23B group ro s or columns 22< group scalar +alues 22< group ithout inter+als 230 preconditions 21refresh 23A shortcuts 23A sort results 232 date functions =0= dates and times* entry =3 DDD lin0 description 2-2 in Calc 2-2 in 3riter 2-2 default template 13deleting columns and ro s 31 sheets 3= Detecti+e 20< digital rights management &DH4) 1-0 digital signature 1-2 status bar indicator 20 Documentation < documents comparing 2<B merging 2<B Dra ing ObGect %roperties toolbar 1BE dra ing obGects grouping 1Bproperties 1BE resiFing 1BDra ing toolbar 1BE dra ing tools 1BB Dynamic Data D6change &DDD) 2-2

#
e.mailing Calc document as attachment 1-1 se+eral recipients 1-1 Dnter 0ey 2D%/ images in %D5 1EE error codes common messages =32 displayed ithin cells =31 introduction =30 error messages 20A* 211 error.chec0ing formulas 1-= errors* finding and fi6ing 20A e6port directly as %D5 1EA D6porting 1-1 e6porting to %D5 1EA e6tensions installing 3Aintroduction 3AE D6ternal Data dialog 2E1

0nde*

""#

F
5D5 1Efeatures -* 1A file sharing options 3=2 5ill 5ormat mode 12= fill series adding =E defining =5ill tool =A filled net charts 11A filtering 321 filters ad+anced 32B auto 322 standard 322 financial analysis functions 3-= fi6ed +alues 1-= formatting chart <B symbols 10B formatting cell borders A1 conditional AB formatting data 5ont effects B< fonts B4anual line brea0s Bmultiple lines of te6t BE numbers Bshrin0ing data to fit cell Bformula bar 1formulas absolute reference 1<3 brea0ing into parts 20B calculation e6amples 1-B concatenation operator 1<1 definition 1-= intersection operator 1<2 operator types 1-E operators in 1-B range operator 1<1 relati+e reference 1<2 strategies for creating 20= using the 7asic editor to create 20A 5unction List 201 5unction 3iFard 1-* 202 functions add.in =2= ,DDHD// 333 arguments 200* 30<* 3Earray =12 basic arithmetic 211 CDILI#" 213 CO#C,TD#,TD 1-CO$#TI5 21B* 32< database 32-* =10 date and time =0= date formats 3-=
0nde*

definition 1-= description 1-= entering 1-B e6amples 211 financial analysis 3-= 5LOOH 213 2LOO8$% 331 I#DDQ 33B I#DIHDCT 33= informational =0logical =0E LOO8$% 331 macros 303 4,TC2 332 mathematical 3E< 4HO$#D 21= nested 201 O55/DT 33= o+er+ie 1<< HO$#D 213 HO$#DDO3# 213 HO$#D$% 213 simple statistics 211 spreadsheet =1= statistical analysis 3<B structure 200 /$7TOT,L 330 /$4I5 32< terminology 3Ete6t =20 CLOO8$% 331

(
"allery 2ide(/ho button 1=E opening 1=E "DT%ICOTD,T, function 23"oal /ee0 2BE graphic filters 1B0 graphics adding 1== anchoring 1B< arrangement 1Blin0ing 1=B positioning 1BresiFing 1B2 transparency 1B1 graphics mode 1B0 grid options 3Bgrid lines* +ie ing 3B0

;
2elp system 2ide(/ho button 1=E hiding and sho ing data A< 2T4L compatibility 3=E hyperlin0s absolute 2A-

""9

creating 2A< Ctrl.clic0 to acti+ate 3== editing 2E1 relati+e 2Aremo+ing 2E1 illumination of 3D chart << image map 1A1 images adding 1== conte6t menu 1B3 cropping 1B1 embedding 1=A inserting from file 1== inserting from the clipboard 1=E inserting from the "allery 1=E lin0ing 1=B modifying 1=resiFing 1B2 rotating 1B3 informational functions =0input settings options 3=< insert mode 20 Insert %icture dialog 1== inserting columns and ro s 31 sheets 32 interest rates 3-= International /upport < intersection operator 1<2

load(sa+e options 3=B logical functions =0E

4
macro recorder 300 macro security options 3=3 macros 3AE accessing cells directly 30< arguments 30arguments in functions 30< as Calc functions 303 introduction 300 organiFing 303 recording 300 sorting data 311 4anual line brea0s Bmean +alue lines <3 menu bar 1E menu font* customiFing 3A0 menus adding commands 3A2 creating 3A1 customiFing 3A0 modifying 3A1 modifying entries 3A2 merging documents 2<B 4icrosoft Office file con+ersion 3=E mo+ing chart elements <A mo+ing from sheet to sheet 2A 4ultiple Operations tool 2B2 multiple sheets introduction 2A2 setting up 2A2

6
0eyboard data entry =2 0eyboard 0eys na+igating ithin spreadsheets 2A 0eyboard shortcuts arro 0eys 3E3 assigning 3AB cell formatting 3E3 customiFing 3AA function 0eys 3E2 introduction 3E0 loading from a file 3AE na+igation 3E0 resetting to default +alues 3AE sa+ing to a file 3AA selection 3E0

?
named range 31B #a+igator 2B* 3A scenarios 2B1 nested functions 201 net charts 11A numbers entering in spreadsheet cell =2 numbers* data entry =3

=
ObGect Lin0ing and Dmbedding &OLD) 2E< OLD obGect lin0ed 2-2 non.lin0ed 2-1 other &3indo s) 2-1 Open /ource Initiati+e &O/I) 12 OpenDocument 5ormat 3=B opening spreadsheets 21 order of calculation 1<B outline group controls E1

2
le6ical E= licensing of LibreOffice 12 line charts 112 lin0ing to e6ternal data D6ternal Data dialog 2E1 find re@uired range 2E= #a+igator 2E3 load 7asic code to edit 3=E

P
page brea0s* +isible 3B1

0nde*

""3

page style on status bar 20 page styles applying 12B description 123 pass ord protection 2B pass ord.protect %D5 1-0 %D5 blan0 page e6port 1Edigital rights management &DH4) 1-0 embed standard fonts 1Eencrypt 1-0 D%/ 1EE e6port documents to 1EA form 1Eimage compression and resolution 1EE initial +ie selection 1Epages to e6port 1EA pass ord.protect 1-0 security settings 1-0 tagged 1EE user interface settings 1E%D5 Options dialog 1EA %D5(,.1 1EE perspecti+e of chart <picture conte6t menu 1B3 %icture toolbar 1=pictures lin0ing 1=B resiFing 1B2 transparency 1B1 pie charts 10< %osition and /iFe dialog for chart 10A %osition and /iFe of graphics 1B= precision 3B= prepare document for re+ie 2-print file directly 1A= print options 3=1 printer metrics 3B0 printing general options 1AB multiple pages per sheet 1AB page orientation 1AB %rint dialog 1A= selecting hat to print 1AA %roperties 3protect a document 2--

regular e6pressions enable in formulas 3BB in functions 21= relati+e reference 1<2 remo+e personal information on sa+ing 3=3 renaming sheets 3= resolution options 3Brotating images 1B3 rotation chart <rounding methods 213 rounding off numbers 213 ro s deleting 31 inserting 31 ro s* in Calc freeFing 3= selecting 2<

+
sa+ing spreadsheets methods 23 scatter charts 113 scenarios 2=security 2B /election list =< selection mode indicator 20 selection* in Calc cells 2sheets 30 send document as e.mail 1-1 shared e6tension 3Ashared spreadsheet introduction 2-A opening 2-E sa+ing 2-E setting up 2-A sheet tabs 1< sheets copying sheets 32 description 1A identifying 2A2 inserting 32* 2A2 inserting from other spreadsheets 2A= na+igating 2A referencing 2AB renaming 3=* 2A= se@uence number 20 sharing content B0 sheets* in Calc selecting 30 shrin0ing data to fit cell BsiFe optimiFation 3=B snap grid 3B/ol+er 2Bsorting 320 using macros 311

3
range database 31named 31B range operators 1<1 record changes 2-reference operators 1<0 references in color 3B2 referencing other spreadsheets 2AE sheets 2AB

0nde*

"""

sorting records* Calc EB special characters == spreadsheet create from template 13update from changed template 13spreadsheet functions =1= spreadsheets comparing 2<B creating ne 21 description 1A documentation* internal 1-= embedding 2E< identifying copies 2-< merging 2<B na+igate 2B opening shared spreadsheet 2-E sa+ing 23 sa+ing as 4icrosoft D6cel 23 sa+ing shared 2-E setting up sharing 2-A sharing 2-A statistical analysis functions 3<B status bar 20 stoc0 charts 11E styles assign to shortcut 0eys 12B assigning to shortcut 0eys 3AA cell 122 create from selection 12E create using /tyle dialog 12A delete 13A description 122 modifying 13= page 123* 12B types supported 122 /tyles and 5ormatting dialog 123 subtotals 2== support < synchroniFe a6es 3Bsystem font 3A0

mo+e 1=0 organiFe 1=0 reset default 13< te6t functions =20 te6t operators 1-te6t o+erflo 3B2 time functions =0= title bar 1A titles of charts -A toolbars 1adding commands 3A= choosing icons for commands 3AB creating 3A= tooltip 1trac0 changes 2-transparency 1B1 trend lines <2

*
unsa+ed changes indicator 20 $HL Hecognition 2A< user data options 3=1 $ser guides < user interface* customiFing 3A0 user interface* parts of 10

>
+alidating cell contents B0 +alue highlighting 3B2 C7, properties load(sa+e options 3=A +ersions sa+ing 2<A +ie ing Calc 3= +ie ing data filtering E2 hiding and sho ing A< outline group controls E1 +isible grid 3B-

O
Q or ! error bars <3 Q4L 3=B Q! charts 113

,
template associate spreadsheet ith different template 13< create spreadsheet from 13delete 1=0 delete folder 1=0 description 122 edit 13E e6port 1=1 folder 1=0

D
Foom 3=

W
hDIC(0l Di+ision by Fero 20E hHD5 Incorrect references 20hC,L$D #o result 20-

0nde*

""%

You might also like