Next

The Gnumeric Manual, version 1.2

Authors

Eric Baudais
Email:
Kevin Breit
Email:
Thomas Canty
Email:
Adrian Custer
Email:
Ray Dassen
Email:
Jody Goldberg
Email:
Andreas Guelzow
Email:
Jon K. Hellan
Email:
Miguel de Icaza
Email:
Jukka-Pekka Iivonen
Email:
Alexander Kirillov
Email:
Gregory Leblanc
Email:
Wayne Schuller
Email:
Almer S. Tigelaar
Email:
Charles Twardy
Email:
Aaron Weber
Email:
Morten Welinder
Email:

Publisher

GNOME Documentation Project

Legal Notice

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (GFDL), Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You can find a copy of the GFDL at this link or in the file COPYING-DOCS distributed with this manual.

This manual is part of a collection of GNOME manuals distributed under the GFDL. If you want to distribute this manual separately from the collection, you can do so by adding a copy of the license to the manual, as described in section 6 of the license.

Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and the members of the GNOME Documentation Project are made aware of those trademarks, then the names are in capital letters or initial capital letters.

DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE WITH THE FURTHER UNDERSTANDING THAT:

  1. DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND

  2. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.

Feedback

To report a bug or make a suggestion regarding the Gnumeric application or this manual, follow the directions in the GNOME Feedback Page.

History

TitleDateAuthorPublisher

Gnumeric Manual: Version 1.2

September 2003

The Gnumeric Team

GNOME Documentation Project

Gnumeric Manual: Version 1.0

January 2002

The Gnumeric Team

GNOME Documentation Project

Gnumeric Manual: Earlier Versions

1998-2001

The Gnumeric Team

GNOME Documentation Project

This manual describes version 1.2 of Gnumeric.


Next
Contents
PreviousNext

The Gnumeric Manual, version 1.2

About This Document

Table of Contents

1. Welcome!
2. How to Use this Manual
3. A Quick Introduction
4. The Elements of Gnumeric
5. Working with Data
6. Advanced Analysis
7. Graphics: Plots, Images and Drawings
8. Managing and Viewing Worksheets
9. Workbook Settings
10. Configuring Gnumeric
11. File Opening and Saving
12. Printing
13. Getting Help from Other Sources
14. Extending Gnumeric
15. About Gnumeric
A. Function Reference
B. Keybinding Reference

Previous
About This Document
Next
Welcome!
PreviousNext

Chapter 1. Welcome!

Gnumeric is a spreadsheet, a computer program to manipulate and analyze numeric data. Gnumeric intends to be the best spreadsheet available anywhere. It has been developed over many years to become fully mature and mathematically correct. Gnumeric was created and is maintained by the GNOME project. This manual describes version 1.2 of Gnumeric .

Gnumeric aims for:

These features of Gnumeric make it versitile and powerful. The screenshot of Gnumeric show in Figure 1.1, “An example of what Gnumeric can do.” demonstrates some of the features currently available.

Figure 1.1. An example of what Gnumeric can do.

An image of Gnumeric
          showing the use of complex formatting and several grahical
          plots.

Gnumeric currently supports a full complement of calculation functions, formattting options, graph types and drawing options.

The new features of Gnumeric 1.2 :

The newest version of Gnumeric includes numerous improvements over the versions in the 1.0 series.

For more details on the changes in Gnumeric, refer to the file named NEWS in the source code distribution.

Known Issues in the Gnumeric 1.2 release:

Issues which cannot be fixed immediately will be added to this list as they are discovered.


Previous
Contents
ContentsNext
How to Use this Manual
PreviousNext

Chapter 2. How to Use this Manual

There are several ways to use this manual. The simplest is to read sequentially through the manual. A quicker way to find the answer to a particular question might be to read the explanation for the organization of the manual which is presented below and then go directly to that section.

The chapters of this version of the Gnumeric manual are organized as follows:


Previous
Welcome!
ContentsNext
A Quick Introduction
PreviousNext

Chapter 3. A Quick Introduction

This chapter of the manual explains the fundamentals of spreadsheets in general and of Gnumeric in particular. The chapter attempts to help new users get started with Gnumeric and provides background for the more detailled explanations given in the rest of the manual.

Table of Contents

Getting Started Using Gnumeric
Starting Gnumeric the First Time
Working with Gnumeric
Using Commands
Using Menu Commands
Using Toolbar Button Commands
Using Context Menu Commands
Using Keyboard Shortcut Commands
Data in Gnumeric
The Types of Data in a Spreadsheet
Putting Data into the Spreadsheet
Cell Formats
Simple Cell Formating
Formating the Display and Entry Data Types
Complex Cell Selections
Moving Cell Contents, Inserting New Cells or Deleting Cells
Moving Cell Contents
Inserting and Deleting Cells
Sheets
Graphing
A Simple Graphing Example
Graphing is changing rapidly in Gnumeric 1.2
Printing
File Opening and Saving
Closing Gnumeric

Previous
How to Use this Manual
ContentsNext
Getting Started Using Gnumeric
PreviousNext

Getting Started Using Gnumeric

The best way to learn how to use Gnumeric is to begin exploring the program yourself. This section will help you get started trying new things and seeing what happens.

Unfortunately, this manual cannot teach you the very basics of interacting with a modern computer. If you have never used computers, don't know the names of the hardware components (the pieces you can touch) or don't know the names of the elements you see on the screen (like windows or the mouse pointer), you will probably want to get some basic advice from someone you know or read the manuals which came with your machine or your operating system. It's all pretty easy but, in order to understand this manual, you will kneed to know some basic terminology and have some basic computing skills. For an introduction to the GNOME desktop environment, see the GNOME User Guide.


Previous
A Quick Introduction
ContentsNext
Starting Gnumeric the First Time
PreviousNext

Starting Gnumeric the First Time

Gnumeric can be started in several ways depending on the type of desktop you have. All of these approaches result in a gnumeric window appearing on your monitor.

Note

It is assumed that you have installed the Gnumeric program on your machine. Installing Gnumeric depends on the particular operating system and distribution and is therefore beyond the scope of this manual. If Gnumeric is not installed on your machine, read the manuals that came with your distribution or look at your distribution vendor's website.

If you are a GNOME user, you should have a `panel' somewhere on your desktop. This panel contains icons, and at least two menus. One of these menus is called Applications and has an icon which looks like the outline of a foot. If you click on this menu name, a menu will appear. Drag the cursor down to the Office sub-menu name, and a submenu will appear. Drag the cursor into the submenu and then release the mouse button when the cursor is on the entry which reads "Gnumeric Spreadsheet." This will start the program and the main window of Gnumeric will appear as shown in Figure 3.1, “The Gnumeric spreadsheet when first opened.”

Figure 3.1. The Gnumeric spreadsheet when first opened.

If you use GNOME as part of a distribution, the "Application" menu may have a different name. In that case you should hunt around the menus until you find something named "Gnumeric" with the

  icon and then click on that menu entry.

If you don't use GNOME, your desktop may have its own menus and you can try to find an entry which will start Gnumeric.

Gnumeric can also be started from the command line in an xterm window or equivalent terminal emulator. Open a terminal, and, at the shell prompt type:

      gnumeric &
    

which will start the program and send it into the background.

If you are still stuck, ask a friend or someone who knows your machine. Unfortunately, getting started is often the hardest part of learning to use a new program but it is also the one place a manual such as this one cannot really help.

Gnumeric can also be opened using a spreadsheet file directly. If there is a spreadsheet file on the desktop or in a file manager like Nautilus, it may be possible to click or double-click with the mouse pointer on the file and have Gnumeric open the file automatically.


Previous
Getting Started Using Gnumeric
ContentsNext
Working with Gnumeric
PreviousNext

Working with Gnumeric

After opening, Gnumeric appears as was shown in Figure 3.1, “The Gnumeric spreadsheet when first opened.”. The open application contains a menubar at the top, two toolbars below the menu bar, and below these, on the left, the object toolbar, and, on the right, the data entry area above the cell grid area which itself is above the list of worksheets and the information area. For a detailed explanation of each of these elements, see the section called “Overview of the Elements of Gnumeric”. By default, Gnumeric opens a workbook with three worksheets and a file name of Book1.gnumeric.

Using a spreadsheet generally involves several steps. First the application is started to obtain an empty workbook, which generally has several empty worksheets. Next, data and formulas are entered into one or several sheets. The data may be entered by hand or imported from external files. The formulas are generally entered by hand, possibly with the help of various tools. The data may be formatted to appear in particular ways and to clarify the structure of the data in the worksheet. A user may also create several graphical plots. Certain parts of the spreadsheets may be printed out as tables. The work is then usually saved into a file which can be re-opened later to add or modify the contents of the workbook.

Note

The terminology can be confusing. A spreadsheet file contains a workbook and possibly some other information about the file. (Because the workbook is far more important than the extra information, files are often called workbooks.) A workbook contains one or more worksheets. Each worksheet contains a lare number of cells usually arranged into a two dimensional grid made up of columns and rows.


Previous
Starting Gnumeric the First Time
ContentsNext
Using Commands
PreviousNext

Using Commands

The commands provided by Gnumeric can be accessed using several methods. These methods are explained here. The most important commands are explained in the rest of this chapter. All of the commands are explained in later chapters of this manual.

Using Menu Commands

The menus provide the simplest way to get to all of the commands provided by Gnumeric. These menus work like those in any GNOME application: clicking on the menu name causes a menu to open, dragging the mouse cursor onto the menu and then releasing the mouse button (or clicking again) while the cursor is above a menu entry causes that command to be exectuted. For further information, see the section called “Introduction to Menus”.

Using Toolbar Button Commands

The buttons on the toolbars are quite simple to use. Simply placing the mouse cursor above one of the buttons and pressing the left mouse button will perform the command, either directly or by opening a dialog window. For further information, see the section called “The Gnumeric Toolbars”.

Using Context Menu Commands

In many situations, Gnumeric provides a menu right under the mouse cursor if the right hand mouse button is clicked. This menu contains different entries depending on the placement of the mouse cursor when the right hand mouse button is clicked. For further information, see the section called “Context Menus in Gnumeric”.

Using Keyboard Shortcut Commands

Certain common commands can be triggered using a combination of keys. The menu entries are often followed by a combination of keys which can be used to trigger that command. For instance, saving the file which is currently being used can be performed by typing jointly the control key and the s key (i.e. Ctrl+S). For further information, see the section called “Gnumeric Keybindings”.


Previous
Working with Gnumeric
ContentsNext
Data in Gnumeric
PreviousNext

Data in Gnumeric

The main purpose of spreadsheets like Gnumeric is to collect information in a coherent manner, perform calculations on the information and then be able to update those calculations easily if the original numbers change. The use of a spreadsheet therefore requires a substantial understanding of the types of information which can be entered into the spreadsheet and the methods which can be used to manipulate that information. This section explains how data can be used in Gnumeric.

The Types of Data in a Spreadsheet

Spreadsheets like Gnumeric treat information by separating the data into separate cells and considering the data in each cell to be separate elements. Each cell in the spreadsheet has both a value, which is what Gnumeric manipulates, and a representation, which is what is actually shown. Understanding this distinction is complicated and make take the new user some time. This distinction is one of the reasons spreadsheets are so useful.

The cells of the spreadsheet are contained in the cell grid area. The cell grid area is the area with a white background and grey grid lines. The grid lines separate this area into separate cells. Each cell has a unique reference name which is the combination of the letters of the name of the column and the number of the row. For instance, the top, leftmost cell is the cell named "A1" and the cell two over to the right and four rows down is named "C4" because it is in the column labelled "C" and in the fourth row. Each of these cells can contain only one single datum.

The datum contained in any cell will have one of five types: a text string type, a number type, a formula type, a boolean type or an error type. These five types of data values can then have various display formats so that, for instance, a number value can be displayed as a number, a monetary amount, a date or a time. Text strings are sequences of characters and punctuation marks and could, for example, contain textual information such as peoples names. Number values are simply numbers but may be input and displayed in various formats including decimal numbers, dates, times, and numbers in scientific notation. Formulas are instructions to Gnumeric to calculate a result. The power of spreadsheets comes from these formulas because the results of the calculation can depend on the contents of other cells. Boolean values are either TRUE or FALSE and can be used in logical statements. Error values are usually the result of mistakes or impossible calculations.

For more advanced information on the types of data usable in Gnumeric, see the section called “The Types of Cell Elements”.

Putting Data into the Spreadsheet

In order to enter data into the spreadsheet, the user must first select a cell in which to place the information and then actually type the information on the keyboard. Once the information is entered, Gnumeric attempts to figure out both the appropriate data value type to assign to the cell and the appropriate data format in which to display this data value. Because this process is quite complex, users may occasionally be forced to actively select these parameters of the cells, which is explained in the section called “Cell Formats” below. The next two sections explain how to get data into a cell, first by moving the selection box to a desired cell and then by typing the data.

Moving the selection box

In order to enter data into Gnumeric the selection box must be placed over the appropriate cell. The selection box appears on the cell grid as a double lined rectangle with a small grey square in the lower right corner of the box. By default the selection box surrounds the top, leftmost cell in the cell grid area.

The simplest way to move the selection box is to use the mouse. If the mouse cursor is placed over the cell "C3" (the cursor will be represented as a thick white cross) and the left mouse button then clicked, the selection box will move to cell "C3". Note that the selection box can cover more than one cell if the mouse is dragged while being clicked. The use of these larger selections is explained below in the section called “Complex Cell Selections”.

Tip

The selection box also causes the header of the column and row to change slightly. The headers will turn a darker shade of gray and the font of the letters and numbers turn bold. This helps indicate what is currently being selected.

The selection box can also be moved with the keyboard arrow keys. For instance, typing the right arrow twice and the down arrow once will move the selection box from the cell "C3" to the cell "E4".

The selection box can be moved in other ways and will move in response to certain actions. These movements become intuitive after using Gnumeric for a little while.

Data Input

In order to enter data into a selected cell, one can simply start typing. The characters will then become part of the spreadsheet when the selection is changed either by typing the Enter key, which moves the selection down one cell, by typing the Tab key, which moves the selection one cell to the right, or by selecting any other cell with the mouse.

For example, the mouse could be used to select the cell four columns over (Column D) and three rows down (Row 3). Then the user could type "Hello, this is a line of text." and then type the Enter key. The text would then appear in cell "D3" and, if the cells to the right are empty, would span into those cells so that the whole entry is visible. The selection box moves when the Enter key is typed and will therefore appear afterwards in cell "D4", ready for the input of more data.

Note

Note that as the data text is entered it appears in both the cell and in the data entry area (the area below the toolbars to the right of the equals (=) sign).

Mistakes which are made during data entry can be corrected by using the Backspace key or the Delete key. Finer control can be obtained if the cursor is moved to the text entry area by clicking in the box to the right of the equals (=) sign with the mouse. Editing in the text entry area enables the arrow keys to navigate backwards and forwards within the text being entered and also enables the mouse to be used to move the cursor.

The contents of a cell can be changed simply by selecting the cell again and either typing the new contents or editing the existing contents of the cells.

Note

If the content of the cell is too large for the size of the cell, the entry may span over the edge of the cell into the empty cells to the right. If the cell is a number, the cell grid area may display hash marks (######) to indicate the cell has content which is too large to display in the given cell width.

Data recognition

As data are entered into the spreadsheet, Gnumeric interprets the information in order, first, to assign it to a data category and, second, to give it an appropriate data display format. The entry will be assigned to one of the basic data types and possibly to a sub-type. Entries which start with an apostrophe (') are considered to be text no matter what the rest of the contents. Entries which start with an equals sign (=) are automatically considered to be a formula. Entries which are single numbers or which fall into commonly used patterns for dates or times will be considered to be numbers.

Gnumeric usually figures out correctly both the type and the appropriate display format for the data being entered. Occasionally, the user will have to force Gnumeric to consider the data to be a different data type than Gnumeric would guess by default. The details of this process is explained in greater detail in the extended chapter on data, Chapter 5, Working with Data.

Entering text

Entering text simply requires selecting the appropriate cell, typing the text and then the Enter key. If the text is too large to fit in its own cell, and the cell to its right is empty, the text will span into the cell on the right. By default, Gnumeric uses a display format for text in which the contents are shown left justified.

For more information about text elements, see the section called “Text Data Elements”.

Entering numbers

Entering numbers requires selecting the appropriate cell, typing in a number and then the Enter key. Gnumeric recognizes several types of information to be numbers.

The simplest kind of input which Gnumeric recognizes as numbers are standard numeric values. Technically, these are contiguous sequences of digits which may have a separator symbol between the thousands and another symbol indicating the decimal separator. These symbols follow the English convention by default (comma as thousand separator, period as decimal symbol) but will adopt the symbols appropriate for a different locality if Gnumeric is launched in a particular way. For instance, in a French setting the period is the thousand separator symbol and the comma the decimal separator symbol. By default, Gnumeric will display these numeric values lined up against the right side of the cell.

Several other types of input are recognized as numeric values which means that calculations can be performed on the values in the cells.

  • Dates in the standard format of the locale are recognized as numbers. By default, inputing 11/21/1970 will be recognized as the twenty-first of November of the year nineteen seventy. Gnumeric stores the value as the number of days since the first day of January in 1900.

  • Time values, such as 10:34 or 11:23:45 PM, are recognized as number values. These values are stored in Gnumeric as fractions of the whole day.

  • Percentage values can be input simply by appending the percent symbol (%) to the value.

  • Fractions can be input and are recognized as values.

  • Numeric values can be input using scientific notation. For instance, 1.003e+6 will be recognized as the value one million three thousand.

For more information on numbers, see the section called “Number Data Elements”.

Entering a Boolean

Entering boolean values requires selecting the appropriate cell, typing in either "TRUE" or "FALSE" and then the Enter key.

Entering a Formula

Entering a formula requires selecting a cell and typing in the equals sign (=) and then a valid formula. If Gnumeric cannot understand the formula which is entered, it will open a dialog box which may have an explanation and gives the user a chance either to re-edit the expression or to accept the entry as a text entry instead of a formula. The second choice makes it easy to re-edit the entry into a valid formula simply by fixing the formula and removing the leading apostrophe (') before the equals sign.

Formulas can be quite complex since the power of spreadsheets comes from these formulas. A simple example of the use of a formula is as follows: first, select cell B2 and input the value "3" into that cell. Second, select cell D4 and input (without the quotes) "=B2+2" and then type the Enter key. Cell D4 should display the value "5". If the value of cell B2 is changed from "3" to "100", Gnumeric will automatically update the value of cell D4 to "102".

A valid formula can be a simple arithmetic equation such as

          =3+4-1
        

which uses a formula to make the cell equal to the value 6.

Formulas may include calls to functions. These are statements which indicate that more complex operations should be performed. For instance, a formula could be "=EXP(24)" which would give the value of e (the base of the natural logarithm) raised to the 24th power. The cell would then display "2.6489e+10".

As was shown in the example above, formulas may contain `references' to the contents of another cell. In the example given above, the contents of the cell in the second column and the second row was used in a calculation by using the cell name "B2". These references mean that complex calculations can be automatically updated when one of the original values change.

References can be made to the cells in other worksheets and even to those in other workbooks (files). The basic format of a complete reference is made of the name of the file the reference is in, enclosed by square brackets, followed by the name of the sheet, followed by an exclamation point, followed by the letters of the column, followed by the number of the row. For example, a complete reference could be "[my_file.gnumeric]"Sheet3"!C3". These complete references can be shortened if the filename or sheet names are the same as that of the reference. "AE34" would refer to the cell in the current file, in the current worksheet which is in column "AE" and in row "34".

References can refer to a range of contiguous range of cells. For instance, the reference "A1: E5" refers to all the cells from the top-left most cell of the current sheet to the cell five rows down and five rows over. This can be useful in a formula which uses a function such as MAX(). The formula "=MAX(A1:E5)" would display the value of the largest number value in this range of cells.

For more information on references see the complete discussion in the section called “Cell Referencing” later on in this manual.

For a more discussion of the use of formulas see the section called “Formula Elements” later in this manual. For a list of the functions available, see the function reference appendix, Appendix A, Function Reference, or click on the toolbar button with the symbol "f(x)" on it for an organized list of functions.

Entering an Error Value

Error values are almost never entered into the spreadsheet directly but generally arise when formulas cannot calculate valid results.


Previous
Using Commands
ContentsNext
Cell Formats
PreviousNext

Cell Formats

The data in Gnumeric are stored in the cells of the spreadsheet, each of which has a cell format which dictates how the data will be displayed, whether the cell will have borders and other information. Cell formatting can be quite confusing at first because it combines simple changes, such as the colour of the characters being displayed, with more complex ideas, such as how future changes to the cell will be interpreted.

All of the cell formatting commands can be reached through a context menu by right clicking on a cell and selecting the Format Cells... menu entry. This will open a dialog window with tabs which group together similar types of formatting. Clicking on the Font tab allows a user to change the font famly, style, size and colour. For instance, if the cell B2 contained the text "Hello, this is my first spreadsheet" then this text could be made bigger by selecting a larger font size.

Simple Cell Formating

Simple changes to the format of a cell include changing the alignment of the characters, changing the font type or colour, changing the border, and changing the colour or pattern of the background.

The Alignment, Font, Border, and Background tabs are simple to understand simply by playing around with the settings and looking at the effect on a cell which contains text.

The Protection and Validation tabs are advanced functionality which can be ignored at the begining. For explanations of these tabs, see the advanced description in the section called “Validation Tab”.

Formating the Display and Entry Data Types

Cell formats are most difficult to understand when they address the type of data stored and the visual display of that data. This only arises with the options selected in the Number tab of the Format Cells dialog. While these ideas are complex, they must be understood at the beginning because they are fundamental to spreadsheet use.

When data are entered into Gnumeric, the spreadsheet interprets the entry based on the input format of the cell. The default format of empty cells is the General format which instructs Gnumeric to guess both the type of the data being entered and a suitable display format for that data type. However, the General format can be changed to a specific format in order to alter both the way Gnumeric interprets any future data input to the cell and the way data in the cell are displayed.

Note

Changing the format does not alter the data type of data already in a cell but does alter the display format of that data. This means that the input format will only affect future input whereas the display format will affect both the data currently in the cell and any data placed later into the cell.

For example, if a user enters "12/25/2000" (without the quotes), Gnumeric guesses that this is a date and stores the value 36885. (The value Gnumeric uses for dates is the number of days since the last day of 1899. However, Gnumeric perpetuates an error of Excel for the sake of compatibility and assumes 1900 to be a leap year even though it was not.) At the same time, Gnumeric changes the display format to display this number as a date, with a numeric month, day and year, separated by slashes.

Important

The order in which the formatting operations occur is critical. It is not possible to alter the type of a datum currently in a cell by formatting. To alter the intrepretation of the data type in a cell, formatting must occur prior to the entry of the data.

It sometimes becomes necessary to override the "General" type if Gnumeric is making an incorrect assessment of the data being entered. Postal Zip Codes in the United States, for instance, are incorrectly interpreted to be numbers. Some of these Zip Codes start with a leading zero which the "General" format type drops so the user must intervene to keep that zero displayed. In order to input these Zip Codes, the following steps must be performed. First, the cell must be selected. Next, the cell must be formatted to hold a "Text" value. This formatting changes both the interpretation of any future data entry into this cell and alters the display formatting of the cell. Finally, the Zip Code can be entered. Following these steps, the data value will be considered to be a "Text" value, any leading zeros will be retained and the data will be left justifed since this is the default display format for "Text" values.

Tip

If the data type of a whole column needs to be altered prior to data entry, this can be done in one formatting operation. First the whole column must be selected by clicking on the column header (the letters at the top). Next, the selected cells can be formatted at once by clicking the right mouse button to obtain the context menu or by selecting the Format menu and the Cells... menu entry. This quick approach to pre-formatting cells can also be done for any group of selected cells.


Previous
Data in Gnumeric
ContentsNext
Complex Cell Selections
PreviousNext

Complex Cell Selections

Selections can be more complex than a single cell at a time. Selections may describe a continuous rectangular block of cells, an arbitrary shaped group of cells or even a discontinous group of cells.

The most common way to select a continous rectangular block of cells uses a click and drag mouse motion. The cells in this continous block can be selected by clicking and holding the left mouse button down on one of the corner cells (for instance, the top, leftmost cell) and dragging the mouse cursor to the opposite corner (for instance, the bottom, rightmost cell) before releasing. The selection box will expand to include all of the cells in this range.

The most common way to select an arbitrary shaped or discontinous group of cells is to hold down the Ctrl key while using the mouse to select cells. As long as the Ctrl key is held down, all of the cells included by a click or a click and drag motion will be added to the selection.

Note

There are several operations which cannot be performed with odd shaped or discontinous groups of cells.

For more information and other ways to select multiple cells, see the complete discussion in the section called “Selecting Cells and Cell Ranges”.


Previous
Cell Formats
ContentsNext
Moving Cell Contents, Inserting New Cells or Deleting Cells
PreviousNext

Moving Cell Contents, Inserting New Cells or Deleting Cells

The contents of cells, both data values and formatting, can be moved from one part of a spreadsheet to another so that data do not have to be re-entered if the spreadsheet is reorganized. New cells can be added to a spreadsheet and old cells removed but these latter operations cause the layout of the spreadsheet to be altered.

Moving Cell Contents

The simplest way to move cell contents around a spreadsheet involves selecting a block of cells containing the contents to be moved, either "cutting" or "copying" those cells, selecting the location where these contents are to be moved and then pasting the data.

Moving data can only be performed with a single selection of cells which means that only continous rectangular blocks of cells can be moved. This does mean, however, that columns or rows can be moved as a unit. By default, Gnumeric moves the entire contents of the cells including both the data values and the formatting of the cells.

Once a group of cells is selected, they can be "cut" or "copied" either using the Edit menu, the toolbar buttons (a pair of scissors or two pieces of paper, respectively), the right mouse button context menu or keyboard shortcuts (Ctrl+X or Ctrl+C respectively). If cells are "cut" the contents will be removed from the current location. If cells are "copied", the contents will be duplicated in the new location. These two operations treat cell references in formulas slightly differently. If cells are "cut", any references in the cells in the new location will remain pointed at the original cells. If cells are "copied", the references in the cells in the new location will point to cells in the same relative position.

The new location for the cells can be selected in two ways. The simplest is to select the top, left cell of the new location. Alternatively, the whole new range of cells can be selected but the shape of this new range must match exactly the dimensions of the original range which is more difficult.

Finally the cell contents can be "pasted" in the new location using either the Edit menu Paste menu entry, the toolbar button with a clipboard, the context menu Paste menu entry or the Ctrl+V keyboard shortcut.

An alternative way to move cells in a current worksheet involves dragging and dropping the original selection. The cells to be moved are selected as above. The mouse cursor is then placed on the thick white selection border. If the left hand button is clicked and held, the selected cells can be dragged to a new location resulting in the same operation as a "cut" and a "paste". If the Ctrl key is held down during the click and drag of the mouse, the result is the same as a "copy" and "paste" operation and can be repeated several times.

Both the Edit menu and the context menu have an extra menu entry called Paste Special... which can be used during a cut and paste operation to seletively transfer some of the original the cell contents or to alter the contents in specific ways. This option allows the transfer of only the cell contents, only the cell formats or only the calculated values of the cells. The transfered contents can also be mathematically combined with the current contents of cells in the new location. Alternatively, the selection can be transposed. See the section called “Paste Special” for more information on the Paste Special... command.

Inserting and Deleting Cells

A worksheet can also be altered by inserting or by deleting cells. These operations actually alter the locations of cells in a workbook.

Inserting and deleting columns and rows are easy to understand. If a group of columns or rows is selected, selecting the Column or Row menu entries in the Insert menu will add the same number of columns to the left of the selected columns or of rows above the selected rows. The context menu can also be used for the insert operation. The context menu can be used to delete the currently selected columns or rows.

Warning

Insert operations can result in the loss of data if the last columns or rows currently contain information.

Individual cells or contiguious rectangular blocks of cells can also be inserted and deleted. During this operation, the user is asked which way to shift the current cells to allow the insertion or deletion of the selected cells. The movement can be along the rows or along the columns and will result in the relative movement of cells which were previously contiguous. This shift is the fundamental difference between insert and delete operations compared to cut or copy and paste operations.


Previous
Complex Cell Selections
ContentsNext
Sheets
PreviousNext

Sheets

The worksheets in a workbook can be altered in several ways. The name of a particular worksheet can be altered. New sheets can be added. A current sheet can be duplicated or removed. The sheets can be reordered. Other sheets operations can alter the colour of the tabs or change the "protection" status of a worksheet to allow cells to be locked or hidden.

The names of sheets can be changed. This can be done by editing the tab directly. Clicking twice on a tab will highlight the text and then standard editing operations will alter the text contents.

A new empty sheet can be inserted after the current sheet through the Sheet menu entry in the Insert menu or through context menu which appears when the right mouse button is clicked on a tab.

Instead of an empty sheet, a copy of the current worksheet can be added to the workbook after the current sheet by selection the Duplicate this Sheet menu entry from the context menu.

The current sheet can be removed using the Remove this Sheet menu entry from the context menu.

Warning

Deleting sheets cannot be retrieved through the "Undo" mechanism and is therefore an irreversible operation. Be careful!

Worksheets can be re-ordered by clicking and holding the left mouse button on a tab, then dragging that tab to the left or to the right. Little arrows will appear showing the location where the sheet will be placed. Releasing the mouse button will then move the sheet to this new positon.

Many of these operations can be performed at once from the Manage Sheets dialog which can be opened through the Manage Sheets... menu entry in either the Sheet submenu in the Edit menu or in the sheet tab's context menu.


Previous
Moving Cell Contents, Inserting New Cells or Deleting Cells
ContentsNext
Graphing
PreviousNext

Graphing

A major function of moderns spreadsheets is to provide a quick and easy way to plot numerical data in graphical charts of various kinds. The use of graphs provides users a way to explore data to discover relationships and trends in the data values. Graphs also provide an effective way to present data so as to demonstrate relationships in the data and summarize large amounts of data in an effective image. In Gnumeric, both of these can be done easily and efficiently.

When graphs are used to explore data, the aim is usually to produce a plot quickly with a minimum of effort. These plots are not designed to look polished but must present the required information as quickly as possible. To produce these graphs, users must learn a simple series of operations which will produce the desired plots. For speed, the most critical operation involves selecting the cells on the spreadsheet which will be used as data before starting the graphing process.

Graphs which are used to present data must be carefully crafted to communicate effectively. Clarity of communication is the critical factor and the plot may include a large amount of work to ensure that the visual result of the plot helps to communicate the desired result.

Tip

The use of a graph may not be the best way to communicate information. A verbal explanation or a simple table are often sufficient and, because they are more compact, may be more effective ways to communicate.

Gnumeric includes a large number of features which allow users to craft the look of a particular graph for maximum effectiveness. In Gnumeric, it is possible to change the font, modify the borders of each graph and of each plot, add patterns and images to backgrounds, add patterns to plot elements and configure the graph in multiple ways. These features will be explained in detail below.
Tip

Graphs which use a large number of the graphical features available in Gnumeric often appear cluttered. The visual richness of such images can often obscure the message which should be communicated. Spare, elegant and direct graphs will communicate the idea most effectively.

A Simple Graphing Example

This section will introduce the process of creating a graph by presenting an example of a side-by-side column chart.

Data for the examples.

Because a graph requires data, it is first necessary to create some simple data to use in these examples. First we have to input these data into a worksheet. For clarity in this discussion, the word "Interval" should be in cell A1. This will result in a worksheet whose top left corner looks like Figure 3.2, “Gnumeric with the data used in this example.”.

Figure 3.2. Gnumeric with the data used in this example.

Making the Column Plot

A column plot presents a series of data points as columns whose height depends on the value of each datum. This is a useful type of plot to show the number of eggs produced in each interval.

Making a Column Plot

  1. The quickest way to make a plot starts with the selection of the data. Using the mouse, first select the range B1:C5 which includes the data both for the number of Eggs and for the number of Females.

  2. Next, click on the graphing toolbar button

      which looks like three colored pillars. This launches a new window called the graph druid.

  3. Next, click on the word "Column" next to the icon with vertical colored bars

      which will move the selection down to that row.

  4. Click on the "Ok" button. This will make the druid disappear and leave the mouse cursor as a thin crosshair.

  5. Finally, we will place and size the graph on a sheet. Click on the sheet and drag downward and to the right. As the mouse is dragged, a rectangle will expand. When the mouse button is released, a simple column chart should appear.

The simple graph should look like Figure 3.3, “The Simple Column Graph.”.

Figure 3.3. The Simple Column Graph.

Modifying the Column Plot

The graph can be customized with titles, label boxes and lots of extra information. To customize the graph, right click on the plot to open the graph custom menu. The graph context menu will appear as shown in Figure 3.4, “The context menu which appears on a graph object.”.

Figure 3.4. The context menu which appears on a graph object.

This menu provides access to several functions. Users can customize the appearance of graphs by selecting the Properties menu item, can save the graph into PNG or SVG formats using the Save as image menu item, can reorder the various graphical elements displayed in the worksheet using the Top, Up, Down, and Bottom menu items or can delete graphical elements with the Delete menu item.

If we wanted to add a title and a legend to the graph, we could use the Properties menu item to open the graph editor and customize the graph as follows:

Adding a title and legend to the Column Plot

  1. Right click on the column plot to open the context menu and select the Properties menu item. This will open the graph editor.

  2. The graph editor opens with the "Graph" entry selected in the graph tree on the top left. In the top right is a preview of the eventual graph. The bottom lists some attributes of the item selected in the graph tree. Click and hold on the Add button

      to open the graph menu, which will have different entries depending on the item selected in the graph tree. Drag the mouse cursor down until the selection highlights the "Title" entry and release the mouse button. This will add a "Title" node in the graph tree and change the selection to this node.

  3. In the text field, add a title such as "Egg Production and Female Productivity" and type the Enter key. Note that the title appears at the top of the graph.

  4. In the graph tree, select the node labelled "Chart1". Next, click and hold on the add button, drag down to the Legend menu item and release. Note that this adds a legend on the right of the graph.

  5. Click on the "Ok" button. The plot should now have a title and a legend. Note that gnumeric has used the words in the column headers automatically to describe the two data series.

The modified graph should look like Figure 3.5, “The Modified Column Graph.”.

Figure 3.5. The Modified Column Graph.

Graphing is changing rapidly in Gnumeric 1.2

Graphical charts in Gnumeric version 1.2 are evolving quickly to provide many types of charts, each of which provides an elegant plot automatically but can be cutomized in detail according the user's preferences. This is a active area for the programmers and therefore will be changing dramatically in the future. Detailled information about graphical charts is presented in Chapter 7, Graphics: Plots, Images and Drawings. That chapter will be updated regularly during development to explain in detail how to produce and modify charts.


Previous
Sheets
ContentsNext
Printing
PreviousNext

Printing

Printing in Gnumeric is quite simple and similar to other GNOME applications. Printing can be done using the toolbar buttons or can be accessed through the File menu. Printing usually involves configuring the page properties (like the paper type and margins), then previewing the document to be printed and finally actually printing the document.

In order to configure a worksheet for printing several parameters must be set such as the correct size of the paper sheet, the layout of the spreadsheet, headers and footers and such information. These parameters can be set once for all of the worksheets in a file or separately for each worksheet. The Page Setup... menu entry invokes a dialog through which to alter the printing parameters.

The Print Preview... menu item or toolbar button will open a window which shows what will be printed with the current configuration. By default, printing only applies to the current worksheet but this can be changed in the print dialog explained next.

The Print... menu item or toolbar button will open a dialog which allows the user to select whether to print to a printer or to a postscript or PDF file. Various printers can be selected and the parameters of the job, such as whether to print all the worksheets or only the currently selected worksheet, can be altered. Clicking on the Print button will perform the printing task.


Previous
Graphing
ContentsNext
File Opening and Saving
PreviousNext

File Opening and Saving

When you first start Gnumeric a new workbook will be opened. To save this workbook into a file, click on File->Save As … . This brings up the file dialog where you can pick the filename and format for the book you are saving. It is best to save the book in the Gnumeric XML file format the first time. This allows you to easily edit the file without worrying about changes in the format and look of the book.

Once the file has a name and a file format, saving subsequent changes can be done easily either through the File menu, through the toolbar or through a keyboard shortcut. Saving with the menu requires selecting the File and then the Save menu item. Saving with the toolbar simply requires clicking on The "Save File" button  in the tool bar. Finally saving with a keyboard shortcut simply requires typing Ctrl+S.

Sometimes you want your book to be saved often so you do not lose any work. To save the book at intervals click on Tools->Auto Save …. The Auto Save dialog appears.

Figure 3.6. Auto Save dialog

The autosave dialog box.

Click on the Automatic Save Every button and enter the number of minutes will pass between each save. When the interval is shorter more of your work will be potentially saved, but Gnumeric might appear sluggish. If Gnumeric is sluggish increase the time between saves. The button Prompt Before Saving brings up a dialog to ask if you want to save the book.

Warning

Using the automatic saving feature of Gnumeric can save time but is dangerous. Gnumeric does not create a new file each time a file is saved but instead Gnumeric modifies the existing file which destroys the previous work. In certain situations, this feature can lead to the loss of possibly important work. Users are highly recommended to backup their work by copying the original file to a new name or by saving files to newly named files.

An existing spreadsheet file can be opened in several ways. If the file has an icon on the desktop, this icon can be clicked or double-clicked with the mouse button. Similarly, if a file manager, such as the Nautilus file manager, lists the file, then the file name can be clicked and opened. If Gnumeric is already opened, a file can be opened by clicking on the File and selecting the Open menu item. Alternatively, the "Open file" button on the toolbar, An image of the "Open File" button. , can be used or the F3 key clicked. All three of these open the Open File dialog. You can then select the spreadsheet file you wish to open. Gnumeric can open many different types of spreadsheet file formats.

Note

If the file has recently been opened in Gnumeric, the file name will appear in the File menu and can simply be clicked to re-open the file.


Previous
Printing
ContentsNext
Closing Gnumeric
PreviousNext

Closing Gnumeric

There are several ways to close Gnumeric. The simplest is to select the File menu and then the Quit menu option at the bottom of the File.

Gnumeric can also be closed through the window manager by clicking on a close box in the window frame or through a pop-up menu. The placement of the box and the invocation of the menu depend on the particular window manager and the theme being used. If the GNOME panel is running the window list applet, clicking with the right mouse button opens a context menu with a Close which can be used to close Gnumeric.

Note

If any changes have been made to the workbook since the last time it was saved, a dialog will open to ask what is supposed to happen to the contents of the workbook. At this point the contents of the workbook can be saved (Save), the request to close gnumeric can be canceled (Don't Quit) or the most recent changes can be discarded (Discard). If the user decides to save the content, a second dialog may open requesting a file name, location and type for the saved workbook.

Note

Any files which are saved by Gnumeric must be deleted by the user. Either the GNOME file manager Nautilus or the shell tool rm can be used to delete the files.


Previous
File Opening and Saving
ContentsNext
The Elements of Gnumeric
PreviousNext

Chapter 4. The Elements of Gnumeric

This chapter describes all of the pieces of Gnumeric which a user can manipulate. The chapter provides explanations for each of the menus, menu entries, toolbar buttons and other elements of the graphical user interface.

Note

This chapter has not yet been updated for the 1.2 release of Gnumeric but still describes the earlier releases. The descriptions will still be generally useful to those attempting to understand the menu entries of Gnumeric 1.2. This chapter will be updated as time permits.

Table of Contents

Overview of the Elements of Gnumeric
Introduction to Menus
The Menubar
General Menu Behavior
The File Menu
The Edit Menu
The View Menu
The Insert Menu
The Format Menu
The Tools Menu
The Data Menu
The Help Menu
Context Menus in Gnumeric
The Context Menu for the Cell Grid Area
The Context Menu for Column and Row Headers
The Context Menu menu for Worksheet Tabs
The Context Menu for Embedded Objects and Components
The Context Menu for Toolbars
The Gnumeric Toolbars
General Toolbar Behavior
The Standard Toolbar
The Format Toolbar
The Object Toolbar
The Elements of the Gnumeric Worksheet
Data Entry Area
Current Cell Indicator
The Cancel Button
The Confirm Button
The Equals Button
The Cell Grid
The Column and Row Headers
The Scrollbars
The Tabbed Sheet Indicator
The Information Area
The Menu Hint Area
The File Status Indicator
The Running Calculation Area
The Mouse Pointers used by Gnumeric

Previous
Closing Gnumeric
ContentsNext
Overview of the Elements of Gnumeric
PreviousNext

Overview of the Elements of Gnumeric

This part of the Gnumeric manual explains the pieces of the software that users can manipulate. The menus, the toolbars and the cell grid area comprise what is called the graphical user interface of an application because it is an interface --- a way to interact with Gnumeric --- which is made of graphical elements --- pictures --- designed to be used by human users.

Gnumeric opens by default with a view of an empty workbook which is called "Book 1" and which contains three worksheets: "Sheet1", "Sheet2", and "Sheet3" as can be seen in Figure 4.1, “The Gnumeric worksheet elements”. The outermost portion of the window is not actually part of Gnumeric and may look different on different machines. Gnumeric attempts to place its name and the name of the workbook on this outer portion.

The majority of spreadsheet work is done while interacting with this view of Gnumeric. All of the functions which Gnumeric provides can be accessed quickly from here. The graphic elements of Gnumeric are made of several independent pieces. Figure 4.1, “The Gnumeric worksheet elements” shows a newly opened, empty Gnumeric with the principle elements labelled.

Figure 4.1. The Gnumeric worksheet elements

The elements names are listed below along with a reference to the section that discusses that element. Those reading this document on their computers may be able to click on the references to jump to that section of the manual.

An image of the number 1 label.  The menubar

The menubar provides access to the core functions of gnome. Almost everything that can be done in Gnumeric can be done through the menus. The menus and menubar are discussed in the section called “Introduction to Menus”.

An image of the label number 2.  The standard toolbar

The standard toolbar provides shortcuts for the most used items in the menus. The toolbars are discussed in the section called “The Gnumeric Toolbars” and this toolbar in particular in the section called “The Standard Toolbar”.

An image of the label number 3.  The format toolbar

The format toolbar changes the display properties of data in the workbook. It is presented in the section called “The Format Toolbar”, part of the general discussion of toolbars of the section called “The Gnumeric Toolbars”.

An image of the label number 4.  The data entry area

The data entry area is useful for the modification of complex formulas. It is discussed in the section called “Data Entry Area”.

An image of the label number 5.  The information area

This area is used by Gnumeric to give feedback on the status of certain operations. This information is explained in the section called “The Information Area”.

An image of the label number 6.  The object toolbar

This toolbar enables the user to draw graphic elements on the sheet, such as text labels, big red circles or thin green arrows. These can be used to bring attention to a particular part of a worksheet. The object toolbar is explained in the section called “The Object Toolbar” in the the section called “The Gnumeric Toolbars” portion of the manual.

An image of the label number 7.  The cell grid area

The cell area lies in the middle of all the rest. The cell area includes the row and column labels, the scrollbars and the tabs below. The use of these elements is explained in the section called “The Cell Grid”.

The next chapters will explain each of these elements. the section called “Introduction to Menus” will explain the menus, the section called “The Gnumeric Toolbars” will explain the toolbars and the section called “The Elements of the Gnumeric Worksheet” will explain the remaining elements.


Previous
The Elements of Gnumeric
ContentsNext
Introduction to Menus
PreviousNext

Introduction to Menus

This section of the manual describes the use of the menubar and the menus themselves. The rest of the section called “Introduction to Menus” then explains each entry in every Gnumeric menu, submenu or context menu.

A menu is a graphical element within a program which appears with a list of options. For instance, almost all applications have a File menu through which the user can access the computer's filesystem to open or save their work. The main menus are on the menubar. The use of these menus is discussed in the section called “The Menubar”.

Gnumeric also uses context menus to give users a quick way to access certain commands. The context menu will open up right under the mouse pointer when one of the mouse buttons, usually the rightmost, is clicked. This menu is called a context menu because the entries in the menu are different depending on the location of the mouse pointer. The context menus are discussed in the section called “Context Menus in Gnumeric”.

Both the main menus, on the menubar, and context menus may have sub-menus. Sub-menus are indicated by a small right pointing arrow. To access the sub-menus, the user must move the pointer down to the sub-menu entry and carefully across to the position of the little arrow. After an instant the sub-menu will open up and the user must carefully move the pointer directly across into the sub-menu. Occasionally, when there is not enough room to the right of the currently open menu, sub-menus may open to the left. Navigating sub-menus can be difficult since the menu will close if the mouse pointer moves into any other menu entry.

Menu entries which are followed by an ellipsis (three dots) indicate that this entry will open a dialog window which will ask the user for more choices.

The Menubar

The default location of the menubar is at the top of the application window. The menus provide quick and organized access to all major commands such as opening files, saving files, printing and quitting the application.

Figure 4.2. The Gnumeric menubar.

An image of the Gnumeric menubar.

The leftmost portion of the menubar is a little tab. This tab can be used to grab the menu bar and remove it from the rest of the application. This is done by clicking and holding on the tab and dragging it away from the Gnumeric window. The menu can also be placed in different parts of the Gnumeric window, so that it could appear at the very bottom of Gnumeric as is shown in Figure 4.3, “A re-arranged Gnumeric.”.

Figure 4.3. A re-arranged Gnumeric.

An image of gnumeric with the toobars re-arranged.

The menubars and the toolbars share this ability to be re-arranged. The menubar is at the bottom of the Gnumeric window, the standard toolbar has been detached and the object toolbar has been moved the the right side. The user can choose what configuration works best. The toolbars can be dragged back into place in the same manner by which they were moved originally.

General Menu Behavior

Gnumeric menus are opened with a simple click on the name of the menu in the menu bar. Once clicked, the menu will stay open. If the mouse pointer is dragged over the name of another menu on the menubar, the first menu will close and the new menu open up. This is a useful way to look in each menu to hunt for a commands. Menus can also be opened through the keyboard. One of the letters in each menu is underlined. Typing the Alt key at the same time as the underlined letter key will open the menu. This is also true of sub-menus. Once the menus are open, the arrow keys can be used to move between menus or select an entry in a particular menu. An open menu can be closed with a click over any other area of the application or of the desktop. The menus can also be closed by typing the escape key, Esc.

Menus can be "torn-off".

Gnumeric menus, like most menus in GNOME project software, are "tear-off" menus. This means that the menu can be opened up into its own window and kept open in a differnt part of the screen. This is useful if there is a menu that you keep using for a particular task. Just beneath the top of each menu is a dashed line. Clicking on that line tears off the menu.

Figure 4.4. Gnumeric menus can be torn off.

An image of a torn off menu.

To get rid of a dettached menu, the dotted line can be clicked once more or the window containing the menu can simply be closed. The window can usually be closed by clicking in the top right corner of the window. Like the window containing Gnumeric, this outer window is not actually made by Gnumeric. Therefore the manner in which a user closes this window will depend on the configuration of the desktop the user has chosen.

Keyboard Shortcuts

Many menu entries are followed by a series of keynames. These keys can be used to perform the menu action without having to open the menu. These are often combinations of keys involving the control key which is labeled as Ctrl, the shift key which is labeled Shift and the function keys which are labeled with an F and then a number. For example, to quickly cut a selection (accessible through the Edit menu), the user can make a selection and then type the control key and the "x" key at the same time.


Previous
Overview of the Elements of Gnumeric
ContentsNext
The File Menu
PreviousNext

The File Menu

The File menu is the most important menu in Gnumeric because it gives the user the ability to interact with the computer operating system. This menu allows the user to create files containing all the work they have done. It also enables users to print the results of their work. Finally, the File menu is the best way to close Gnumeric.

Figure 4.5. The File menu.

An image of the File menu.

The menu choices are grouped into the following groups:

An image of the label number 1.  File operations.
  • New --- Create a new workbook. This opens a new workbook in a new window. By default the workbook will be named "Book1" or another number if there is already a worksheet with that name open. Note that the opened file has not yet been saved.

  • Open... --- The Open menu item opens the file chooser dialog to allow the user to pick an existing workbook for Gnumeric to open. Only two file types can be opened with this option. The Open menu item can open Gnumeric's default XML based file format which uses the extension ".gnumeric" and can open Microsoft Excel's file format which uses the ".xls" extension. The Open menu item creates a new window containing the selected file. A more extensive dicsussion is presented in the section called “Opening Files”.

  • Import... --- The Import... menu item opens a file chooser dialog similar to the one opened by the Open menu item. The Import... dialog has a file type selector in which the user can pick supported file formats. For more information on file import, including the extensive druid to assist users importing text files, such as tab delimited files or comma separated value files, see the section called “Importing Files”.

  • Save --- The Save menu item saves the current worksheet. If the file has been named and saved before, this will silently save the file to the current filename. If it has not been saved before, this will act as if the Save As... menu item had been called and prompt the user for a filename.

  • Save As... --- The Save As... menu item allows users to save a file which has not yet been named to a named file. This is always used when a user saves a file which Gnumeric has named by default. This menu item can also be used to save a newly created file or to save an existing file to a new and different name. For an explanation of the file formats which gnumeric supports see the section called “Saving Files”.

An image of the label number 2.  Printing operations.

These menu items enable Gnumeric to print. Each item is presented below and printing issues are discussed fully in Chapter 12, Printing.

  • Page Setup... --- The Page Setup... menu item call the Page Setup dialog. This dialog allows the user to set various printing options such as paper type, margin sizes and running header and footer formats. This dialog is explained in detail in the section called “Page Setup.”.

  • Print... --- The Print... menu item allows a user to print one or all of the worksheets in a workbook. Gnumeric can send files directly to a printer or can print to postscript or portable document format files. The Print dialog is explained further in the section called “Printing to a Printer or a File.”.

  • Print Preview... --- The Print Preview... menu item calls a dialog which presents the current workbook as it would be printed with the current Page Setup settings. The dialog also permits the user to print. This dialog is explained in the section called “Print Preview.”.

An image of the label number 3.  The document summary.

This menu item opens a dialog with fields to edit the document summary information of the file currently open in that window. Summary information describes the sheet, for instance, with the author name and a comment.

An image of the label number 4.  Recently used files.

These menu entries are shortcuts to re-open recently used files. The list will change dynamically as new workbooks are opened and created. Clicking on a file name listed here is the same as using the Open menu entry and finding the file in the Find File dialog. Note that if the file has been moved since Gnumeric last saved it, Gnumeric will not find the file.

An image of the label number 5.  The Close and Quit operations.

These menu items either close the current worksheet, Close, or close all open worksheets, Quit. Gnumeric will prompt the user with a Save Workbook.. dialog for any workbooks that have been changed since the last time they were opened or saved.

  • Close --- The Close menu item allows the user to close the current workbook. If this is the only workbook which this instance of Gnumeric has open, the close operation will also quit Gnumeric. If other workbooks are open, this workbook will close without affecting the others. If the workbook has unsaved changes, Gnumeric will ask the user if he wants to save the file.

  • Exit --- The Exit menu item will close all the workbooks currently being used by Gnumeric and quit the program. Gnumeric will prompt the user asking if he wants to save any workbooks which has changes which have not been saved.


Previous
Introduction to Menus
ContentsNext
The Edit Menu
PreviousNext

The Edit Menu

The Edit menu is mostly used for operations on a worksheet or between worksheets. This menu gives users powerful editing operations such as the ability to undo recent changes, the ability to cut and paste selections of cells and the ability to search for specific cell contents.

Figure 4.6. The Edit menu.

An image of the Edit menu.

The menu choices are grouped into the following groups:

An image of the number 1 label.  Change History.

These menu items allow the user to remove recent changes to a worksheet or re-introduce changes which have been undone. These options give the user control over recent edits. This functionality is often called the "change history" of an application.

The type of edit has no importance. An edit which deletes the contents of a cell is treated in the same way as an edit which adds contents to a cell. The change history is session specific. The user will not be able to undo changes through the change history if the file is saved and then re-opened. Note also that the list only covers the last few dozen operations. The number of operations which Gnumeric tracks in its history depends on the size and complexity of those operations. Finally, there are some operations which cannot yet be modified in this way in Gnumeric 1.0. Sheet operations (adding or removal) cannot be undone, nor can deleted comments be restored, nor can altered summary information, nor can operations on embedded objects be undone.

  • Undo --- The Undo menu item is used to remove the last few edits from a workbook. The edits must be undone in order. This menu item removes only the last edit from the workbook. The user can also access the undo list through one of the toolbar buttons and its associated menu. With this menu, the user can undo several operations at once. This is explained in section the section called “The Standard Toolbar”.

  • Redo --- The Redo menu item is used after an undo operation to restore the change that was undone. The menu item only restores the last undone operation. Users can also resotre edit using a button on the standard toolbar and through the associated menu. The menu allows several operations to be redone at once. It is explained in the section called “The Standard Toolbar”.

An image of the label number 2.  Operations on selected areas.

These menu items enable selected cell contents to be moved around a spreadsheet, moved between worksheets or between workbooks. Selections are areas of the spreadsheet that have been chosen, usually with the mouse, and are usually colored pale blue. Selections are explained in greater detail in the section called “Selecting Cells and Cell Ranges”. Gnumeric currently only allows single range selections for these operations.

To use these menuitems, the user must first select the range of the cut or copy area. When the user then picks these menuitems, the contents of the selected areas will be entered into the Gnumeric clipboard and into the X clipboard. The contents of the Gnumeric clipboard can then be inserted into a new region of the spreadsheet, into another worksheet or into a new workbook. The X clipboard holds the space delimited results of each cell: either the text or the result of any calculation. The X clipboard can be pasted into any text area.

  • Cut --- The Cut menu item is used to remove a selection from the selected area of a currently open workbook. When the menu item is chosen, the selected area will be outlined with a moving dotted line. This is the area which will be moved. The selection will only be removed after it is moved to the new location. Until then cut has not had an effect on the worksheet.

  • Copy --- The Copy menu item allows a user to duplicate a selection. The original data remains where it was and the Gnumeric clipboard (and the X clipboard) has a copy which can be inserted elsewhere.

  • Paste --- The Paste menu item is used to paste the contents of a selection which has been cut or copied. If the selection was cut, it is pasted into the new location unchanged. Cell references will not change in that they will still point to the same cells.

  • Paste Special... --- The Paste Special... is used to paste a selection while altering certain characteristics. The Paste Special... menu item opens a dialog with three categories. The defaults make Paste Special... act as if it were the Paste menu item.

    The first set of choices allow the user to control the data pasted.The user can chose to limit the pasting to only the cell contents (no cell formatting is copied) or the opposite only cell formats copied (no contents). Furthermore, the user can insert the selection while transforming all the contents into values only. Formulas will not be copied, only the results will be.

    A second set of choices allows the user to perform simple mathematical transformations during the paste. The data in the cells being pasted into are modified by the cell contents. For instance, using the divide operation will result in each cell in the zone pasted into being divided by the equivalent cell which was cut or copied originally.

    The final choices allow the transposition of the original selection or to not paste empty cells. The transpose check box will change the selection so that the cells that are down n rows from the selection's origin are pasted as being over n columns (and vice-versa). The skip blanks prevents Gnumeric from taking any action for the cells in the selection that are blank. Note that the selection will be transformed if that option is selected but then that the paste will not change the cells in the transformed location if this skip blanks option is selected.

An image of the label number 3.  Data removal operations.

All of these operations remove data from the worksheet. They differ in the type of data removed and the re-arangement of remaining data. The differences are explained below.

  • Clear --- The clear menu item merely opens a sub-menu with four choices. The user can choose to clear all the elements of the cells in a selection: the formats, the comments, the contents. Alternatively, the user can choose to clear a single one of those elemets. Clearing the formats will leave the data or formula in the cell intact. It will remove any borders, re-set the cell alignments, change the background colour to white and the text colour to black and reset the number format to General. Clearing the comments will simply delete the comments for the cells in that location. Finally clearing the contents will leave the cell's formatting in place but remove the formula or data contents of the cell.

  • Delete --- The delete menu item may open a dialog giving the user a choice of options. Any of the options will completely delete the selected cells. Depending on the selection, Gnumeric will fill in the space the cells were occupying differently. With column or row selections, the effect is easy to understand and no choice is possible so Gnumeric does not open the dialog. The space left by selected rows, is filled by moving lower rows up whereas the space filled by deleting columns is filled by moving to the left columns which were right of the selection. For example, if columns D and E are selected for deletion, Gnumeric will move the contents of all columns from F onwards two columns to the left.

    With blocks of cells, the delete menu item will open a dialog asking the user how to fill in the deleted cells. Blocks of cells will either be filled in by the columns of cells below the block selection or by the rows on the right of the block. For example, if the user chose the block of cells from E6:G8 for deletion, those cells could be filled in by the cells below E8, F8 and G8 if the Shift cells up option were chosen. Alternatively, the cells to the right of G6, G7 and G8 could fill in the space from the right if the Shift cells left option were chosen.

An image of the label number 4.  Other operations on worksheets.

These menu entries do not group together logically. Each entry is explained in detail below.

  • Sheet --- The Sheet menu item opens up a submenu which allows users to perform operations on the worksheet. Note that this is the same set of choices as are available from the context menu which appears by clicking (usually with the right mouse button) on one of the worksheet tabs. The worksheet can be duplicated to create a second sheet with the same contents. A new worksheet can be inserted immediately following the current sheet. The current sheet can be renamed in a the little pop-up window. The sheets can be re-ordered or the current sheet can be deleted. For this last option Gnumeric asks for confirmation since this choice cannot be undone.

  • Select --- The Select menu item allows the user to select various portions of the worksheet. The Select All provides a quick way to select the entire worksheet. The Select Row and Select Column menuitems allow the user to select all the rows or columns spanned by the current selection.

    The Select Array menu item allows a user to select all the cells which are part of the same array as the current cell. The Select Depends menu item selects all the cells which are formulas which at least partially need the data in the current cell.

  • Fill --- The Fill menu item opens a submenu with only one choice currently. The Autoill menu item will fill an entire selection with any formula which is in the top left cell of the selection.

  • Search... --- The Search... menu item opens a dialog to search for cells with particular content. The dialog has three tabs. In the first the user can enter the information the user wants to find and some constraints on the search. The second tab gives some extra choices for the search. When the user has picked the options they perfer, pushing the search button on the first tab will run the search. The third tab will show which cells match the search.

  • Search and Replace... --- The Search and Replace... menu item will launch a dialog to find cells with particular characteristics and replace them all with a common content. This dialog is similar to the Search dialog.

  • Goto cell... --- The Goto cell... menuitemn opens up a dialog which allows the user to type the name of a cell in the worksheet. The current view will then change to be sure that the selected cell is in the current view and the selection will cover that cell.

  • Recalculate --- The Recalculate menu item forces the workbook to recalculate its results. This is useful if a formula in the current worksheet depends on a cell in a different workbook. Gnumeric will not necessarily know when that data has been updated so a user can force Gnumeric to recalculate all the cells in the current workbook.


Previous
The File Menu
ContentsNext
The View Menu
PreviousNext

The View Menu

The View menu is

Figure 4.7. The View menu.

An image of the View menu.

The menu choices are grouped into the following groups:

An image of the number 1 label.  Alternative views of the current document.

These menu items allow the user to open multiple views of the same document.

  • New Shared --- The New Shared menu item opens up a new window with the current workbook visible and where both windows are open to the same section of the workbook. If the user starts editing a different part of the sheet in one view, the other view moves automatically to that portion of the worksheet. Similarly, if the user changes to a different worksheet in one view, the other view changes also.

  • New Unshared --- The New Unshared menu item opens up a new window with the current workbook visible. Both view are then independent. When a change is made in either view, the other will move to show the area of the edit.

An image of the label number 2.  Global changes to the current view.

TheZoom menu item allows a user to change the amount of the sheet visible in a window of a given size. The Freeze Panes menu item allows part of the worksheet to be frozen in place while the rest of the sheet scrolls next to it.

  • Zoom... --- The Zoom menu item opens a dialog which allows the user to set the magnification of any of the worksheets in the current workbook.

  • Freeze Panes --- The Freeze Panes menu item is used to freeze the top-most and leftmost visible portion of the worksheet. This is useful to be able to line up portions of the worksheet which are not usually together. For instance, if a user had a very large table with the titles of each oolumn of data on row 12, the user could select row 13 and select this menu item. If the user scrolled through each data row, the data would line up underneath each header.

    Gnumeric freezes the portion of the worksheet which is currently visible and is above and left of the current selection. If the selection is not visible, then the frozen section will be nine rows tall and five columns wide unless the selection is in a currently visible column or row in which case that postion is used.

    Gnumeric currently does not support freezing only columns or only rows. The user can simply move the selection far to the right or far below of the area they want to freeze. This will achieve the same effect. Currently, inserted objects are not tracked with frozen panes. Objects which are not in the lower right hand pane are lost from view while the panes are frozen. These objects reappear when the view is unfrozen.

An image of the label number 3.  Toolbar configuration.

The Toolbars menu option launches a dialog to configure the presence and look of the three toolbars. This dialog allows the user either to show or completely hide each toolbar. The user can also set the toolbars to display as icons or as icons and text. The third selection Priority text only currently has no effect. This dialog allows users to view tooltips as the mouse scrolls over the toolbars. Tooltips are small windows which open up automatically when the mouse pointer is over a button. These windows contain a text explanation of the button under the mouse pointer.


Previous
The Edit Menu
ContentsNext
The Insert Menu
PreviousNext

The Insert Menu

The Insert menu is

Figure 4.8. The Insert menu.

An image of the Insert menu.

The menu choices are grouped into the following groups:

An image of the number 1 label.  Insert into workbook.

These menu items allow the user to insert objects to the workbook.

  • Sheet --- The Sheet menu item allows the user to inset a worksheet immediately following the current sheet.

  • Rows --- The Rows menu item will insert rows above the current selection. The number of rows inserted will be equal to the number of rows spanned by the current selection.

  • Columns --- The Columns menu item will insert columns to the left of the current selection. The number of columns inserted will equal the number of columns spanned by the current selection.

  • Cells... --- The Cells... menu item opens a dialog asking the user how the sheet should be altered when new cells are inserted. The dialog lists four choices. The user can choose one of these by clicking the mouse pointer on one of the four dots. Only one choice is possible and the currently selected choice has a black dot in front.

    The Shift cells right will insert a region of new cells of the size of the current selection. Cells which are on the same row as the selection and within or to the right of the selection will shift over to the right to accomodate the new cells. The Shift cells down choice will also insert a region of new cells the same size as the current selection. With this choice, cells which are in the selection or below the selection will move down to accomodate the new cells. The two other choices will act as if the user had chosen to insert rows or columns. These actions are explained above.

  • Graph... --- The Graph... menu item will allow a user to insert a graphic plot of data. This menu item will launch the graph druid. Graphing in Gnumeric is explained in the section called “Adding Data Plots to a Worksheet”.

  • Object... --- The Object... menu item launches a dialog with the objects which Gnumeric is currently able to embed in a worksheet. The user simply picks one of the objects in the list, and then inserts the object into the worksheet. These objects are not part of Gnumeric but are provided by other programs in the GNOME project.

  • Shaped Object... --- The Shaped Object... menu item allows user to insert more complicated objects into a worksheet. This is currently not used but will provide more extended functionality for the future.

An image of the label number 2.  Insert to current cell.

The menu items insert objects into the current cell.

  • Name --- The Name menu item opens a sub-menu with the single entry Define. This will open a dialog to allow the user to define a named expression. The expression can be as simple as defining an expression called "Total" which refers to a particular cell. However, the user can also build up a whole sheet with named experssions. the section called “Names” explains names in greater detail.

  • Add/Modify comment... --- This menu item opens a dialog to allow the user to enter a comment to the currently selected cell. A red triangle will appear in the top right corner of the cell to show that the cell has a comment.

  • Special --- The Special menu item opens a sub-menu which allows the user to insert either the current date or the current time into the selected cell.


Previous
The View Menu
ContentsNext
The Format Menu
PreviousNext

The Format Menu

The Format menu allows users to control the formats of cells, columns, rows, worksheets and the workbook. This menu also gives users access to templates of standard formats.

Figure 4.9. The Format menu.

An image of the Format menu.
The Format Menu offers these menuitems:

  • Cells... --- The Cells... menu item opens the cell format dialog. This dialog is used to set cell data types and formats. It is explained in the section called “Formating Cells”.

  • Column --- The Column menu item opens a sub-menu with choices to allows the user to modify the view of the selected columns.

    • Width... --- The Width... menu item opens a dialog to enable the user to adjust the size of the columns which hold the current selection. The dialog has a single entry box in which the user can change the current size of the column in points.

    • Auto Fit Selection --- This menu item makes Gnumeric automatically choose the optimal column size to display all of the text in the current selection.

    • Hide --- The Hide menu item will hide the columns containing the current selection. Gnumeric still holds these columns in memory and will save them to a file but will not display those columns. The only indication that a user has that columns have been hidden is that the column header names are not sequential.

    • Unhide --- This menu item wiil show columns which are hidden if the selection spans the two columns on either side of the selection. If columns D, E, and F have been hidden, the selection must span at least across columns C and G for this menu item to unhide columns D, E, and F.

    • Standard Width --- This menu item allows the user to resize the columns which hold the selection to the standard size. At 100 percent zoom this is 48 points or 64 pixels.

  • Row --- The Row menu item provides the same functions as the Column menu item but operates on rows.

    • Height... --- This menu item opens a dialog which allows the user to type in a row height in pixels.

    • Auto Fit Selection --- This menu item changes the rows which hold the selection to the optimal height to hold the text in the selection.

    • Hide --- The Hide menu item will hide the rows in the selection. The workbook still contains the data in the hidden rows but those rows are not shown.

    • Unhide --- This menu item will make hidden rows visible. The selection must span the rows which are hidden for this menu item to unhide the hidden rows.

    • Standard Height --- This menu item resizes the rows back to the default height of 12.75 points or 17 pixels (at 100 percent zoom).

  • Sheet --- The Sheet menu item opens a sub-menu with operations to change properties of the worksheet.

    • Change Name... --- This opens a dialog with the name of the worksheet. A user can use this to change the name of the current sheet.

    • Re-Order Sheets... ---- This opens a dialog with the names of all the sheets. A user can click on one of the names in the dialog and then click on the up and down arrows, as appropriate, to move the selected sheet in front or behind others. The tabs for the sheets will move at the same time. This dialog also allows the user to delete sheets.

    • Display Formulas --- This menu item acts as a toogle. By default it is unset and formulas results are displayed. If this menu item is clicked, it will display a little check mark on the left. The worksheet will show the actual fomuals for all cells with formulas instead of showing the calculated result. This is useful for quickly assessing which cells contain formulas and which contain data.

    • Hide Zeros --- This menu item acts as a toggle. Click on this menu item will cause a check mark to appear on the left. The sheet will then display all the cells which display zeros as empty cells. This is useful in sheets with many zero results, to quickly find cells with data.

    • Hide Gridlines --- This menu item acts as a toggle. If this menu item is clicked, Gnumeric will display a check mark to the left of the menu item. The lines which separate all the cells will then be hidden and Gnumeric will appear to be a blank background. This is useful to make certain data look pretty on screen.

    • Hide Column Headers --- This menu item acts as a toggle. If this menu item is clicked, Gnumeric display a check mark on the left of the menu item. Gnumeric will also hide the boxes with the alphabetical names of the columns.

    • Hide Row Header --- This menu item acts as a toggle. If this menu item is clicked, Gnumeric display a check mark on the left of the menu item. Gnumeric will also hide the boxes with the numeric names of the rows.

  • Autoformat... This menu item opens the autoformat dialog to give user access to a list of format templates. Format templates are useful for users who are often filling out tables in a particular format. The user picks an area of the worksheet into which they want to apply the template. Most templates define headers and footers so the selection area must be big enough to fit those template elements and the user's data. The template will not affect data which has already been input into a worksheet.

    The dialog has two tabs: Preview and Template Details. The details are simply information about the template. The Preview tab has three main options: a Settings menu, an Edit menu and a category chooser. The settings menu allows a user to pick what parts of the template they want to copy into the worksheet. The edit menu will be used to create new templates. Currently templates are written as text into an extensible markup language (XML) format. The catory chooser gives the user access to different groups of templates. Templates in each category are displayed in the middle area of the dialog. Users select the template they want to use by clicking on it. The currently selected template is highlighted with a red boundary which may be hard to see.

  • Workbook... This menu item opens a dialog which allows users to configure the current workbook. The dialog currently has four choices. Text autocomplete can be unset which means that Gnumeric will not compare text as it entered against text in above it in the column. Text autocomplete is useful to users entering data because if entries are repeated, Gnumeric can guess what the user intends. The user can simply type the Tab key and Gnumeric will enter the rest of the text. The use of notebook tabs can be turned off, as can the horizontal and vertical scrollbars.


Previous
The Insert Menu
ContentsNext
The Tools Menu
PreviousNext

The Tools Menu

The Tools menu is

Figure 4.10. The Tools menu.

An image of the Tools menu.

The menu choices are grouped into the following groups:

An image of the number 1 label.  The Plug-ins dialog.

This entry launches the plug-in manangement dialog. Plug-ins are programs which are separate from Gnumeric but provide useful functionality. Some of the core parts of gnumeric, such as Excel file format support, are actually plugins. This means that a user who never uses Excel files can remove this module from Gnumeric and make Gnumeric use less memory.

An image of the label number 2.  Automatic tools

These two tools allow the user to make Gnumeric automatically correct typing or automatically save workbooks at periodic intervals.

  • Auto Correct... --- The Auto Correct... menu item opens a dialog which allows the user to configure the way in which gnumeric automatically corrects text which is being entered. The dialog presents the user with three tabs. Each of these tabs allows the user to correct one type of common spelling mistake, while allowing the user to add exceptions to the rules. Gnumeric can automatically caplitalize the names of week days. Gnumeric can automatically change an entry which starts with two capital letters to only start with one and Gnumeric can change a sentence entry to start with a capital letter.

  • Auto Save --- The Auto Save menu item opens a dialog which allows the user to have Gnumeric automatically save the current workbook after a fixed interval of time. The user can also have Gnumeric ask for confirmation before saving so that the user always remains aware of the state the workbook was in when it was saved.

An image of the label number 3.  Linear Programming tools

Gnumeric can be used to solve systems of linear equations and other mathematical problems. These two dialogs enable access to these tools. A full discussion of these tools is presented in the section called “Solver”.

  • Goal Seek --- The Goal Seek menu item opens a dialog through which the user can configure Gnumeric to iteratively search for a numeric value which solves a formula. This dialog is explained in the section called “Goal Seek Tool”.

  • Solver --- The Solver menu item opens a dialog through which the user can configure Gnumeric to solve linear systems of equations. This is explained in the section called “Solver”.

An image of the label number 4.  Statistics and other Data Analsyis tools

Statistical analysis can easily be done with Gnumeric. All the statistical tools are explained in the section called “Statistical Analysis”.


Previous
The Format Menu
ContentsNext
The Data Menu
PreviousNext

The Data Menu

The Data menu is

Figure 4.11. The Data menu.

An image of the Data menu.

The menu choices are grouped into the following groups:

An image of the number 1 label.  Data Field tools.

These menu items allow the user to re-organize data fields.

  • Sort... --- The Sort... menu item opens a dialog which allows users to sort a selection according to defined criteria. By default Gnumeric sorts rows depending on the contents of the cells in a particular column of each row. The sort criteria can be extended to calculate on the basis of the cells in several columns. Gnumeric can sort a selection using any number of rules. Rules can be added using the Add button. Rules with no column entered will be ignored or the user can remove these rules with the Remove button.

    For each rule, the dialog has an entry box in which the column to be sorted must be entered. The dropdown box (the little down pointing arrow) will show a list of appropriate columns. The user can determine a sort order for the selection. The Advanced button allows the user to further characterize the sort criteria.

    If the first row of the selection is a header, Gnumeric can be told not to shuffle this row during the sort. Gnumeric can also sort columns based on the contents of cells in specified rows, instead of shuffling rows on the basis of columns, if the user toggles the Sort to act right-left instead of top-down.

  • Filter --- The Filter menu item opens a sub-menu which currently only has the Advanced Filter entry. Filters are explained in the section called “Filtering Data”.

  • Validate... --- The Validate... menu item opens the cell format dialog to the validation tab. Validation is a means of constraining the contents of a cell either to have a certain value or to fall within a certain range.

  • Consolidate... --- The Consolidate... menu item opens a dialog box through which a user can create derived information based on data in other worksheets.

An image of the label number 2.  Group and Outline.

The sub-menu options of the Group and Outline menu are useful for creating data hiearchies within a worksheet.


Previous
The Tools Menu
ContentsNext
The Help Menu
PreviousNext

The Help Menu

The Help menu is quite simple.

Figure 4.12. The Help menu.

An image of the Help menu.

The Help menu connects users to this manual, to the list of functions available for use in Gnumeric and to the list of people who created this wonderful application.

Help

This menu contains:

  • Gnumeric Manual —Clicking on this menu entry should launch the local help system and display this manual.

  • Gnumeric Function Reference —View the Gnumeric function reference, a list and description of the functions available in Gnumeric.

  • About —Shows basic information about Gnumeric, such as the authors' names and the application version number.


Previous
The Data Menu
ContentsNext
Context Menus in Gnumeric
PreviousNext

Context Menus in Gnumeric

Context menus are menus which open up under the mouse pointer and are therefore detached from the format graphical structure of the applicaton. These menus provide an extra and convenient way to access Gnumeric commands. All of the commands in context menus are available through the regular menu system. Context menus provide different commands depending on the position of the pointer.

To activate a context menu, a user simply positions the pointer over the appropriate area and clicks one of the buttons on their mouse. Since this button is configurable and users have mice with different buttons, it may be a different button on any given machine or may even require the combination of a keyboard key and a mouse buttons. The user will have to find how to do this themselves.

Currently Gnumeric provides five different context menus. The context menu that is called in the central grid area is discussed next in the section called “The Context Menu for the Cell Grid Area”. The Context menu that appears when the pointer is over the row headers or column headers is presented in the section called “The Context Menu for Column and Row Headers”. Another context menu relates to the worksheet tabs and is explained in the section called “The Context Menu menu for Worksheet Tabs”. Yet another context menu applies to embbeded objects or shaped components such as a plot. These are shown in the section called “The Context Menu for Embedded Objects and Components”. The final context menu allows the configuration of the toolbars. This menu is presented in the section called “The Context Menu for Toolbars”.

The Context Menu for the Cell Grid Area

The context menu in the cell grid area apprears when the pointer is over the cell grid area. This menu applies to the cells that have been selected, not necessarily the cell underneath the mouse pointer.

Figure 4.13. The Context Menu for the Cell Grid Area.

An image of the context menu in the cell grid area.

The grid context menu merely provides an extra way to access Gnumeric commands. The Cut, Copy, Paste, Paste Special..., Delete..., and Clear Contents... commands are taken from the Edit menu and are explained in the section called “The Edit Menu”. The Insert... menu item is explained in the section on the Insert menu in the section called “The Insert Menu”. The Format Cells... is explained in the manual section on the Format menu in the section called “The Format Menu”.

The Context Menu for Column and Row Headers

The Context Menu for Column and Row Headers

Figure 4.14. The Context Menu of a Row Header

An image of the context menu on a row header.

The context menu which relates to column or row headers is similar to the context menu for the grid area. Both insert and delte operations are modified to operate explicitly on rows or on columns. An option is added which changes the height of rows or the width of columns. This context menu also provides a way to hide rows or columns and a way to reveal missing columns or rows.

The Context Menu menu for Worksheet Tabs

The Context Menu menu for Worksheet Tabs.

Figure 4.15. The Context Menu.

An image of the context menu for worksheet tabs.

The context menu for tabs provides the same functions as are provided in the Sheet menu item in the Edit menu. These options are explained at the bottom of the section called “The Edit Menu”.

The Context Menu for Embedded Objects and Components

The Context Menu for Embedded Objects and Components.

Figure 4.16. The Context Menu

An image of the context menu on embedded objects.

Since this menu gives access to functionality which is not part of Gnumeric, the menu entries will be different for each kind of object. This menu is accessible when first selecting on the embedded object or if the user clicks on the very border of the inserted object. All objects will provide a method to delete the object which will remove the object. Note that this operation will mostly not register into Gnumeric's history and therefore cannot easily be reversed.

The Context Menu for Toolbars

The Context Menu for Toolbars

Figure 4.17. The Context Menu.

An image of the context menu on the toolbars.

The context menu for toolbars allows the user to configure toolbars. Each toolbar entry can have text associated with it or simply be an icon. The text only does not currently work in Gnumeric. The tooltips which are displayed by default can be turned off for this toolbar. The toolbar itself can be removed to save space. Finally the customize dialog can be launched which allows the user to configure these options for all the toolbars at once.


Previous
The Help Menu
ContentsNext
The Gnumeric Toolbars
PreviousNext

The Gnumeric Toolbars

The toolbars contain buttons and other elements which can be used to perform quickly some the more common operations. Each button has an icon intended to provide a mneumonic reminder of the operation performed by the button. The toolbar elements are intended to provide fast access to the commonly used tools. Almost all of these functions are also available through the menu system. The specific actions required to use each button vary.

Gnumeric has three toolbars, the standard toolbar, the format toolbar and the object toolbar. The three toolbars are shown in Figure 4.18, “The Three Gnumeric Toolbars”.

Figure 4.18. The Three Gnumeric Toolbars

These toolbars will be discussed separately in the subsequent sections of this manual. User interaction with each toolbar happens in essentially the same way. Similarly, the toobars can be configured in the same way. The next section explains the standard behavior of Gnumeric toolbars.

General Toolbar Behavior

In the same way that menus can be moved around, as was explained the section called “The Menubar”, toolbars can be moved around the Gnumeric window by dragging the little tag on the leftmost portion of the toolbar.

If the Gnumeric window is too small to fit all of the toolbar buttons, gnumeric may display a little right pointing black arrow to indicate that there are more options. If the user clicks on this arrow, a window will open with the remaining buttons.

Certain toolbar options, such as the zoom box, are combinations of a button or text entry area and a downward pointing arrow. If the user clicks on the arrow, a list of avaliable options appears. It is also posible to "tear off" these options into a separate window in the same way as was explained for menus in the section called “General Menu Behavior”.

The toolbars can be configured by a context-menu which opens when the user clicks with a particular mouse button on an empty part of the toolbars or on the toolbar handle. This menu is explained in the section called “The Context Menu for Toolbars”.


Previous
Context Menus in Gnumeric
ContentsNext
The Standard Toolbar
PreviousNext

The Standard Toolbar

The standard toolbar is shown in Figure 4.19, “The Standard Toolbar.”.

Figure 4.19. The Standard Toolbar.

The Standard Toolbar gives the user access to file operations, printing, movement of data blocks, the undo system, and to some of the powerful tools like the function creator and the graphing system.

An image of the standard toolbar's "New File"
              button.  New File.

Create a new file.

An image of the standard toolbar's "Open File"
              button.  Open

Open an existing file.

An image of the standard toolbar's "Save File"
              button.  Save

Save the current worksheet to disk.

An image of the standard toolbar's "Print"
              button.  Print

Print the current worksheet or workbook to a file or a printer.

An image of the standard toolbar's "Print Preview"
              button.  Print Preview

Display a print preview of the current worksheet.

An image of the standard toolbar's "Cut"
              button.  Cut

Copy the cells in the current selection to the clipboard buffer and mark them to be deleted from the current position. The cells will only be removed if they are pasted into a new position.

An image of the standard toolbar's "Copy"
              button.  Copy

Copy the cells in the current selection to the clipboard buffer.

An image of the standard toolbar's "Paste"
              button.  Paste

Paste the contents of the clipboard buffer into the active cell.

An image of the standard toolbar's "Undo"
              button.  Undo

Undoes the last operation undertaken.

An image of the standard toolbar's "Redo"
              button.  Redo

This is the reverse of the undo operation, restoring its orginal state.

An image of the standard toolbar's "Sum"
              button.  Sum into the current cell

Starts a simple sum formula in the selected cell with Gnumeric simply waiting for a selection to be made to complete the sum. The user selects the destination cell, pushes this button, enters the range to be summed and pushes the confirm button (green arrow) in the data entry area or types the Return key.

An image of the standard toolbar's "Function"
              button.  The function druid

This button will start a formula in the current cell using the function druid.

An image of the standard toolbar's "Sort A to Z"
              button.  Sort Ascending

Sorts the selected region in ascending order based on the first column selected.

An image of the standard toolbar's "Sort Z to A"
              button.  Sort Descending

Sorts the selected region in descending order based on the first column selected.

An image of the standard toolbar's "Graph"
              button.  Graph

This button calls the graph druid to create a graph.

An image of the standard toolbar's "Insert Object"
              button.  Insert Object

This button will insert a component object into the current worksheet. Components are the way that the GNOME project has chosen to enable certain programs to use others within themselves. Gnumeric is able to use the Guppi plotting program and the Dia diagramming program in this way.

An image of the standard toolbar's "Insert Component"
              button.  Insert Shaped Component

This button allows user to insert a component into Gnumeric that is not a simple rectangle but may have an arbitrary shape. This functionality is currently not used but provided for future needs.

An image of the standard toolbar's "Zoom"
              box.  Zoom

The zoom button allows the users to tradeoff the extent of the worksheet which is visible against the size of the visible text and cells.


Previous
The Gnumeric Toolbars
ContentsNext
The Format Toolbar
PreviousNext

The Format Toolbar

The Format Toolbar ...

Figure 4.20. The Format Toolbar

The Format Toolbar.

An image of the format toolbar's "Font"
              selection box.  Font Chooser.

The user can change the font of a selection either by typing the name of a new font in the text area of this box or by clicking on the little arrow to the right of the text area. This will cause a menu to appear from which a font can be chosen.

An image of the format toolbar's "Font Size"
              selection box.  Font size

The user can change the font size of a selection by typing the number of a different font size or by clicking on the little arrow to the right of the entry box and selecting the perferred size.

An image of the format toolbar's "Bold"
              button.  Bold

Change the style of the current cell to be bold, or un bold it if it is already bold.

An image of the format toolbar's "Italic"
              button.  Italic

Change the style of the current cell to be italicized.

An image of the format toolbar's "Underline"
              button.  Underline

Change the style of the current cell to be underlined.

An image of the format toolbar's "Left Justify"
              button.  Left justify..

Justify the contents of the cell to the left of the cell.

An image of the format toolbar's "Center"
              button.  Center

Center the content of the cells.

An image of the format toolbar's "Right Justify"
              button.  Right Justify

Justify the content of the cells to the right side of the cells

An image of the format toolbar's "Center across Selection"
              button.  Center across the selection

Center the content of the cells on the selected cells.

An image of the format toolbar's "Merge Cells"
              button.  Merge Cells

Merge the selected cells into a single cell.

An image of the format toolbar's "Split Merged Cells"
              button.  Split Merged Cells

Split previously merged cells into separate cells.

An image of the format toolbar's "Money"
              button.  Money

Sets the format of the selected cells to be monetary.

An image of the format toolbar's "Percentage"
              button.  Percentage

Sets the format of the selected cells to be a percentage.

An image of the format toolbar's "Thousands Separator"
              button.  Thousands separator

Sets the format of the selected cells to use thousands separator.

An image of the format toolbar's "Increase Precision"
              button.  Increase the displayed precision.

Increases the number of decimals shown in the currently selected cell.

An image of the format toolbar's "Decrease Precision"
              button.  Decrease the displayed precision.

Decreases the number of decimals in the currently selected cell.

An image of the format toolbar's "Decrease Indentation"
              button.  Decrease the displayed indentation.

This button decreases the indentation of selected elements.

An image of the format toolbar's "Increase Indentation"
              button.  Increase the displayed indentation.

This button increases the indentation of selected elements.

An image of the format toolbar's "Borders"
              button and drop down palette.  Change the display borders.

This button and drop down menu can be used to set the borders of all the cells in the selection.

An image of the format toolbar's "Set background colour"
              button and drop down palette.  Set the Background Colour.

This button and drop down menu can be used to set the back ground colour.

An image of the format toolbar's "Set text colour"
              button and drop down palette.  Set the Text Colour

This can be used to change the colour of the text.


Previous
The Standard Toolbar
ContentsNext
The Object Toolbar
PreviousNext

The Object Toolbar

Figure 4.21. The Object Toolbar

The Object Toolbar.

An image of the object toolbar's "Insert a Label"
              button.  Insert a label.

This button allows the user to insert a text label into a worksheet.

An image of the object toolbar's "Insert a Frame"
              button.  Insert a Frame.

This button allows a user to insert a frame into a worksheet.

An image of the object toolbar's "Insert a Checkbox"
              button.  Insert a Checkbox.

This button allows a user to insert a check box.

An image of the object toolbar's "Insert a List"
              button.  Insert a List.

This button allows a user to insert a list.

An image of the object toolbar's "Insert a Combobox"
              button.  Insert a Combo Box

This allows a user to insert a Combo Box.

An image of the object toolbar's "Insert a Line"
              button.  Line

Draw a line on the worksheet.

An image of the object toolbar's "Insert an Arrow"
              button.  Arrow

Draw a line with a arrow at one end. A pointer.

An image of the object toolbar's "Insert a Box"
              button.  Box

Draw a box onto the worksheet.

An image of the object toolbar's "Insert an Ellipse"
              button.  Ellipse

Draw an ellipse or a circle on the worksheet.


Previous
The Format Toolbar
ContentsNext
The Elements of the Gnumeric Worksheet
PreviousNext

The Elements of the Gnumeric Worksheet

The Gnumeric worksheet is made up of three elements which are presented below. the section called “Data Entry Area” explains the use of the Data entry area, the area immediately above the worksheet area. the section called “The Cell Grid” explains the cell grid which is the area in the middle of the window and the area users spend the most time editing. Finally, the section called “The Information Area” explains the information area at the bottom of the worksheet where Gnumeric displays information about its current work.


Previous
The Object Toolbar
ContentsNext
Data Entry Area
PreviousNext

Data Entry Area

Immediately above the grid of cells is the data entry area as shown in Figure 4.22, “The Data Entry area.”.

Figure 4.22. The Data Entry area.

An image of the data entry area.

This is a small area, which contains a current cell indicator, a cancel button, a confirm button, an entry button, and an entry area for detailed editing of the cell contents. These elements are explained individually below.

Current Cell Indicator

On the far left of the Data Entry area is the current cell indicator area. This area is shown in Figure 4.23, “The Current Cell Indicator.”

Figure 4.23. The Current Cell Indicator.

An image of the current cell indicator.

The cell indicator will show the address for the cell at the top left of the selected region. This address is listed in the standard column:row notation. The alphabetic part indicates the the column of this top leftmost cell and the numeric part indicates the row of this top left cell. For instance, the cell which is over three columns and down two rows is designated:

C2

This designation matches the column and row headers for this cell.

While a region is being selected, the current cell indicator will change to show the size of the region which is being selected. This information is presented in a row number by column number format. For instance, this designation:

15R x 6C

would indicate a selection area 15 rows high by 6 columns wide. Once the mouse is released at the end of the selection, the current cell indicator goes back to giving the address of the single top leftmost cell.

The Cancel Button

The Cancel button An image of the cancel button.  can be used to cancel the current edit and to restore the cell contents to the previous state. If a user decides in the middle of an edit that the data being entered into a cell is not what they want, the user can push this cancel button to cancel the current data and return the cell to the state it was at before.

The most common use of this button is when overwriting the contents of a cell with new data. If the user decided to revert the change before confirming it, the cancel button is the answer. Note that this button works just like typing the escape key on the keyboard.

The Confirm Button

The confirm button An image of the enter button.  . can be used to finish the edit of a cell and enter the edit into the workbook. Note that this button works in the same way as the enter key.

The Equals Button

The equals button An image of the equals button.  can be used to start a formula in the currently selected cell. If a user wanted to make cell D10 equal to cell B4, the user could simply click on cell D10, click this equals button, click on cell B4 and type the enter key. Note that this button works the same way as the equals key.


Previous
The Elements of the Gnumeric Worksheet
ContentsNext
The Cell Grid
PreviousNext

The Cell Grid

Most of the work done on a spreadsheet is done to the main Cell area, the large grid like part of the worksheet. This is where all the formulas and data are entered, and is the center of activity for the spreadsheet.

Figure 4.24. The Cell Grid area, with cells of different sizes.

An image of the cell grid area.

Figure 4.24, “The Cell Grid area, with cells of different sizes.” shows the the cell grid area, the column and row headers on the top and left, the scrollbars on the right and bottom and the tab list at the very bottom.

The figure has a few and shows that cell B3 as being selected. In this figure, the columns and rows have been resized and therefore look uneven.

Each cell in this area is delimited by a light grey line by default. The current selection is indicated by a rectangular box with a little box on the lower right, this case cell J12. The view in this figure shows the middle portion of a worksheet which is evident in two ways. Firstly, the column and row headers do not start at column A and row 1. Secondly, the scroll thumbs are not at the top and left. The thumbs are the boxes within the scroll bars that are used to scroll. Note also that cell D19 has a comment within it which is shown by the little red triangle at the top right corner.

The size of a cell is determined by the width of the column and height of the row that the cell is in. The columns and rows can be resized by acting on the header relevant to the cell. The user must move the mouse pointer to the edge of the header which is either to the right or below the cell. With the mouse pointer in this position, the pointer will change to a set of opposite pointing arrows. The user must then drag this edge away from the top left corner. This takes a little practice.

The cell area is the core of Gnumeric. Therefore the maual explains the use of cells in much greater detail in a separate section. Interested users should read Chapter 5, Working with Data.

The Column and Row Headers

The sheet is bordered by column headers on the top and row headers to the left. Columns are labeled alphabetically running horizontally across the top of the sheet as shown in Figure 4.25, “The column labels at the top of the worksheet.”.

Figure 4.25. The column labels at the top of the worksheet.

An image of the column labels.

Rows are labeled along the left side of the worksheet. Each label is a differrent integer increasing downward. This is shown in Figure 4.26, “The row labels at the left side of the worksheet.”.

Figure 4.26. The row labels at the left side of the worksheet.

An image of the row labels.

The Scrollbars

The cell grid area's scrollbars work like other scrollbars. In this case they let the user work on a worksheet which is much bigger than what could be shown at any given moment.

The Tabbed Sheet Indicator

At the bottom of Figure 4.24, “The Cell Grid area, with cells of different sizes.”, Gnumeric has a tabbed sheet indicator. This is the boxes with the labels "Guppies", "Turtles", "Mermaids", "seahorses" and so on. In workbooks where there are more than one sheet, extra tabs are used to indicate how many sheets are there, and also allows the user to move to another sheet by clicking the proper tab. Each tab is a link to a separte worksheet within Gnumeric. In this figure, the "Turtles" tab has been selected. Gnumeric shows this by making the "Turtles" since the tab is a little bigger and making it overlap the two neighbouring tabs.

On the far right, the two arrows indicate that there are more sheets in the workbook and more tabs for those sheets. Unfortunately, there is not enough space to show them all so Gnumeric displays these arrows. If all the sheets are visible, these arrows will not be displayed. These arrows can be used to scroll the tabs and bring tabs that were hidden into view. This may be a little difficult to understand and work with but becomes easier quickly.


Previous
Data Entry Area
ContentsNext
The Information Area
PreviousNext

The Information Area

The section at the very bottom of the worksheet view is the information area as is shown in Figure 4.27, “The Information Display Area.”.

Figure 4.27. The Information Display Area.

An image of the information display area.

The information area displays information depending on what is happening in Gnumeric.

The Menu Hint Area

The leftmost portion of the information display area, the part which reads: "Sort the selected cells" is a hint explaining what a menu does. In this case, the Data menu was opened and the pointer is hovering above the "sort" menu entry. Gnumeric is responding by giving a quick explanation of what that menu entry does.

The File Status Indicator

Whenever Gnumeric opens or saves a file, the file staus indicator appears with a progress bar which grows as Gnumeric progresses. In Figure 4.27, “The Information Display Area.”, Gnumeric was just over halfway done opening a file.

The Running Calculation Area

In the bottom right hand corner, is an info area that shows some constantly calculated values. The default set is to show the Sum of all the currently selected cells.

There is a right click option that includes a few more options. This can include Sum, Min, Max, Average, Count.

Figure 4.28. The running calculation area.

An image of the running calculation area.

Previous
The Cell Grid
ContentsNext
The Mouse Pointers used by Gnumeric
PreviousNext

The Mouse Pointers used by Gnumeric

The shape of the mouse pointer (the pointer which is moveable by the mouse) changes in different contexts. This indicates that different functionality is available and that mouse clicks will have different results. The different mouse pointers and the actions they indicate are discussed below.

An arrow pointing to the upper left.  The left pointing arrow pointer:

The left hand pointing arrow pointer is the standard pointer used for most of the interaction with Gnumeric. This pointer is used to select menus and menu entries, toolbar buttons, columns or rows, the scrolling `thumbs' and various other elements.

A wide white cross with black shading.  The cell selection pointer:

This pointer appears over the cell grid area and can be used to select cells for editing.

A vertical bar limited at each end by short
                  horizontal stubs.  The text editing pointer:

The text editing pointer is used to indicate the location in the text where new edits will appear. This cusor can be used to change the scale of the zoom, to change the name and size of the font currently used or to edit the cell contents in the cell entry area (the white area to the right of the equals (=) sign.

A thin cross pointer  The crosshair pointer:

The crosshair pointer can be used to change the cell selection area. The pointer appears when the mouse pointer is placed over the handle box, the black square at the lower right hand side of the selection. When the crosshair pointer appear, the selection can be altered by clicking the left-hand mouse button and dragging the handle to a new position. The cross hair pointer can also be used to insert a graphic object, by clicking with the left hand mouse button to place one coner and releasing the button to place another of the corners.

A double ended vertical arrow.  A double ended horizontal arrow.  The expansion pointers:

These pointers can be used to change the height of rows or the width of columns. These pointers appear in certain dialog windows to resize the different parts of the dialog. The pointers are also used to resize graphical objects as is explained below.

A left pointing hand icon.  The sheet selection and hyperlink pointer:

This pointer appears above the sheet tabs and can be used, by left clicking, to change the currently selected sheet or, by right clicking, to obtain the sheet dialog box. This pointer also appears above cells which are hyperlinks. Left clicking on a hyperlink may change the view to a new location, or may open an external file.

An arrow pointing to the upper right.  The right pointing arrow pointer:

The right hand pointing arrow pointer is used to select graphical objects (such as drawing objects (e.g. arrows, ellipses) and graph objects (e.g. charts)).

A four way arrow.  The movement pointer:

The movement pointer can be used to move graphical objects around a worksheet without resizing the object.

A double ended vertical arrow.  A double ended horizontal arrow.  A diagonal double arrow with center box.  The graphical object re-sizing pointers:

These pointers allow the reising of graphical objects. If the mouse pointer is placed over one of the handle boxes of the graphical object, the handle box will turn green and the pointer will change to one of these forms. When these pointers appear, click dragging with the left mouse button will resize the graphical object either scaling or stretching the object.

Several pointers used to resize dialogs and
                  windows.  The window resizing pointers:

These pointers are used to change the size of Gnumeric windows and dialogs.


Previous
The Information Area
ContentsNext
Working with Data
PreviousNext

Chapter 5. Working with Data

This chapter explains the core functionality of Gnumeric including the basic types of data manipulated by Gnumeric, the methods of entering, manipulating and formating data, and the basic tools for analysis of these data. More advanced analysis is described in Chapter 6, Advanced Analysis.

Table of Contents

Data in Gnumeric Cells
The Types of Cell Elements
Text Data Elements
Number Data Elements
Boolean Data Elements
Formula Elements
Error Elements
Data Entry.
Data Entry by Editing Cells.
Entering Text Data
Entering Number Data
Entering Boolean Data
Entering Formulas
Entering Errors
Advanced Data Entry.
Entering Large Quantities of Data
Entering a Regular Sequence
Automatically Correcting Simple Mistakes
Using a Format Template
Generating Random Number Sequences
Obtaining Data from External Sources
Obtaining Data from External Files
Obtaining Data by Cut and Paste
Getting Data from a Database
Getting Data from an Internet Data Stream
Selecting Cells and Cell Ranges
Simple Selections
Selecting Multiple Cells
Selections Using the Keyboard
Moving and Copying Data
Simple Copy and Move
Cut, Copy and Paste
Paste Special
Cut and Paste Between Gnumeric and Other Applications
Deleting Data
Inserting New Data Cells
Formating Cells
Number Formatting Tab
Alignment, Font, Border, and Background Tabs
Protection and Validation Tabs
Modifying Data
Searching for Data
Searching and Replacing Data
Sorting Data
Shuffling Data
Filtering Data
Generating Data
Creating a Tabulation of Dependencies
Creating Multiple Repeats of Standard Data
Consolidating a Result from Several Source Regions
Adding a Comment to a Cell
Adding a Hyperlink to a Cell

Previous
The Mouse Pointers used by Gnumeric
ContentsNext
Data in Gnumeric Cells
PreviousNext

Data in Gnumeric Cells

The purpose of a spreadsheet is to manipulate data and perform calculations on those data. In order to understand how to use Gnumeric, it is necessary to understand what types of data are available and how these types can be manipulated.

Because all of the data which are entered into a Gnumeric workbook can eventually be stored in a file, the file contents define the kinds of data which can be entered into the spreadsheet. A file contains metadata about the file contents, global data for the workbook and the actual data contents of the workbook. The metadata include a brief document summary describing the file contents and include the settings applicable to the data contents, such as the settings for the printing of each sheet and any settings for automatically saving the file. The global data for the workbook include any names which are defined by the user and attributes, such as the protected status of the workbook and sheets. The actual data are contained in the worksheets and include the contents of the cells, both data and formatting, and other objects such as drawing and charts.

This chapter describes the information which can be stored in spreasheet cells. This includes the five types of data which cells can contain and the formatting which can be applied to each cell. The chapter first describes the five data types available, then describes the formatting which can be performed on each cell, then explains how data can be inserted into a spreadsheet and finally describes how to copy and move data around a worksheet along with the transformations which can be performed as the data are moved. This chapter does not describe other types of data which can be stored in a spreadsheet such as drawing elements and graphs used to chart data. These are explained in latter chapters.


Previous
Working with Data
ContentsNext
The Types of Cell Elements
PreviousNext

The Types of Cell Elements

Each cell in a Gnumeric worksheet can contain only a single data element. These elements will have one of five basic types: text, numbers, booleans, formulas, or errors. During data entry, Gnumeric assigns a default data type to the cell based on an analysis of the cell contents. This assignment can be changed later if Gnumeric makes the wrong assignment. For information on how to change the data type of a cell, see the section called “Formating Cells”.

The five basic types of data which can be stored in a spreadsheet cell are:

Text

A text element can contain a series of letters, numbers or other contents. For example, the first cell in a worksheet might contain the characters —This worksheet describes the company's income — which Gnumeric would interpret to be text. In order to distinguish text elements from number or formula elements, the text element may start with a single quote. For instance, if a cell contained only the three digits 345, Gnumeric would consider that to be the number three hundred and forty five. If this cell is intended to be a string, Gnumeric will store the cell as '345. The newline character cannot be entered directly but must be entered as Alt+Enter. For more information on entering and formating text elements, see the section called “Text Data Elements”.

Numbers

A number element can contain a series of digits (425) but may include specific text and formatting characters to indicate negative numbers (-345), decimal separator (34.056), thousand separators (12,342), currency ($23), dates (21-10-1998), times (10:23) or scientific notation (2.3e12). Dates may include the names of months or their abbreviation. The currency, decimal separator and thousands separator symbols vary depending on the locale (the language and other location specific behaviour) to which Gnumeric has been set. See the section called “Configuring the Language and Local Settings of Gnumeric” to understand how to change the locale. If you want a number to be displayed as a plain string without any number formatting, you can put a single quote (') before it. For more information on entering and formating, numeric elements see the section called “Number Data Elements”.

Boolean

A boolean element can contain one of two values: TRUE and FALSE. These are useful as inputs or outputs from formulas.

Formulas

A formula is an instruction to Gnumeric which describes a calculation which should be performed automatically. These formulas can contain standard arithmetic elements but can also contain references to other cells. Calculations which depend on other cells are usually recalculated when the values of another cell changes. Formulas always begin with a special character — the equals sign (=). The comercial at symbol (@) can be used instead of the equals sign during data entry but Gnumeric will convert this to an equals sign. Alternatively, an entry which describes a calculation and which starts with either the plus (+) or minus symbol (-) will be converted to a formula starting with an equals sign. For a more complete explanation of formulas, see the section called “Formula Elements”.

A cell reference is the part of a formula which refers to another cell. For example, in the formula to add two cells =(A4+A1), both A4 and A1 are cell references. These references can be quite complex referring to cells in different worksheets or even in different files. See the section called “Cell Referencing” for a complete explanation of references.

Error

An error element describes the failure to calculate the result of a formula. These values are rarely entered directly by a user but usually are the display given when a formula cannot be correctly calculated. See the section called “Error Elements” for a complete list of error values and their explanation.

Note

A cell may display a series of hash marks (######). This indicates that the result is too wide to display in the cell given the current font setting and the current width. The value in the cell can be seen in two ways. If the cell is selected, the value will appear in the data entry area (to the right of the equals button directly above the cell gridd). Alternatively, the cell can be widened until the data become visible.

Text Data Elements

Text elements consist of an arbitrary sequence of characters entered into a cell. Text elements can contain any sequence of characters but, in order to distinguish text from other data types, text elements may have to start with an apostrophe symbol ('). These are the simplest elements to enter into spreadsheet cells.

An example of a spreadsheet cell grid with cells containing text is given in Figure 5.1, “A Text Data Element in a Cell.”.

Figure 5.1. A Text Data Element in a Cell.

Valid text entries include simple words, whole sentences and even paragraphs.

Note

To include a newline in a cell, a special key combination is required. An newline symbol can be inserted with the key combination of Alt+Enter.

Number Data Elements

Number data elements include a variety of data all of which are stored and manipulated by Gnumeric as numbers. This includes integers, decimal fractions, general fractions, numbers in scientific notation, dates, times, and currency values.

Data are recognized as numbers when they are entered, dependant on the format of the sequence of characters entered. Gnumeric attempts to intelligently guess the subtype of the data and match the data to an existing format for numbered data. If it matches a data format, Gnumeric will automatically assign the datum to a data type and associate an appropriate display format with the cell.

The format recognition of Gnumeric includes a wide variety of data formats. Some examples are presented in Table 5.1, “Examples of Date Formats”.

Because Gnumeric automatically guesses the data type of a number being entered into a cell, this process may have to be over-ridden for ceratain types of data. For example, postal codes in the United States consist of a sequence of numbers which Gnumeric interprest as an integer. However, U.S. postal codes can start with a leading zero which Gnumeric discards.

Boolean Data Elements

Cells can contain boolean data elements. These elements arise from Boolean logic which is a branch of mathematics. These elements are useful for mainpulation of formulas.

Boolean values can be either "TRUE" or "FALSE". If these strings are entered into a cell, Gnumeric will recognize these as boolean values. These values can then be used in formulas. Certain formulas will also return boolean values.

Formula Elements

Formulas are the key to making a powerful spreadsheet. A formula instructs Gnumeric to perform calculations and dsplay the results. These calculations are defined as a formula data elements. The power of these formulas arises because these formulas can include the contents of other cells and the results of the formulas are updated automatically when the contents of any cell included in the formula change. The contents of other cells are included using "cell references" which are explained below.

Any formula entered into a cell must follow a specific syntax so that Gnumeric can interpret the formula correctly. This syntax closely follows mathematical notation but also includes spreadsheet formulas, object names and cell references.

Syntax

Formulas are distinguished from regular data by starting with an equals sign (=) as the first character. Everything following this equals sign is evaluated as a formula.

Alternate Beginnings for Formulas

To accomodate those more familiar with Lotus spreadsheets, Gnumeric recognizes the comercial at symbol (@) as the beginning of a formula and substitutes an equals sign. The plus and minus characters (+ and -) may also start formulas that involve calculation, but when used in front of a single number only indicate the sign of the number.

The simplest formulas just use the standard math operator and symbols. Addition, subtraction, multiplication, and division are represented by +, -, *, and /, just as you would expect. +,- can be placed in front of numbers to indicate sign, as well.

Example 5.1. Examples of standard operators

	  =5+5            returns 10.
	
	  =5-4            returns 1.
	
	  =-5             returns -5.
	
	  =5*5            returns 25.
	
	  =(5*5)+11       returns 36.
	
  	  =(5*5)+(49/7)    returns 32.
        

Formulas can result in error values in several instances. If a formula is entered incorrectly, Gnumeric will display a warning and allow either the formula to be corrected or will save the formula as text for editing later. If a syntactically correct formula results in a non-sensical calculation (for instance, a division by zero), then an error value will be displayed indicating the error.

Using Functions

Formulas can also contain functions which denote the use of standard mathematic, business, statistical, and scientific calculations. These functions take the place of any data element in a formula and can therefore be combined with the standard arithmetic opearators described above.

These functions have the form:

Example 5.2. Basic Function syntax

	  FUNCTIONNAME(ARGUMENTS)
        

where FUNCTIONNAME indicates the name of a function and ARGUMENTS indicates one or more arguments to the function. The function arguments are separated by commas (,)

Tip

While the documentation generally refers to functions and to cells in capital letters, their use is not actually case sensitive.

Some examples of the use of functions are:

Example 5.3. Some examples of function syntax

	    =SUM(A1,A2,A4,B5)
	    
            =AVERAGE(A1:A16)
	    
            =EXP(1)
	    
	    =PI()
	    
            =3+4*MIN(A1,A2,B6)
	  

The arguments of the functions vary in number from none, as in the PI() function, to an unlimited number, as in the SUM() function, depending on the type of function.

Cell Referencing

Formulas can include the displayed data from other cells. These contents are described as `cell references' which are names indicating that the contents of other cells should be used in the calculation.

Each cell in a spreadsheet is named by its column and row labels. The column labels are letters and the row labels are numbers. The first cell, therefore, is called A1. One column over and two rows down from cell A1 is the cell B3. The right most and bottom most cell is cell IV65536 which is the cell in column IV and in row 65536.

The value of a cell can be used in a formula simply by entering its name where a number value would otherwise occur. For example, to have the data in cell B1 appear in another cell, enter =B1 into that cell. Other more complex examples include:

Example 5.4. Some examples of simple cell reference syntax

          =A1+EXP(B1)-(C3/C4)
      
          =COS(A2)*SIN(A2)
      
        

Absolute cell referencing

Cells can be referenced in the default way (relative referencing), or by using absolute referening. Absolute referencing means that when the cell is copied, the cell reference does not change. Normally, autofilling a cell range or moving cell will change its cell reference to so that it maintains a relation to the original cell. Absolute referencing prevents these changes.

When Does Relative Referencing Make a Difference?

The difference between absolute and relative cell references only matters if you are copying or moving cells that contain cell references. For cells that are going to remain in place, both the relative and absolute references have the same result.

Example 5.5. Relative References

For example, if =A1 is the formula entered into cell B2, cell B2 will displat the data in cell A1, which is one row up and one column left. Then, if you copy the contents of B2 to cell F6, cell F6 will contain the value from E5, which is also one row up and one column left.

For the copied cell to still refer to A1, specify absolute references using the $ character: $A$1 refers to cell A1, no matter where it is copied.

The format for absolute cell refencing is to use a '$' in front of the cell coordinate that the you want to stay constant. The column, row, sheet, or any combination of these can be held constant.

Example 5.6. Absolute cell referencing examples

What happens when a given formula is entered into cell B2, then copied to other cells?

=A1

=A1 is a normal, or relative, cell reference function. When =A1 is entered into cell B2, it refers to the value of data one cell up and one cell left from the cell it is in. Therefore the value displayed in cell C2 will be the value of data in cell B1. Copied to cell R19, the formula will display the data in cell Q18.

=$A1

In this case, the column value is absolute, but the row value is relative. Therefore, if =$A1 is entered into cell B2, the formula refers to the data in column A that is one row up from the current location. Copied to cell C2, the formula will refer to the data in cell A1. Copied to cell R19, it will refer to the data in A18.

=A$1

This formula uses a relative column value and an absolute row value. In cell B2, it refers to cell A1 as the data in the cell one column left and in row 1. Copied to cell C3, the formula will display the data in cell B1.

=$A$1

No matter where this formula is copied, it will always refer to the data in cell A1.

Referencing multiple cells

Many functions can take multiple cells as arguments. This can either be a comma separated list, an array, or any combination thereof.

Multiple individual cells

A comma separated list of cell references can be used to indicate cells that are discontinuous.

Example 5.7. Some examples of function syntax

	    =SUM(A1,B2,C4)
	  
	    =MIN(A1,B2, C4,C5,D6)
	  
	  
An image of a worksheet with a function.
Referencing a continuous region of cells

For functions that take more than one argument, it is often easier to reference the cells as a group. This can include cells in sets horizontally, vertically, or in arrays.

The ':' operator is used to indicate a range of cells. The basic syntax is upper left corner:bottom right corner.

Example 5.8. Referencing blocks of cells

	    =SUM(A1:E1)
	  
	    =AVERAGE(B4:E7)
	  
	    =MIN(A1:A5)            
	  
An image of a worksheet with a function
              referencing a block of cells.
Referencing non-continuous regions

For referencing cells that are in non-continuous regions, you can use any combination of the above methods to get the needed cells.

Example 5.9. Referencing blocks of cells

	    =SUM(A1:E1, B19, L14:L17)
	  
	    =AVERAGE(A1,A3, A5:C5)
	  
	  
Referencing cells on other sheets

It is possible to reference cells which are not part of the current sheet. This is done using the SHEETNAME!CELLLIST syntax, where SHEETNAME is an identifier (usually a sheet name) and CELLLIST is a regular cell reference as described in the previous sections.

Note that if SHEETNAME contains spaces, you need to quote the whole name to allow Gnumeric to group the separate words in SHEETNAME as single name. For example, you should use 'Name With Spaces'.

Example 5.10. Referencing values in other sheets

	  ='Sheet 0'!A1+'Sheet 3'!A5

	  =SUM('Sheet 1'!A1:'Sheet 1'!A5)
        

Names

Names are labels which have a meaning defined by the user. Names can be defined to apply to a whole workbook or to a particular sheet in a workbook. Names can refer to a numeric value, to a particular range of cells, or to part of a formula. The name can be used wherever its meaning could otherwise be used.

Example 5.11. Examples of name usage

If myCellRange is defined as '$A$1:$B$500' and my_E_Constant is defined as 2.71828182845 then we can have:

	    =VLOOKUP (C1, "gnu", myCellRange, 2, 0)

	    =LN(my_E_Constant)

	    =SUM(myCellRange, my_E_Constant)
      

Names are defined using the Insert Name dialog. This allows manipulation of all the names in the related workbook. A name can have any form except that it cannot consist of a number, of the name of a sheet or of that of a function, since this would cause confusion.

In addition to the names defined by the user, Gnumeric has some pre-defined names for useful elements. These are:

  • "Sheet_Title:" this returns the name of the current sheet

Array Formulas

It is periodically useful or necessary to have an expression return a matrix rather than a single value. The first example most people think of are matrix operations such as multiplication, transpose, and inverse. A less obvious usage is for data retrieval routines (databases, realtime data-feeds) or functions with vector results (yield curve calculations).

Example 5.12. Entering an Array Formula

An array formula is currently entered by selecting the single range in which to store the result, entering the array formula, and hitting the magic combination, Ctrl-Shift-Enter.

The result is displayed as :

	={FUNCTION(ARGUMENTS)}(num_rows, num_cols)[row number][col number]
      

Error Elements

Cells can display error values if the formula contained in the cell cannot be solved or if other anomolous conditions occur.


Previous
Data in Gnumeric Cells
ContentsNext
Data Entry.
PreviousNext

Data Entry.

There are several ways to add data into a spreadsheet. The simplest data entry technique involves typing the data into a spreadsheet by hand. This is usually necessary the first time that data are introduced into a computer. If the data already exist in a computer file of some kind, a simple way might exist to insert these data into a Gnumeric worksheet. If the data are in a text file, they can be inserted into a worksheet rapidly using the text conversion facilities. If data exist in a spreadsheet file of a different format, Gnumeric may be able to open the file and the data can then be copied where they are wanted.

This section explains how to enter data by hand into a spreadsheet. The techniques necessary to obtain data from other computer sources are explained in Chapter 11, File Opening and Saving which deals with external data sources.

Warning

If the information being entered into Gnumeric cannot be interpreted correctly, Gnumeric will display an error message. The user may then be forced to edit the data before continuing. For example, a formula may be mathematically incorrect if the user has two operators in a row (e.g. =3+*4) and the diaolog will give the user the chance to re-edit the entry or accept the entry as text rather than as a formula. When the formula is corrected, the leading apostrophe can be removed and Gnumeric will re-interpret the entry as a formula.

Data Entry by Editing Cells.

The simplest method to place data in a spreadsheet involves selecting the location for the data, typing the data on a keyboard and then typing the Enter key to finish the input.

Simple Data Entry

  1. Select the cell where you want to enter data by clicking on it with the white cross cursor. This will place the thick `selection' box around that cell.

  2. Type in the data or formula. The details of this step are presented below for each of the five types of data which can be entered.

  3. Press the Enter key. This will complete the input and move the selection box down one cell which will then be able to recieve further input.

Tip

At any time while entering the data and before the Enter is pressed, the user can cancel the data entry by typing the Esc key. This will return the spreadsheet to the selection mode and restore the contents previously in the selected cell.

Tip

Instead of the Enter key, other keys can be used to input the data in the current cell. These other keys will move the selection box to other locations than does the Enter key. The Tab key inputs the entry in the currently selected cell and then moves the selection box one cell to the right of the current cell. The arrow keys input the entry into the currently selected cell and move one cell in the direction of the arrow. The Enter key can also be used in conjunction with other keys. Typing the Shift+Enter combination will move the selection upwards after entry. Typing the Ctrl+Enter combination will re-select the currently selected cell.

Advanced Editing Mode

After selecting the cell and initially entering the data, the user is in a limited editing mode. The main key for editing mistakes in this mode is the backspace key.

For a more complete set of editing options, especially for longer entries, there is an advanced editing mode. To enter the advanced editing mode, press the F2 function key or click on the editing region. The keyboard focus will then shift from the current cell to the editing region at the top of the worksheet. There, you can use cursor keys to position the cursor within the data in the cell, and have all of the capabilities of the data entry area available.

For example, you can use:

Backspace

Delete the character to the left of the cursor.

Cursor keys

Move the cursor appropriately.

Ctrl+K

Delete to the end of the line

See the section called “Data Entry.” For more info on the data entry area.

Tip

All the normal key bindings for Gnome application entry boxes also apply in the data entry box.

After finishing the data entry, pressing the Enter key will input the data entry and move the selection box downward just like for the simple editing mode.

Entering Text Data

Text can be entered by selecting a cell, typing the text and then typing the Enter key. Anything that is not interpreted to be a number, boolean, formula or error will be treated as a text field. To prevent Gnumeric from interpreting an entry as one of these other elements, a leading apostrophe can be added to force the entry to be text. Any entry, no matter what the contents, which starts with a leading apostrophe (') will be considered to be text.

Tip

Postal codes in the United States are series of five integers. By default, Gnumeric interprets these to be numbers. This interpretation means that the leading zeros used in the postal codes of the northeastern region will be lost by default. To retain these leading zeros, either the code should be entered with a leading apostrophe (e.g. '02917) or the cells should be formatted as text before data entry (see the section called “Formating Cells” for an explanation of formatting).

Entering Number Data

Numbers can be entered like other items. First the cell in which the number should be entered must be selected, then a valid number must be typed in and finally the entry must be inserted using the Enter key. The valid formats for numbers are presented in the section called “Number Data Elements”.

Entering Boolean Data

A boolean can be entered by selecting the cell, typing the boolean (either TRUE or FALSE) and then typing the Enter key.

Entering Formulas

Formulas can be entered simply by typing a syntactically correct formula in a cell. The correct syntax for formulas is expalined in detail in the section called “Formula Elements”. Formulas begin with an equals sign (=) and contain arithmetic symbols, functions with their arguments and cell references.

To enter a formula, first the cell must be selected, then the correct formula must be typed, and finally the Enter key must be typed.

Warning

If the formula entered into Gnumeric cannot be interpreted correclty, Gnumeric will display an error message giving the user the choice of re-editng the formula or saving the formula as a text field to be edited later. For example, a formula may be mathematically incorrect if the user has two operators in a row (e.g. =3+*4). If the formula is saved as text, when the formula is corrected the leading apostrophe must be removed. Gnumeric will then re-interpret the entry as a formula.

Shortcuts for including cell references and ranges in formulas

Formulas often include cell references or references to ranges of cells as arguments to functions. These references and ranges can be entered into a formula simply by typing in the proper syntax (see the section called “Cell Referencing” for more details). But manually entering in cell ranges is slow and cumbersome. In order to speed up the entry of these cell ranges, the mouse and the keyboard arrow keys can be used to select these cell ranges quickly.

When editing a formula, if the cursor is at a point where a cell refrerence or range would be approrite, the reference or range can be selected using the mouse. If the mouse is used to click on a cell, the refrence of that cell will be entered into a formula. Alternatively, if the mouse is used to drag a selection over a range of cells, that cell range will become part of the formula. The selected range will be highlighted by a border of moving black dashes, commonly called the "marching ants" border.

Figure 5.2. The highlighted selection

Using the mouse to enter cell references

  1. Begin entering a formula as you would normally. Stop at the point where a cell reference is appropriate. For example, example, type =exp(

  2. Click on the cell you want to reference. Its reference will be entered into the formula.

  3. To finish the formula, just type in the closing parenthesis. This will also "unselect" the region.

The mouse can be used to select a single cell, a continous range of cells or several disjoint ranges of cells just like regular selections.

If entering lots of formulas or even just entering a few formulas, it is often quickest to use the keyboard to select cells and ranges of cells for use in formulas. Just as reaching a input point allows the user to select cells with the mouse, it is possible to use the keyboard to select cells. Just use the cursor keys and selection modifiers to create a selection.

Using the keyboard to enter cell references

  1. Select a cell to enter a formula into. For example A1.

  2. Enter a formula, but stop the cursor at a point where a cell reference is appropriate. For this example, =SUM(

  3. Move the selection around with the cursor keys. Move the selection cursor to cell B1 to start the selection.

  4. Hold down Shift and move the selection one cell over and one cell down. Cells B1,B2,C1,C2 should now be selected and the formula should show =sum(B1:C2

  5. To finish the function, close the parenthesis. The cell should now show =sum(B1:C2). Press enter and the formula is entered.

To select a range of cell, hold Shift and move over the desired area.

To stop entering a selection or to start over, press Shift+Backspace

Entering formulas using the function list

Entering formulas using the formula guru

Entering Errors

Errors are almost never entered directly into a spreadsheet but usually arise from problems which Gnumeric encounters during calculations. A list of errors with their meanings is presented in the section called “Error Elements”.

In an unusual case where it is needed, an error can be entered by hand like the entry of other elements. First the cell must be selected, then the error must be entered (e.g. #DIV/0!) and finally the Enter key must be pressed.


Previous
The Types of Cell Elements
ContentsNext
Advanced Data Entry.
PreviousNext

Advanced Data Entry.

This section describes advanced methods for data entry in Gnumeric. This includes techniques useful when adding large amounts of data, methods to automatically catch mistakes during data entry, using pre-defined templates to format data input, obtaining data from external sources and generating sequences of random numbers with defined distributions.

Entering Large Quantities of Data

It is sometimes necessary to enter large amounts of data by hand into a spreadsheet. To facilitate this work, Gnumeric provides several techniques to facilitate the entry of large amounts of data.

If data are to be entered into a series of rows or columns, this region can be selected ahead of time thereby modifying the behaviour of the data entry keys (the Enter, Tab and arrow keys).

Data entry into a region

  1. Select the region with the mouse. For example, the region from cell C4 to cell E8 can be selected by clicking with the left mouse button on cell C4 and dragging the mouse cursor to cell E8. (More information on complex selections is presented below.)

  2. Enter data by typing the data and the the Enter key. If this is done repeatedly, the fifth time the Enter key is pressed, the selection will not move to cell C9 but will jump up to cell D4.

Note

The Tab key can also be used instead of the Enter key to move sequentially through the selection.

Entering a Regular Sequence

It is often necessary to enter a regular sequence of numbers or a repeated sequence of text. Gnumeric provides several ways to input series and sequences of this kind.

The simplest way to fill a series with the same element repeated involves entering the element once and dragging the selection box to fill that element repeatedly. For example, the text "employee:" could be input into cell C2. That cell could then be selected. The selection box is a thick white rectangle which surrounds the cell. This selection box has a small white square at the bottom right hand corner. If the mouse cursor is placed above this square box, it changes to a thin cross. If the left hand mouse button is clicked and held, and the mouse dragged to cell C10, Gnumeric will automatically fill all of the cells with the identical string.

An alternative way to enter data into a region involves first selecting the region, then typing the value and finally typing the Ctrl+Enter key combination. This will fill the whole region with the identical value which was originally entered.

A similar method is available to fill sequences of integers. If the example just given was altered so that cell C2 had the number 14 and the Ctrl key was held during the dragging of the selection, Gnumeric will automatically fill the cells C2 to C10 with the series 14,15,16,...,22.

More complex series and sequences of data can be entered with a similar mechanism.

To do an autofill:

  1. Enter a value into the first cell you wish to autofill. For example, the cell C2 could have the number "24" entered.

  2. Enter a second value into the second cell you wish to autofill. This must be adjacent to the first cell. This sets the increment to use when autofilling the rest of your cells. For example, the cell D2 could have the number "28" entered.

  3. Select both the cells just entered. At the bottom-right of the selection should be a small box. Your mouse cursor will change to a cross-hair when placed over the box. Press and hold on the box. Drag in the direction, either vertical or horizonatal, you wish to increment and release when all the cells are filled. For example, selecting cells C2 and D2, then dragging the bottom right of the selection to cell I2 will fill the cells with the sequence from 24 to 48 with each increment being 4.

An alternative to the last step involves using the menus. Once the first two values have been input, the whole range to be filled can be selected using the mouse and then the Autofill selection can be made from the Edit and Fill. This will automatically complete the series in the selected region.

Gnumeric is able to increment several types of data beyond simple integers. The proceedure is the same as described above but involves different starting values. Gnumeric can increment:

Integers

1, 2, 3, etc.

Natural Numbers

1.03, 2.05, 3.07, etc.

Weekday Names

Monday, Tuesday, etc.

Weekday Abbreviations

Mon, Tues, etc.

Month Names

January, February, etc.

Month Abbreviations

Jan, Feb, etc.

Strings with Numbers

Item1, Item2, etc

Dates

11/14/2001, 11/15/2001, etc.

Gnumeric supports incrementing the date by month, date, or year.

Note that, While Gnumeric will increment days of the month, if you do 11/14/2001 and 12/14/2001, it will recognize it as the same day of the month and increment the month so the next value would be to 1/14/2002 instead of the day difference.

Gnumeric can be explicitly told the cells to autofill as in the examples above, but it can also guess the number of cells to fill based on the length of an adjacent column or row. For example, if the cells B2 to B10 have information and cell C2 has the integer value "1", then selecting cell C2 and double clicking on the bottom rightmost box of the selection rectangle will fill the value "1" from cell C3 to cell C10.

Automatically Correcting Simple Mistakes

The entry of large amounts of data into a spreadsheet is tedious work which is prone to repeated mistakes. Gnumeric provides a tool to automatically correct commonly made simple mistakes. The corrections are configured and activated using AutoCorrect Dialog, available via Auto Correct in the Tools menu.

Figure 5.3. The Auto Correct dialog.

An image of the auto-correct dialog.

Correct TWo INitial CApitals

A common mistake is to hold down the shift key a little bit too long while typing initial letters. When it happens, you will get two initial capitals instead of one. If this correction rule is activated, the second letter of words beginning with two capital letters is automatically lowercased. For example, if you type `TOtal' into a cell it is replaced by `Total'. Note that if the word contains two capital letters only, it is not replaced.

It is possible to specify exceptions to this tool. For example, you do not want the tool to replace the word `PVbonds' when it is typed. To specify exceptions, press the ``Exceptions...'' button in the dialog. This should pop up the ``Auto correct exceptions'' dialog. In this dialog, select the ``INitial CApitals'' page. In this page, type `PVbonds' into the ``Do not correct'' entry, and press ``Add'' button. Now the word should be included in the list of exceptions. To remove a word from the list, select the word and press the ``Remove'' button. If you now press ``Ok'' the exceptions in the list are activated.

Capitalize the First Letter of Sentences

If this correction rule is activated, the first letter of a sentence typed into a cell is capitalized, if it is a lowercase letter in the first place. Only text that ends to a dot is considered a sentence.

It is possible to specify exceptions to this tool. For example, you do not want the tool to capitalize letters after acronym `i.g.'. To specify exceptions, press the ``Exceptions...'' button in the dialog. This should pop up the ``Auto correct exceptions'' dialog. In this dialog, select the ``First letter'' page. In this page, type `i.g.' into the ``Do not capitalize after'' entry, and press ``Add'' button. Now the word should be included in the list of exceptions. To remove a word from the list, select the word and press the ``Remove'' button. If you now press ``Ok'' the exceptions in the list are activated.

Capitalize the Names of Days

If this correction rule is activated, the first letter of a name of a day is capitalized automatically. For example, if you type `monday', it is automatically replaced by `Monday'.

Using a Format Template

This section has not yet been written.

Generating Random Number Sequences

Figure 5.4. Random Number Generation Tool Dialog

An image of the random number generation
              tool.

Use the random number generation tool to generate random numbers. This tool can generate random numbers from various probability distributions.

Specify the number of variables in the “Number of Variables:” entry. This determines the number of columns of random values to be produced.

Specify the number of random numbers for each variable in the “Size of Sample:” entry. This determines the number of rows of random values to be produced.

Specify the random distribution by selecting one of the items from the random distribution list. The following random distributions are supported: Discrete, Normal, Poisson, Exponential, Binomial, Negative Binomial, Bernoulli, and Uniform.

Specify the parameters of the selected distribution:

Discrete Random Distribution

Specify the value and probability input range in the “Value and Probability Input Range:” entry box. The value and probability input range is a table consisting of two columns and any number of rows. The first column specifies the discrete random values and the second column the probabilities for them. The discrete random values do not have to be numbers, for example, strings will do as well. The sum of the probabilities in the second column should be one. For example, if you have the values A, B, C, and D in A1:A4 and values 0.1, 0.4, 0.2, and 0.3 in B1:B4, you would specify the value and probability input range to be A1:B4.

Note

If the probabilities do not add to 1, they will be automatically scaled.

Normal Random Distribution

Specify the mean and the standard deviation. The default values are 0 for the mean and 1 for the standard deviation.

Poisson Random Distribution

Specify the lambda in the “Lambda” entry. Lambda is the average number of events in a unit time interval.

Exponential Random Distribution

Specify b in the “b Value” entry.

Binomial Random Distribution

Specify the probability of success (p) in the “p Value” entry and the number of trials (n) in the “Number of Trials” entry. The Binomial distribution is a discrete distribution in which the experiment consists of n identical trials. Each trial is independent of other the trials and has two possible outcomes, a success or a failure. The probability of success p is constant from one trial to another. The mean of a random variable that has a Binomial distribution is E(X) = np, and the variance is var(X) = np(1-p).

Negative Binomial Distribution

Specify the probability of success p in the “p Value” entry and the number of failures r in the “Number of Failures” entry. Negative Binomial distribution is a discrete distribution in which the experiment consists of a sequence of independent trials. Each trial has two possible outcomes, a success or a failure. The probability of success p is constant from one trial to another. The experiment continues until r failures are observed, where r is fixed in advance. The mean of a random variable that has a Negative Binomial distribution is E(X) = r(1-p)/p, and the variance is var(X) = r(1-p)/p^2.

Bernoulli Random Distribution

Specify the probability of success (p) in the “p Value” entry. p is a probability value between 0 and 1. The Bernoulli distribution has two random values 0 and 1, and p is the probability to observe value 1. The mean of a random variable that has a Bernoulli distribution is E(X) = 1(p) + 0(1-p) = p, and the variance is var(X) = p(1-p).

Uniform Random Distribution

Specify the range of the continuous random variable with the “Between:” and “And:” entries. The default values for these entries are 0 and 1.

Figure 5.5. Some Example Data for the Random Number Generation Tool

An image of some example data for use with the
              random number generation tool.

Example 5.13. Using the Random Number Generation Tool

Figure 5.5, “Some Example Data for the Random Number Generation Tool” shows some example data and Figure 5.6, “Random Number Generation Tool Output” the corresponding output.

Figure 5.6. Random Number Generation Tool Output

An image of the output from the random number
              generation tool.

Previous
Data Entry.
ContentsNext
Obtaining Data from External Sources
PreviousNext

Obtaining Data from External Sources

Data are commonly obtained from external sources such as from other files, either in a spreadsheeet format or in delimited text format, from other applications using the mouse to copy and paste data or from external applications such as databases or internet data streams.

Obtaining Data from External Files

Data which already exist in an external file can be imported into a workbook first by opening the file into a separate instance of gnumeric and and then by copying the relevant data into the desired worksheet.

Data contained in external files in the formats of several other spreadsheet applications can be opened by gnumeric. Gnumeric can open files in Applix (TM) format, GNU Oleo format, Lotus 123 (TM) format, Microsoft Excel (TM) format, Multiplan (TM) format, OpenOffice Calc or StarOffice Calc (TM) format, Plan Perfect (TM) format, Quatro Pro (TM) format, sc and XSpread format or in the Xbase format.

Data contained in external text files which are formatted in well defined ways can also be opened by gnumeric. Gnumeric can open files formatted in Data Interchange Format, formatted as HTML tables, or formatted in text formats such as comma separated values or tab delimited records. The opening of text format files is configurable by the user so that text files which contain data formatted in a wide variety of schemes can be imported correctly into gnumeric. Obtaining data from these files is explained in detail in the section titled the section called “Opening and Importing Files”.

Data which are opened into a separate instance of gnumeric can be copied and pasted into the current worksheet with the copy and paste commands as explained in the section called “Cut, Copy and Paste”.

Obtaining Data by Cut and Paste

Data can be obtained from other Gnumeric workbooks or other applications using the mouse to copy data and paste them into a worksheet. This is explained below in the section titled the section called “Cut and Paste Between Gnumeric and Other Applications”.

Getting Data from a Database

This has not yet been written.

Getting Data from an Internet Data Stream

Gnumeric has been connected to external data sources such as stock quotation service data streams using an experimental plugin. This requires the ability to write programming code. Information on extending gnumeric by developing plugins can be found in the section called the section called “Writing New Plugins” and the actual computer source code can be found in the directory gnumeric/plugins/sample_datasource/ of either a distribution of gnumeric or in a code checkout from the concurrent versioning system (CVS) repository.


Previous
Advanced Data Entry.
ContentsNext
Selecting Cells and Cell Ranges
PreviousNext

Selecting Cells and Cell Ranges

By selecting multiple cells at once, common operations can be performed on all the cells which have been selected. These operations include data entry, copying the cells, and multiple other operations .

Simple Selections

The simplest selection involves a single cell. Simply clicking with the left hand mouse button while the mouse cursor is over a cell will cause that cell to become selected.

The selected cell is indicated by a dark double line with a small square in the bottom right corner. The selected cell is the the one that is currently in focus and will take any input for the keyboard.

Figure 5.7. A selected cell.

An image of a single selected cell.

To make a cell become the selected cell, simply move the white-cross cursor over the cell and press the left mouse button.

Figure 5.8. Selecting a cell with the mouse cursor.

An image of the cursor selecting a cell.

Selecting Multiple Cells

Several cells can be selected at once. The selection of multiple cells is indicated by a dark double line around the extents of the selection. The top-left cell appears much like a single selected cell while the rest of the selection is the inverse color.

Figure 5.9. A multi-cell selection

An image of a contiguous selection of cells.

Continuous selections

To make a continuous selection of cells, click on the cell with the white_cross cursor and drag the extents of the selection until it comprises the area you wish to select, and release.

Figure 5.10. Multiple cells being selected with the cursor.

An image of a block selection and the mouse cursor.

Discontinuous selections

To select a set of cells that may not be continuous, use Ctrl+MB1 and drag to argument an existing selection. The cells can be added individually or as parts of other selections.

Figure 5.11. A discontinuous selection of cells.

An image of a multiple selection.

Selections Using the Keyboard

The quickest way to make large selections, especially when your already using the keyboard is to just use the keyboard selection tools. The basic use is to press Shift+arrow keys to make a new selection.

To select an entire row of cells, press Shift+space. This is equivalent to pressing the row label button on the left side of the sheet.

Figure 5.12. An entire row being selected.

An image of a selected row.

To select an entire column of cells, press Ctrl+ Space . This is equivalent to pressing the column label button on the top of the sheet.

Figure 5.13. An entire column being selected.

An image of a selected column.

To select the entire sheet, press Ctrl+A. This is equivalent to pressing the button in the top left corner of the sheet.

Figure 5.14. The entire worksheet being selected.

An image of an entire worksheet selected.
  • Shift+Arrow : Define selection with cursor keys.

  • Ctrl+Arrow : Jump to the end of the current region.

  • Alt+Space : Select current row.

  • Ctrl+Space : Select current column.

  • Ctrl+A : Select the entire sheet.

  • Ctrl+/ : Select the array formula arround the current edit position.


Previous
Obtaining Data from External Sources
ContentsNext
Moving and Copying Data
PreviousNext

Moving and Copying Data

Data which have been entered once into a spreadsheet can be moved to new locations and possibly duplicated. The simplest way to do this involves dragging the selection box. A more advanced way involves a formal cut or copy operation and then a paste operation in the new location. The latter approach allows the data to be modified as they are pasted which can be extremely important.

Tip

It is frequently necessary to copy the results of complex calculations into a new location. This is done by selecting the data and using the As Value command from the Paste Special... dialog. This is explained in the section called “Paste Special” below.

Simple Copy and Move

The easiest way to move or copy a cell or a group of cells is by selecting the cell or cells to be moved or copied, then using the mouse to drag the selection box to a new location.

  1. Select a cell to move by clicking in it. You can also select a range of cells as described in the section called “Selecting Cells and Cell Ranges”.

  2. Click left mouse button on the border of the selection (anywhere except the autofill square in the bottom right corner). Use left mouse button to move cells or Ctrl+left mouse button to copy cells.

  3. Drag the selection to the new location.

  4. Release the mouse button.

The selected cells will be copied or moved to the new location. This will move both cells' content and formatting. When copying, relative cell references in all formulas will change as described in the section called “Cell Referencing”; when moving, relative cell references will remain unchanged.

Cut, Copy and Paste

Another, more flexible, way to copy or move a selection is to use cut, copy, and paste operations. These operations allow the user to copy or move selected cells to the clipboard buffer and then paste the contents of the clipboard buffer to a different location or a different workbook.

Cutting a Selection to the Clipboard

To cut a cell or a selection to the clipboard, you should select a cell or range of cells as described in the section called “Selecting Cells and Cell Ranges” and then use one of the following methods:

  • Use keyboard shortcut Ctrl+X.

  • Choose Cut from the Edit menu.

  • Click on An image of the cut toolbar button.  Cut button in the toolbar.

  • Right-click on the selection and choose Cut from the context menu.

The selection will be copied to the clipboard buffer. To remind you of this, the border of the selection will be shown as "marching ants". The selection will be moved to a new location as soon as you choose Paste command as described below.

NOTE

Please note that the selection will remain in its current location until you paste it. If you want to delete a selection without pasting it to a new location, use Delete command instead.

Copying a Selection to the Clipboard

To copy a cell or a selection to the clipboard, you should select a cell or range of cells as described in the section called “Selecting Cells and Cell Ranges” and then use one of the following methods:

  • Use keyboard shortcut Ctrl+C.

  • Choose Copy from the Edit menu.

  • Click on An image of the copy toolbar button.  Copy button in the toolbar.

  • Right-click on the selection and choose Copy from the context menu.

The selection will be copied to the clipboard buffer. To remind you of this, the selection will outlined by "marching ants" border. The selection will be copied to a new location as soon as you choose Paste command as described below.

Pasting the Clipboard

To paste the contents of the clipboard (i.e., previously cut or copied selection) to a new location, just click on a cell and use one of the following methods:

  • Use keyboard shortcut Ctrl+V.

  • Choose Paste from the Edit menu.

  • Click on An image of the paste toolbar button.  Paste button in the toolbar.

  • Right-click on the cell and choose Paste from the context menu.

The contents of the clipboard will be pasted in the spreadsheet so that the selected cell becomes the top left corner of the selection. This will also copy the formatting of the original selection.

If you are pasting a selection which was copied to the clipboard buffer, all relative cell references in all formulas will change as described in the section called “Cell Referencing”. The selection remains in the clipboard buffer so that it can be pasted again. The original selection will remain outlined with "marching ants" border.

If you are pasting a selection which was cut to the clipboard buffer, all cell references in all formulas will remain unchanged. The original selection will be removed from the workbook and the clipboard buffer will be cleared.

Paste Special

All of the methods described above to move or copy data create identical copies of the original cells in the new location. This means that both the contents and the formatting of the original selection are copied to the new location and also means that any data present in the new location are deleted. It is frequenly important either to alter the data before it is pasted or to merge the data in the new location with the data being pasted. The Paste Special... command enables this.

The Paste Special... command can act exactly like the Paste command or may selectively paste the cell contents, the cell formats, the calculated values of the orginal cells rather than their contents. described in the previous section copies both contents and formatting of the orignal selection. If you need more options, use Paste Special... command.

The Paste Special... command can be accessed, after a selection has been cut or copied as explained above, in one of two ways. First, the location where the pasting should happen must be selected. The easiest way to do this is to select the single cell which will be at the top left hand corner of the region of pasted cells. Alternatively, the exact region into which the cells will be copied can be slected. After the selection is made, the Paste Special... command can be chosen from the Edit menu or the context menu obtained by clicking with the right mouse button in the cell area of the spreadsheet.

The Paste Special... menu item opens a dialog with three categories. By default, Paste Special... acts as if it were the Paste menu item.

The first set of choices allow the user to control the data pasted.The user can chose to limit the pasting to only the cell contents (no cell formatting is copied) or the opposite only cell formats copied (no contents). Furthermore, the user can insert the selection while transforming all the contents into values only. Formulas will be replaced by their values.

A second set of choices allows the user to perform simple mathematical operations during the paste. These operations use the current contents of the cells in the paste range and the contents of the clipboard. For example, if you are pasting a cell containing number 5 to a cell that currently contains number 10 and choose option Divide, the result will be 10/5=2. Choosing option None will just replace the previous contents of the cells by the contents of the clipboard buffer (this is the default behavior).

The final choices contains the following options:

  • Transpose. This option will transpose the selection, i.e. interchange the rows and columns. Thus, a range with k rows and n columns will become a range with n rows and k columns, so that the firs row becomes the first column, and so on.

  • Skip Blanks. This option prevents Gnumeric from taking any action for the cells in the selection that are blank. For such cells, the existing contents of the cells in the paste range will be kept.

Cut and Paste Between Gnumeric and Other Applications

Cut and paste commands described above allow copying and moving selections from one location in a spreadsheet to another, or between different spreadsheets. However, you can also use cut and paste to exchange information between Gnumeric and other applications, using so-called X clipboard which is shared by all graphical applications.

Whenever you cut or copy a selection in Gnumeric, it is placed both in Gnumeric clipboard and in X clipboard. In X clipboard, it is placed as text, with formulas replaced by their values and contents of different cells separated by spaces.

To paste the selection from X clipboard to an application, click with middle mouse button (if you have two button mouse, you can emulate the middle mouse button by pressing left and right buttons simultaneously). Most applications also allow pasting from X clipboard by using keyboard shortcut (usually Ctrl+V) or by choosing Edit->Paste.

To paste a selection from another application to Gnumeric, place this selection in the X clipboard. Usually it is done by just selecting it with the mouse; some applications also allow you to use keyboard shortcut Ctrl+C, or choose Edit->Copy. After this, you can paste it in Gnumeric by using Paste command described above. This command will automatically paste the contents of X clipboard if Gnumeric's own clipboard is empty.

Pasting X clipboard in Gnumeric will automatically launch the Text Import druid which will assist you in imporitng the plain text contents of X clipboard into the spreadsheet. The Text Import druid is described in the section called “The Text Import Druid”.


Previous
Selecting Cells and Cell Ranges
ContentsNext
Deleting Data
PreviousNext

Deleting Data

This section has not yet been written...

Para...

Para...


Previous
Moving and Copying Data
ContentsNext
Inserting New Data Cells
PreviousNext

Inserting New Data Cells

This section has not yet been written...

Para...

Para...


Previous
Deleting Data
ContentsNext
Formating Cells
PreviousNext

Formating Cells

Cell formats allow you to change the way cell data appears in the spreadsheet. It is important to keep in mind that it only alters the way the data is presented, and does not change the value of the data.

The formatting options allows for monetary units, scientific options, dates, times, fractions,and more. Positive and negative values can have different colors and formats for aiding in keeping track of values. There are also a large variety of date and time formats for virtually any time and date format one can think of. Formatting also allows you to set font, background color, and borders for selected cells.

Finally, advanced formatting options allow you to lock some of the cells so that their values cannot be changed, or restrict the range of values that can be entered in the selected cells.

To change the formatting of a cell or a selection, you can either use the Format Cells dialog which holds all of the formatting options or use specific formatting elements available as buttons on the Format Toolbar.

This dialog, shown in Figure 5.15, “Format Cells Dialog”, gives you access to all formatting options.

Figure 5.15. Format Cells Dialog

An image of the cell format dialog opened to the "Number" tab.

To launch this dialog, select the cell or range of cells you want to format (see the section called “Selecting Cells and Cell Ranges” for details on selecting cells) and then use one of the following methods:

The Format Cells dialog contains tabs Number, Alignment, Font, Border, Background, Protection, and Validation. These tabs are described in detail in the subsequent sections.

To set one of formatting options, select the corresponding tab, choose the options you need, and click OK. This will apply the options you selected (in all tabs) and close Format Cells dialog. You can also click on Apply to apply the and keep the dialog open, or on Close to close the dialog without applying changes.

Some of the most commonly used formatting options, such as font, background, and alignment, can also be accessed by using the buttons in the Format Toolbar. This toolbar is described in detail in the section called “The Format Toolbar”,

Number Formatting Tab

This tab allows you to select the format for the cell's contents. You can select one of the many preset formatting styles which should be be more than adequate for the vast majority of cases. If none of these meet the needs of the user, it is possible to create your own formats.

To use one of the preset formats, select the format category (such as Number or Date) by clicking on the corresponding radiobutton in the left side of the dialog. The right side of the dialog will show you how the selected cell would look with this format and give more options for the selected format.

The following is a list of all available format categories:

General

A swiss army knife of a format. It will attempt to display a value it the 'best' way possible. The choice of format depends on the size of the cell and Gnumeric guess of what 'type' of value is being displayed (number, date, time ...).

Number

Displays numbers with 0-30 digits after the decimal place. Negatives can be displayed normally, within parentheses, or in red color. Optionally a delimiter can be added every third order of magnitude (thousand, million, ...). Both the decimal point and the thousands separator have internationalization support.

Currency

Similar to Number, with the addition of a currency symbol. Currently known symbols include $, ¥, £, and the three letter abbreviations of all major currencies. By default, Gnumeric will use currency symbol and placement (before or after the number) appropriate for your locale.

Accounting

A specialization of Currency which pays more attention to the alignment of negative numbers. It ensures that a small amount of space is prepended to positive numbers so that they align with negatives.

Date

This category contains various formats for presenting dates. By default, Gnumeric will use date format appropriate for your locale (country and language setting). You can also choose one of many possible date formats shown in the list in the right side of the dialog. The following is an explanation of codes used in these formats:

  • d: day of month (one or two digits). Example: 9.

  • dd: day of month (two digits). Example: 09.

  • ddd: day of week. Example: Wed.

  • m: month (number, one or two digits). Example: 3.

  • mm: month (number, two digits). Example: 03.

  • mmm: month (abbreviated name). Example: Mar.

  • mmmm: month (full name). Example: March.

  • yyyy: year (four digits). Example: 1967.

  • yy: last two digits of year. Example: 67.

Some date formats also include time using the codes explained below. Examples of date formatting are shown in Table 5.1, “Examples of Date Formats”.

Time

This category contains various formats for presenting time of day. You can choose one of many possible time formats shown in the list in the right side of the dialog. The following is an explanation of codes used in these formats:

  • h: hours.

  • mm: minutes.

  • ss: seconds.

Sometimes it is necessary to display more than 24 hours, or more that 60 minutes/seconds without the values incrementing the display unit of the next larger measure (e.g., 25 hours instead of 1 day + 1 hour). To achieve this, use codes '[h]', '[mm]', and '[ss]'. Examples of time formatting are shown in Table 5.2, “Examples of Time Formats”.

Percentage

Multiplies a value by 100 and appends a percent. Can be used with 0-30 digits after the decimal place.

Fractions

Approximate the value with a rational number with either a specific denominator or with a maximum number of digits in the denominator.

Scientific

Formats the value using scientific notation, e.g. 5.334 E 6 for 5,334,000. Allows up to 30 digits after the decimal place. No provision for controlling the exponent are provided at this time.

Text

Treats numeric values as text. This will show a number with as much precision as available and will lose knowledge of whether it represented a date, or time.

TIP

If your workbook contains serial numbers, ID numbers or other similar entries, choose Text format for them. If you choose General or Number format, Gnumeric will remove leading zeros, so that 01124 will be shown as 1124.

Custom

This category allows you to define your own format. This is only recommended for advanced users as it requires understanding of the codes internally used by Gnumeric for describing formats. To make it easier, this category provides a list of codes for all predefined formats so you can create our own format by modifying one of them rather than starting from scratch.

Table 5.1. Examples of Date Formats

FormatSample
General36068.755
m/d/yyd/m/yy9/30/9830/9/98
m/d/yyyyd/m/yyyy9/30/199830/9/1998
d-mmm-yymmm-d-yy30-Sep-98Sep-30-98
d-mmm-yyyymmm-d-yyyy30-Sep-199Sep-30-9198
d-mmmmmm-d30-SepSep-30
d-mmmm-d30-0909-30
mmm/dd/mmmSep/3030/Sep
mm/d d/mm09/3030/09
mm/dd/yydd/mm/yy09/30/9830/09/98
mm/dd/yyyydd/mm/yyyy09/30/199830/09/1998
mmm/dd/yy dd/mmm/yySep/30/9830/Sep/98
mmm/dd/yyyydd/mmm/yyyySep/30/199830/Sep/1998
mmm/ddd/yyddd/mmm/yySep/Wed/98Wed/Sep/98
mmm/ddd/yyyyddd/mmm/yyyySep/Wed/1998Wed/Sep/1998
mm/ddd/yyddd/mm/yy09/Wed/98Wed/09/98
mm/ddd/yyyyddd/mm/yyyy09/Wed/1998Wed/09/1998
mmm-yySep-98
mmm-yyyySep-1998
mmmm-yySeptember-98
mmmm-yyyySeptember-1998
d/m/yy h:mmm/d/yy h:mm9/30/98 18:0730/9/98 187:07
d/m/yyyy h:mmm/d/yyyy h:mm9/30/1998 18:0730/9/1998 187:07
yyyy/mm/d1998/09/30
yyyy/mmm/d1998/Sep/30
yyyy/mm/dd1998/09/30
yyyy/mmm/dd1998/Sep/30
yyyy-mm-d1998-09-30
yyyy-mmm-d1998-Sep-3
yyyy-mm-dd1998-09-30
yyyy-mmm-d1998-Sep-30
yy98
yyyy1998

Table 5.2. Examples of Time Formats

FormatSample
General36068.755
h:mm AM/PM6:07 PM
h:mm:ss AM/PM6:07:12 PM
h:mm18:07
h:mm:ss18:07:12
m/d/yy h:mm9/30/98 18:07
d/m/yy h:mm30/9/98 18:07
mm:ss07:12
[h]:mm:ss865650:07:12
[h]:mm865650:07
[mm]:ss51939007:12
[ss]3116340432

Alignment, Font, Border, and Background Tabs

Alignment Tab

This tab allows you to set horizontal and vertical alignment and justification options.

Figure 5.16. Alignment Tab

An image of the cell format dialog opened to the
              "Alignment" tab.

Horizontal justification options.

General

The standard default justification. Use right justification for numbers and formulas, and left justification for text strings.

Left

Left justify all cell contents.

Center

Center all cell contents.

Right

Right justify all cell contents.

Fill

Fill the cell with the contents. This will repeat the cell's contents as necessary to fill the width of the cell.

Justify

For text, wrap long lines of text and left justify. For other formats, same as Left.

Center across selection

Centers the cell's contents so the middle of each line is aligned with the middle of other lines. This only works with multiple cells.

Left and Right justification options also allow you to specify indent from left (respectively, right) side of the cell. Indent is measured in multiples of the current font size: for font size 10, indent 4 means 40 pts.

Vertical Justification Options

Top

Align the top of the cells contents with the top of the cell.

Center

Center the cells contents vertically. Equally space between the top and bottom.

Bottom

Align the contents of the cell with the bottom of the cell.

Justify

For text, wrap long lines and spread lines of text evenly to fill the cell. For other formats (or if the text contains no long lines), same as Bottom justification.

Font Tab

This tab allows you to change the font used for cells content.

Figure 5.17. The Font Tab

An image of the cell format dialog opened to the
              "Font" tab.

To change cells font, select font family (such as Times, Helvetica, etc), style (Normal, Bold, ...) and size in points. You can also select font color and special effects such as underlining or strikethrough.

Gnumeric allows you to use any of the fonts known to GNOME printing system, gnome-print. The same fonts are used for screen display and for printing, assuring that the printed document will look identical to the one you see on screen. Advanced users can refer to documentation for gnome-print package to find out more about adding fonts and font management in GNOME.

TIP

A quicker way to change the selected cells' font is to use Format Toolbar.

Border Tab

This tab allows you to choose the border for the selected cells. You can select one of many border styles (none, single line, double line,...) and colors. You can also have different borders on different sides of the cell.

Figure 5.18. Border Tab

An image of the cell format dialog open to the
              "Border" tab.

To choose a border for a cell or a selection, select border style and color in the right side of the tab and click on the buttons corresponding to the sides of the cells in the left side of the tab. In addition to the buttons for left, right, top, and bottom sides, you also have buttons for drawing diagonal and reverse diagonal of the cell. (Strictly speaking, these cannot be called borders, but it is natural to put them in this tab.) The lowest row of buttons contains buttons None and Outline. Clicking on None removes all borders from the cell; clicking on Outline puts border on all sides of the cell or selection.

Please note that for a selection of cells, the buttons will put borders on one of the sides of selection, not of individual cells. For example, clicking on Bottom button will put the border along the bottom of the selection, so only the cells in the bottom row will be affected. In addition for selections you have three more buttons in the bottom row: Inside vertical, Inside, and Inside horizontal. Inside vertical puts borders on all inside vertical borders in the selection; Inside horizontal puts borders on all inside horizontal borders in the selection, and Inside puts borders on all inside borders in the selection, both vertical and horizontal.

To remove an existing border from one of the sides of a cell or selection, click on the corresponding button again.

Background Tab

This tab allows you to change the background of selected cells. You can choose solid color or patterned background. A preview of the selected background will be shown in the right part of the tab.

Figure 5.19. Background Tab

An image of the cell format dialog open to the
              "Background" tab.

To select a solid color background, select the color from Background Color drop-down box. You can use of the standard colors or define your own color by clicking on Custom Color button.

To select a patterned background, choose the background color in Background Color section. After this, choose the pattern color and type in Pattern section. Please note that the pattern type buttons use black pattern on white background, regardless of the colors you have chosen.

To remove pattern, choose Solid pattern type (top left button, looking like a white square).

Protection and Validation Tabs

These two tabs are used to control user's access to cells and restrict values of data allowed in a cell. Unlike other formatting options, these two tabs have no effect on a cells appearance. These options are mostly used for writing templates and forms to be filled by others.

Protection Tab

Figure 5.20. Protection Tab

An image of the cell format dialog open to the
              "Protection" tab.

This tab allows you to see and change cell protection in imported Excel workbooks. Cell protection has no effect in Gnumeric: you can edit cells whether or not they are marked as protected. However, Gnumeric keeps the protection setting of imported Excel workbooks. If you later save your workbook in Excel format, Gnumeric will save the protection information too. For more information about cell protection in Excel, please refer to Excel documentation.

Validation Tab

This tab allows you to set restrictions on allowed values of data in the cells. If you (or someone else) attempts to enter a data that does not meet the set criteria, a warning (or an error message, depending on the options set in this tab) will be shown.

Figure 5.21. Validation Tab

An image of the cell format dialog open to the
              "Validation" tab.

This tab consists of two part. The first part, Criteria is used to set the criteria for the cell values. The second part, Error Alert, is used to choose the action when data entered does not meet the criteria.

To set the criteria for cell values, follow these steps:

  1. Choose the type of data contained in the cells, using the Allow drop-down list.

  2. Choose a condition that must be satisfied by the cells value, using Condition drop-down list. In these conditions, val stands for the cells value (for text, val stands for the length of text string) and min, max, and bound are constants that you need to specify.

  3. Enter the values of constants used in condition. For example, if you chose condition min<=val<=max , you need to enter values of constants min and max.

After specifying the criteria, you need to specify how Gnumeric should respond to incorrect cell value. You can choose one of four possible actions from Action drop-down list:

None

Accept invalid value without any warning. Equivalent to having no validation.

Stop

Do not accept the invalid value. Show the user an error message which you need to specify (see below).

Warning

Show the user a warning dialog, giving him a choice whether to accept or reject the invalid value. You need to specify the message to use in the warning dialog (see below).

Information

Accept invalid values but show the user a warning dialog. You need to specify the the message to use in the warning dialog (see below).

If you choose one of the options Stop, Warning, or Information, you must enter the message that will be show to the user in the error or warning dialog. Otherwise, the dialog will be empty so it will be completely useless. You need to enter the title (which will be used as the window title for the dialog window) and the message itself. For example, the values shown in the section called “Validation Tab” will produce the dialog shown in Figure 5.22, “Warning dialog in response to invalid input”.

Figure 5.22. Warning dialog in response to invalid input

An image of the validation error notification
              box.

Previous
Inserting New Data Cells
ContentsNext
Modifying Data
PreviousNext

Modifying Data

This section has not yet been written...

Searching for Data

This section has not yet been written...

Searching and Replacing Data

This section has not yet been written...

Sorting Data

This section has not yet been written...

Shuffling Data

With data shuffling tool you can shuffle data in a given cell range. The tool can be started by selecting ``Shuffle'' menu item in ``Data'' menu. In order to use the tool give the input range in which the data to be shuffled is stored. The tool is able to shuffle the contents of the whole cell range, or, also shuffle data according to rows or columns. The shuffling method is selected under the ``Input Range'' entry. For example, if your data is groupped by rows then select ``Shuffle Method'' ``Rows''.

The default output method is to shuffle in-place. The shuffled data can also be written into a new sheet, new workbook, or into an existing sheet by giving the output range. If you select the ``Autofit Columns'' option, the width of each output column is automatically fixed according to the size of data in it.

Filtering Data

With data filters you can select a subset of rows in the worksheet that meet the given criteria. You can, for example, copy rows of a table containing sales of departments whose profit has been exceptionally high into a new sheet simply using a filter.

Advanced Filter

This section has not yet been written.

Advanced Filter

This section has not yet been written.

Advanced Filter

To use advanced filter, you should have a few blank rows available in your worksheet to be used as a criteria range. These rows should not overlap with the rows in the table to be filtered.

Now copy all the column labels from the table you want to filter into the first blank row in the criteria range. Below the criteria labels, you can now type the conditions you want to match for the particular label. For example, under a label `Profit' you could type `>=1000'. The tool selects only rows that match all the criteria.

Figure 5.23. Worksheet containing the table to be filtered and a simple criteria

An image of a worksheet and the advanced filter dialog.

It is possible to have many conditions for a single label. For example, you can select the departments whose profit is either very high or very low. To do this, type, for example, `<=0' below the `>=40000' condition.

Figure 5.24. Criteria for selecting rows whose `Profit' column is between 0 and 40000.

An image of a worksheet witht the filter criteria.

To start the tool, select ``Advanced Filter'' from the ``Data'' menu. It brings you the advanced filter dialog. In the dialog, select the action you want to take.

Figure 5.25. The Advanced Filter dialog.

An image of the advanced filter dialog.

``Filter in-place'' writes the new table in-place. Note that you will loose all the rows in the table that will not match the criteria. ``Copy to a new location'' copies the selected rows into the same sheet but into the specified cell range. Type the cell range into the ``Copy to'' entry if you want this action to happen. The other options let you to copy the selected rows into a new sheet or a new workbook.

You should then specify the cell range containing the table to be filtered in the ``List range'' entry. The cell range containing the criteria is specified in the ``Criteria range'' entry. If the original table contains duplicate rows, you may also want to specify the ``Unique records only''. If it is checked on, the filter removes all duplicates.

To start the tool, you can then click the ``OK'' button and you will get the new table.


Previous
Formating Cells
ContentsNext
Generating Data
PreviousNext

Generating Data

This section has not yet been written...

...

Creating a Tabulation of Dependencies

This section has not yet been written...

Creating Multiple Repeats of Standard Data

This section has not yet been written...

Consolidating a Result from Several Source Regions

This section has not yet been written...


Previous
Modifying Data
ContentsNext
Adding a Comment to a Cell
PreviousNext

Adding a Comment to a Cell

This section has not yet been written...

Para...

Para...


Previous
Generating Data
ContentsNext
Adding a Hyperlink to a Cell
PreviousNext

Adding a Hyperlink to a Cell

This section has not yet been written...

Para...

Para...


Previous
Adding a Comment to a Cell
ContentsNext
Advanced Analysis
PreviousNext

Chapter 6. Advanced Analysis

This chapter explains many of the advanced analytic tools available in Gnumeric including statistical analysis, linear algebra calculations and simulation analysis.

Table of Contents

Advanced Analysis in Gnumeric
Analysis using Complex Numbers
Goal Seek Tool
Using the Tool
Results
Desired Value in a Given Range
Solver
Introduction to Linear Programming
Spreadsheet Modeling
Using Solver
Solver Reports
Integer Programming
Simulation Analysis
Analysis using scenarios
Adding new scenarios
Viewing and managing scenarios
Statistical Analysis
Analysis of Variance
Correlation Tool
Covariance Tool
Descriptive Statistics Tool
Exponential Smoothing Tool
Fourier Analysis Tool
F-Test: Two-Sample for Variances Tool
Histogram Tool
Moving Average Tool
Rank and Percentile Tool
Regression Tool
Sampling Tool
Comparing Means of 2 Populations

Previous
Adding a Hyperlink to a Cell
ContentsNext
Advanced Analysis in Gnumeric
PreviousNext

Advanced Analysis in Gnumeric

There are several kinds of analysis which can be performed using the Gnumeric spreadsheet. These include statistical analysis and linear programming methods. These are described in this chapter.


Previous
Advanced Analysis
ContentsNext
Analysis using Complex Numbers
PreviousNext

Analysis using Complex Numbers

Complex numbers can be used in Gnumeric but, because they are not fundamental types, all the analysis must be done with functions.


Previous
Advanced Analysis in Gnumeric
ContentsNext
Goal Seek Tool
PreviousNext

Goal Seek Tool

Use Goal Seek Tool to search for a value of a single model variable that yields a given desired value of another single variable. For example, you can use the Goal Seek to find the break-even value for sales (the break-even is the amount of sales whose marginal revenue just covers the fixed costs and the profit is thus zero).

Using the Tool

First, select the ``Goal Seek...'' tool item from ``Tools'' menu. Specify the output variable cell (``Set Cell'') by typing the cell reference into the entry or by clicking the worksheet cell. If you are searching for the break-even point, for example, you should specify the cell reference of the profit calculation here.

Specify the desired result for the output variable cell into the ``To Value'' cell. In the search for the break-even, specify this to be zero.

Specify the input variable cell (``By changing cell'') by typing the cell reference into the entry or by clicking the worksheet cell. In the search for the break-even, specify the cell reference of the sales here. When you have done this, you may want to press the ``Apply'' button to start the tool.

Results

Gnumeric will systematically iterate the model by changing the input value to achieve the desired result, if possible. If goal seek was successful the tool displays the message ``Goal Seeking with cell __ found a solution''.

It is possible that Gnumeric does not find a solution that generates the desired result. There may not be such a solution for the model, or, it may be too difficult to find. For example, the mathematical function behind the calculation may have many non-continuous points.

Desired Value in a Given Range

If Gnumeric did not find a solution that generates the desired result, you may want to try to specify a range (minimum and maximum) in which the value of the output variable should be. To do this, specify the ``Minimum'' and ``Maximum'' entries.


Previous
Analysis using Complex Numbers
ContentsNext
Solver
PreviousNext

Solver

With Gnumeric Solver you can solve linear programs.

Introduction to Linear Programming

A linear program (LP) is a problem that can be expressed as linear functions. As you probably already know, a linear function is the one whose graph is always a straight line. Thus each variable of it appears in a separate term with its coefficient. There must be no products or quotients of these variables. In addition, the exponent of each term must be one. No logarithmic, exponential, trigonometric terms are allowed. Especially note that functions like ABS, IF, MAX, and MIN are not linear. Here are a few examples of linear functions:

    3x + y - 5z
    -3.23x + 0.33y
    -0.3x + 4y - 2z + 1.2m
    

The linear problem has a so called objective function which is to be minimized or maximized and constraints. The objective function is the one whose value we would like to optimize. Typically, this function could determine the profit generated by the expected sales of the given model (maximization problem), or, the cost of the production in the given environment (minimization problem). Anyway, on purely mathematical point of view, we could examine the following objective function:

    Maximize 2x + 3y - z
    

In linear programming the variables of this functions are not allowed to take any values (otherwise the maximum of any objective function would be infinity). The problem also has constraints. The constraints are a set of linear functions and a set of their right hand side values (RHS). For example, for the previously defined objective function we have the following constraints:

    x + y <= 5           (#1)
    3x - y + z <= 9      (#2)
    x + y >= 1           (#3)
    x + y + z = 4        (#4)
    x, y, z >= 0         (non-negativity assumption)
    

This constraint set consists of three inequality constraints (#1-#3) and one equality constraint (#4). Their RHS values are 5, 9, 1, and 4. In addition, we also have the non-negativity assumption. That is, all the variables (x, y, and z) have to take only positive numbers. The idea is to find the optimal values for the variables (x, y, and z) but also to satisfy all the given constraints.

Spreadsheet Modeling

To solve optimization problems with Gnumeric you have to type in the problem into a sheet. A recommended way to start with is to allocate a separate column in the spreadsheet for each decision variable (in the previous example the x, y, and z) and a separate row for each constraint (the constraints #1-#4). The coefficients of these variables should be placed into the cells corresponding to the allocated row and the column. It is also recommended that you label the rows and the columns to make the sheet much more readable. The sheet for our maximization problem would look like this:

Figure 6.1. Linear programming example

An image of a worksheet with a linear programing problem.

As you can see, we have put the model variables into cells B3:D3. They are currently all zeros. The cell E4 contains the objective function definition. The easiest way to define it is to use SUMPRODUCT build-in function. Thus in our model, we have the formula `=SUMPRODUCT(B3:D3,B4:D4)' in E3.

The constraints are defined in rows seven to ten. Since the coefficients of these functions are in columns B, C and D we will get the total sum of each of the constraint using the formula `SUMPRODUCT(B$3:D$3,Bn:Dn)' where n is the row number of the constraint. For example, in E7 we have `=SUMPRODUCT(B$3:D$3,B7:D7)', in E8 `=SUMPRODUCT(B$3:D$3,B8:D8)' and so on. The right hand side (RHS) values of the constraints are typed into cells G7:G10.

Using Solver

Solver Parameters

Now it is time to select `Solver...' from the `Tools' menu. After you have done it, the following dialog will appear:

Figure 6.2. The empty Solver dialog.

An image of the solver dialog open to the "Parameters" tab.

Since we have the objective function in E3 type this into the `Set Target Cell:' entry. We are about to maximize this function, thus the radio button `Max' should be pressed on. By default, the problem is assumed to be maximization problem. The input variables (x, y, and z) were in cells B3:D3 so type the cell range into the `By Changing Cells:' entry.

The model to be optimized is a linear model. Thus, we should check that the check button `Linear (LP/MILP)' is pressed on under the `Model Assumptions'. Also make sure that the assume non-negative button is on, otherwise, the input variables can also take negative values. There is also a check button `Assume Integer (Discrete)' which adds an integer constraint for all the input variables. The integer optimization is described, however, later.

A few additional options can be set too. If you want to limit the number of iterations the optimization algorithm is allowed to take you can set the maximum number in the `Max iterations' entry box. Similarly, you can limit the maximum time the optimization is allowed to take in the `Max time' entry box. If either one of these settings is exceeded during the optimization, the optimization is interrupted and an error dialog is displayed.

Some models can be better solved if the model is scaled into another form before the actual optimization. Gnumeric solver supports automatic scaling which can be checked on by using the check button on the bottom of the dialog. Note that the automatic scaling does not change the model since before checking out the results the model is scaled back to its original form.

Solver Constraints

Now we can add the constraints. Select the `Constraints' page from the top of the dialog and the following page should appear.

Figure 6.3. Add constraint dialog.

An image of the solver dialog open to the "Constraints" tab.

In this page, you can see all constraints that have been defined in the `Subject to the Constraints:' window. Since none has been defined, this window should be empty. Now type in the constraints (#1-#4) one by one.

When adding constraints, the three entry boxes in the bottom of the dialog are used. Put a cell name of the total left hand side (LHS) cell into the `Left Hand Side:' entry box. In our example, this would be E7 for the constraint #1, E8 for constraint #2, and so on. The combo entry in the middle defines the type of the constraint. It can be `<=', `=', `>=' , or `Int'. We will explain the `Int' constraints later. In this example, you should select `<=' for constraints #1-#2, `>=' for #3, and `=' for constraint #4. The last entry on the right takes the right hand side values of the constraints. For constraints #1-#4 they should be G7 (5), G8 (9), G9 (1), and G10 (4) in this order.

After typing a constraint press Add button, and you will be able to define the next one. When you have typed in all the constraints, the Solver dialog should look like this:

Figure 6.4. The solver dialog

An image of the solver dialog open to the
              "Constraints" tab with constraints entered.

The order of the constraints does not matter. If you want to change or delete a constraint click it and then press `Change' or `Delete' button.

Note that you can also type ranges into the LHS and RHS entries. For example, you could have typed D7:D8 and G7:G8 instead of the two separate constraints.

If the constraints have now been typed in correctly, we should check what reports we want to produce.

Solver Reporting

Select the `Reports' page from the top of the dialog and the a page containing five check buttons should appear. By pressing these check buttons on, you can produce various kinds of reports. You can read more about solver reporting in the following section.

Optimization

After you have specified the parameters, the constraints and the reporting options it is time to press the `OK' button. If everything went ok, you will see a dialog saying: `Solver found an optimal solution. All constraints and optimality conditions are satisfied.'. This means that the solver found an optimal solution and the optimal values are now stored into the input variables. For all models, this, however, does not happen.

If a feasible solution cannot be found, the solver reports that `A feasible solution could not be found. All specified constraints cannot be met simultaneously.'.

If the model is unbounded, the solver reports that `The Target Cell value specified does not converge! The program is unbounded.'.

If the maximum number of iterations specified in the options was exceeded, the solver reports that `The maximum number of iterations exceeded. The optimal value could not be found.'.

If the maximum time specified in the options was exceeded, the solver reports that `The maximum time exceeded. The optimal value could not be found in given time.'.

Solver Reports

Answer Report

Answer report gives the original and final values for the problem and for all the input variables and the constraints. In addition, for the constraints their formulas, binding status and the slacks are printed out nicely. The answer report is given as a new sheet.

Sensitivity Report

Sensitivity report gives the shadow prices for the constraints.

Note that if the model contains integer or boolean constraints, sensitivity report cannot be produced.

Limits Report

Limits report reports the achieved optimal value all the input variables of the model with the optimal values and with upper and lower bound for the optimal value in with the particular variable could vary without changing the optimal solution.

If an optimal value for a variable x is 4, for example, and the lower bound is 2.4 and upper bound 5.9, then x could take any value between 2.4 and 5.9, and still all the same constraints were binding as with the optimal value 4. In limits report, you can also find the value of the target cell for both upper and lower bound values for the variable. For example, if the optimal value where x is 4 leads to a profit of $5,000, limits report specifies that if x is set to 2.4 the profit drops to $3,640.

Note that if the model contains integer or boolean constraints, limits report cannot be produced.

Performance Report

Performance reports gives various statistical characteristics about the given model like how many variables and rows it contains, and how many non-zero matrix elements it has. It also gives out the performance numbers like how much computing time was required to compute the results.

Program Report

Program report gives the model in its mathematical form. Program report is useful for checking out the correctness of the model. It can also be useful for educational purposes.

Integer Programming

You can use the Solver tool also for integer programming (IP) and more generally mixed integer programming. In integer programming some of the decision variables are required to take on integer values. To do so, just add a constraint whose type is `Int'.


Previous
Goal Seek Tool
ContentsNext
Simulation Analysis
PreviousNext

Simulation Analysis


Previous
Solver
ContentsNext
Analysis using scenarios
PreviousNext

Analysis using scenarios

Adding new scenarios

Viewing and managing scenarios


Previous
Simulation Analysis
ContentsNext
Statistical Analysis
PreviousNext

Statistical Analysis

The data analysis tools package contains tools for statistical data analysis and data sampling. To use these tools select the Data Analysis... item in the Tools menu. This yields a list of tools to choose from. Select one of the tools from the list and press the OK button or double-click on the tool. The tools are described below.

Figure 6.5. Statistical Analysis Tools

An image of the statistical analysis tools
              available through the "Tools" menu.

All tools have the same output options (see Figure 6.6, “Common output options of the data analysis tools”). The results can be printed into a new sheet, into a new workbook, or into a given output range on a sheet of the current workbook. To select the output method select one of the radio buttons inside the Output frame. If you have chosen “Output Range” you must also enter a single range in the entry field.

Select the Autofit Columns option to automatically adjust the widths of the columns in the output range.

Note

If the chosen output range is too small, some of the results will be lost.

Note

The old data in the output range is deleted and cannot be recovered.

Figure 6.6. Common output options of the data analysis tools

An image of the output options dialog used by
              the statistical analysis tools.

To enter a range into an entry field, you can either type the range specification into the text field, or click in the text field and then select the range on the sheet (see Figure 6.7, “Specifying Ranges”).

Figure 6.7. Specifying Ranges

An image of the input range text box used by the
              statistical analysis tools.

Some entry fields accept lists of ranges. To enter these lists, select one range, type a comma, and then select the next range. At any time, you may switch to another sheet of the workbook.

Analysis of Variance

ANOVA: Single Factor Tool

Use this tool to perform a single factor analysis of the variances of given variables. The variables are specified by the “Input Range:” entry. The given range can be grouped into the variables either by columns, by rows or by areas. The “Alpha:” entry specifies the significance level which is by default 5%.

If the first row or first column of the given range, or the first field of each area contains labels, select the “Labels ” option. The names of the variables will be included in the output table.

The results of this analysis of variance are presented in a standard ANOVA table. The “F critical” value is the largest value of F that is statistically significant using the given significance level (“Alpha”).

This tool also calculates the count, sum, average, and the variance of each variable.

Figure 6.8. 1-factor ANOVA Dialog and Example Data

An image of a multilevel single factor ANOVA
              analysis.

Example 6.1. Using the single factor ANOVA

See Figure 6.8, “1-factor ANOVA Dialog and Example Data” for an example of a completed dialog and Figure 6.9, “Output From a 1-factor ANOVA” for the corresponding output.

Figure 6.9. Output From a 1-factor ANOVA

An image of the output from a multilevel single
              factor ANOVA analysis.

ANOVA: Two-Factor Tool

Gnumeric can perform two factor fixed effects ANOVAs with and without replication. The same dialog is used and the appropriate tool is selected depending on whether the number of rows per sample is 1 or larger than 1.

ANOVA: Two-Factor Without Replication Tool

If the number of rows per sample is given as 1, Gnumeric performs a two factor fixed effects ANOVA without replication. Each column of the input range is interpreted as a level of the first factor while each row is interpreted as a level of the second factor.

The first row and column of the range may contain labels for these levels. In this case the “Labels” option should be selected.

The “Alpha:” entry specifies the significance level which is by default 5%.

Example 6.2. Using the 2-factor ANOVA Without Replication Tool

See Figure 6.10, “2-factor ANOVA Without Replication Dialog” for an example of a completed dialog and Figure 6.11, “Output From a 2-factor ANOVA Without Replication” for the corresponding output.

Figure 6.10. 2-factor ANOVA Without Replication Dialog

An image of a two factor ANOVA without
              replication analysis.

Figure 6.11. Output From a 2-factor ANOVA Without Replication

An image of the output from a two factor ANOVA without
              replication analysis.
ANOVA: Two-Factor With Replication Tool

If the number of rows per sample is larger than 1, Gnumeric performs a two factor fixed effects ANOVA with replication. Each column of the input range is interpreted as a level of the first factor while groups of rows (the number of rows in each group given by the “number of rows per sample” value) are interpreted as levels of the second factor.

The first row and column of the range may contain labels for these levels. In this case the “Labels” option should be selected.

The “Alpha:” entry specifies the significance level which is by default 5%.

See Figure 6.12, “2-factor ANOVA With Replication Dialog” for an example of a completed dialog and Figure 6.13, “Output From a 2-factor ANOVA With Replication” for the corresponding output.

Figure 6.12. 2-factor ANOVA With Replication Dialog

An image of a two factor ANOVA with replication
              analysis.

Figure 6.13. Output From a 2-factor ANOVA With Replication

An image of the output from a two factor ANOVA
              with replication analysis.

Gnumeric will estimate missing values for each level combination as the mean of the existing values in that combination. The degrees of freedom are adjusted appropriately.

Correlation Tool

Figure 6.14. Correlation Tool Dialog

An image of the correlation analysis dialog.

The correlation tool calculates the pairwise Pearson correlation coefficients of the given variables. Use this tool to calculate any number of correlation coefficients at the same time. The variables for which the correlations are calculated are specified by the “Input Range:” entry. The input range can consist of either a single range or a comma separated list of ranges. The given range or ranges can be grouped by columns, by rows, or by areas.

If the first row or column of the given ranges, or the first field of each area contains labels, the “Labels” option should be selected.

Figure 6.15. Some Example Data

An image of an example data set for a
              correlation analysis.

Example 6.3. Using the Correlation Tool

For example, you want to calculate the correlation between three variables, one each in columns A, B, and C. Both variables have 10 values in rows 2 to 11 with labels in row 1 (see Figure 6.15, “Some Example Data”).

  1. Enter A1:B11 in the “Input Range:” entry by typing this directly into the entry or clicking in the entry field and then selecting that range on the sheet. In the latter case the entry will also contain the sheet name.

  2. Select the “Columns” radio button next to “Grouped By:”, since each variable is in its own column.

  3. Select the “Labels” option since the first row contains labels. (see Figure 6.16, “Completed Correlation Dialog”).

  4. Specify the output options as described above.

  5. Press the OK button.

The calculated correlations are given in a table with each column and row labeled with the names of the variables. If the names are not given in the input range, Gnumeric generates them. In our example, the correlation between the variables in column A and B, can be found in the second column and third row of the results table (see Figure 6.17, “Correlation Tool Output”).

Figure 6.16. Completed Correlation Dialog

An image of the completed correlation analysis
              dialog.

Figure 6.17. Correlation Tool Output

An image of the output of the correlation
              analysis.

Covariance Tool

Figure 6.18. Covariance Tool Dialog

An image of the covariance analysis
              dialog.

The covariance tool calculates the pairwise covariance coefficients of the given variables. Use this tool to calculate any number of covariance coefficients at the same time. The variables for which the covariances are calculated are specified by the “Input Range:” entry. The input range can consist of either a single range or a comma separated list of ranges. The given range or ranges can be grouped by columns, by rows, or by areas.

If the first row or column of the given ranges, or the first field of each area contains labels, the “Labels” option should be selected.

Figure 6.19. Some Example Data

An image example data for a covariance
              analysis.

Example 6.4. Using The Covariance Tool

For example, you want to calculate the covariance between three variables, one each in columns A, B, and C. Both variables have 10 values in rows 2 to 11 with labels in row 1 (see Figure 6.19, “Some Example Data”).

  1. Enter A1:B11 in the “Input Range:” entry by typing this directly into the entry or clicking in the entry field and then selecting that range on the sheet. In the latter case the entry will also contain the sheet name.

  2. Select the “Columns” radio button next to “Grouped By:”, since each variable is in its own column.

  3. Select the “Labels” option since the first row contains labels.

  4. Specify the output options as described above.

  5. Press the OK button.

The calculated covariances are given in a table with each column and row labeled with the names of the variables. If the names are not given in the input range, Gnumeric generates them. In our example, the covariance between the variables in column A and B, can be found in the second column and third row of the results table (see Figure 6.20, “Covariance Tool Output”).

Figure 6.20. Covariance Tool Output

An image of the output of a covariance analysis.

Descriptive Statistics Tool

Figure 6.21. Descriptive Statistics Tool Dialog

An image of the descriptive statistics dialog.

The descriptive statistics tool calculates various statistics for the given variables and a confidence interval for the population mean. The variables are specified via the “Input Range:” entry. The given range or list of ranges can be grouped into variables by columns, rows, or areas.

This tool can produce four different kinds of statistical data.

  • If the “Summary Statistics” option is selected, this tool calculates the mean, standard error, median, mode, standard deviation, sample variance, kurtosis, skewness, range, minimum, maximum, sum, and count for each variable.

  • If the “Confidence Interval for the Mean” option is selected, the tool calculates confidence intervals for the population mean of each variable. Specify the confidence level in the entry box. The default confidence level is 95%.

    Note

    The interval given will usually be wider than the interval obtained using the CONFIDENCE function. The CONFIDENCE function assumes that the population standard deviation is known. This tool estimates the population standard deviation using the sample standard deviation.

  • If the “Kth Largest:” option is selected, the tool finds the kth largest value of each of the variables. Specify k in the entry box next to the option. The default is 1.

  • If the “Kth Smallest:” option is selected, the tool finds the kth smallest value of each of the variables. Specify k in the entry box next to the option. The default is 1.

If the first entry for each variable contains the label, select the “Labels” option.

Figure 6.22. Some Example Data

An image of some example data for descriptive
              statistics.

Example 6.5. Using the Descriptive Statistics Tool

Figure 6.22, “Some Example Data” shows some example data, Figure 6.23, “The Options Page For Descriptive Statistics” the selected options, and Figure 6.24, “Descriptive Statistics Tool Output” the corresponding output.

Figure 6.23. The Options Page For Descriptive Statistics

An image of some example data for descriptive
              statistics.

Figure 6.24. Descriptive Statistics Tool Output

An image of the output of a descriptive
              statistics analysis.

Exponential Smoothing Tool

Figure 6.25. Exponential Smoothing Tool Dialog

An image of the exponential smooting
              dialog.

The Exponential Smoothing tool performs the exponential smoothing for the given set or sets of values. Each value in the smoothed set is predicted based on the forecast for the prior period. The formula to calculate the forecast is: F(t+1) = F(t) + (1 - dampingFactor) * (A(t) - F(t)), where A(t) is the tth value in the original data set.

Specify the cells containing the datasets in the “Input Range” entry. The entered range or ranges are grouped into datasets either by rows or by columns.

If you have labels in the first cell of each data set, select the “Labels” option.

Specify prior forecast adjustment value in the “Damping factor” entry. A value, for example, between 0.2 and 0.3 represents 20 to 30 percent error adjustment in the prior forecast.

If you want to have the standard errors output as well, press the checkbutton on before starting the tool. The standard errors are calculated using the following formula: e(t) = SQRT ( ((A(t-3)-F(t-3))^2 + (A(t-2)-F(t-2))^2 + (A(t-1)-F(t-1))^2) / 3 ).

Figure 6.26. Some Example Data for the Exponential Smoothing Tool

An image of example data for exponential
              smoothing.

Example 6.6. Using the Exponential Smoothing Tool

Figure 6.26, “Some Example Data for the Exponential Smoothing Tool” shows some example data and Figure 6.27, “Exponential Smoothing Tool Output” the corresponding output.

Figure 6.27. Exponential Smoothing Tool Output

An image of the output of an exponential
              smoothing analysis.

Fourier Analysis Tool

Figure 6.28. Fourier Analysis Tool Dialog

An image of the fourier analysis
              dialog.

The Fourier Analysis tool normally performs a Fast Fourier Transform to obtain the discrete fourier transform Fs of the given sequence ft of real numbers according to the formula given in Figure 6.29, “Fourier Analysis Formulae”.

Select the “Inverse” option to calculate the inverse discrete fourier transform ft of the given sequence Fs of real numbers

Note

If the given sequences does not contain a number of terms that is a power of 2 (i.e. 2, 4, 8, 16, 32, 64, 128, etc.), this tool will append zeros to reach such a power of 2!

Specify the cells containing the datasets in the “Input Range” entry. The entered range or ranges are grouped into sequences either by rows or by columns.

If you have labels in the first cell of each data set, select the “Labels” option.

Figure 6.29. Fourier Analysis Formulae

The formulae used in a fourier analysis.
Note

Before using the numbers obtained by this tool, ensure that these are in fact the correct formulae for your discipline. In the physical sciences this fourier transform tends to be called the inverse fourier transform and vice versa. Moreover, frequently the scaling factor varies.

For example Mathematica uses the terms fourier transform and inverse fourier transform with the reversed meaning than Gnumeric and it uses a scaling factor of 1/SQRT(N) rather than 1/N.

F-Test: Two-Sample for Variances Tool

Figure 6.30. F-Test Tool Dialog

An image of the dialog for an F-test analysis of
              the equality of two variances.

Use the F-Test tool to test whether two population variances are different against the null hypothesis that they are not.

Specify the variables in the “Variable 1 Range:” and “Variable 2 Range:” entries. The “Alpha:” entry contains the significance level which is by default 5%.

If the first field of each range contains labels, select the “Labels” option. The names of the variables will be included in the output table.

The results are given in a table. This table contains the mean, variance, count of observations and the degree of freedom for both variables. The output table also includes the F-value, the one-tailed probability for the F-value, and the F Critical value for one-tailed test and the corresponding values for a two tailed test. The one-tailed probability for the F-value (“P(F<=f) one-tail” row) is the probability of making a Type I error in the one-tailed test. Similarly, the two-tailed probability for the F-value (“P two-tail” row) is the probability of making a Type I error in the two-tailed test. Since in the two-tailed F-Test both critical values are positive, the “F Critical two-tail” row contains two numbers.

If the output is directed into a specific output range, that range should contain at least three columns and eight rows.

Figure 6.31. Some Example Data

An image of some example data for an F-test of
              the equality of two variances.

Example 6.7. Using the F-Test Tool

Figure 6.31, “Some Example Data” shows some example data and Figure 6.32, “F-Test Tool Output” the corresponding output.

Figure 6.32. F-Test Tool Output

An image of the output of an F-test analysis of
              the equality of two variances.

Histogram Tool

Introduction

Figure 6.33. Histogram Tool Dialog

An image of the dialog to generate various
              histograms open to the "Input" tab.

The histogram calculates several kinds of histograms for one or more variables. The types of histogram created are determined by the options selected.

As shown in Figure 6.33, “Histogram Tool Dialog”, the histogram dialog has four tabs. We will introduce them in sequence.

The “Input” Tab

The “Input” tab contains the field specifying the data to be used for the histogram.

The “Input Range” entry contains a single range or a list of ranges, that can be grouped into variables by rows, columns, or areas. The “Bin Range” entry contains a single range of cutoff values. Both ranges may also include labels.

If the first row or column of the given input ranges, or the first field of each area contains labels, the “Input Labels” option should be selected.

The “Bins” Tab

Figure 6.34. Histogram Tool Dialog “Bins Tab

An image of the dialog to generate various
              histograms open to the "Bins" tab.

The bins (or classes) for the histogram can either be predetermined by data contained in your workbook or calculated by the histogram tool.

Select the “Predetermined Bins” option to specify data on your worksheet in the “Bin Range:” entry. The range should consist of a sigle column or two columns (the first one containing labels). If the first column of the bin range contains labels, select the “Bin Labels” option. The values in the last column are used as seprators between adjacent bins.

Select the “Calculated Bins” option to have the bins determined by the tool. Enter the desired number of bins in the “N:” entry. It is recommended (but optional) that you specify the minimum and maximum cutoffs in the “Min:” and “Max:” entries.

The “Options” Tab

The options in the options tab modify the appearance of the histogram:

  • The “Pareto” option causes the bins to be sorted by decreasing frequency of the first variable.

  • The “Percentages” option adds a histogram in terms of percentages rather than frequencies.

  • The “Cumulative Percentages” option adds a cumulative histogram.

  • The “Chart” option is not implemented.

The “Output” Tab

The Output tab contains the standard output options and fields described at the begining of the section called “Statistical Analysis”.

A Histogram Example

Figure 6.35. Some Example Data

An image of some example data for use with the
              histogram tool.

Figure 6.36. Specifying Bins

An image of selecting the bins for the example
              data used with the histogram tool.

Example 6.8. Using the Histogram Tool

For example, you want to calculate a histogram and a cumulative histogram in percentages for a the number of successes in several sequences of trials. The numbers of successes are recorded in column A and the classes of interest in column D with labels in column C (see Figure 6.35, “Some Example Data”).

  1. Enter A1:A21 in the “Input Range:” entry of the “Input” tab by typing this directly into the entry or clicking in the entry field and then selecting that range on the sheet. In the latter case the entry will also contain the sheet name.

  2. Since you only have one variable select the “Areas” or “Columns” radio button next to “Grouped By:”.

  3. Select the “Input Labels” option since the first cell of the Input Range contains a label.

  4. Enter C1:D5 in the “Bin Range:” entry of the “Bins” tab. The “Predetermined Bins” option will now also be selected (see Figure 6.36, “Specifying Bins”).

  5. Select the “Bin Labels” option since the first column of the Bin Range contains labels.

  6. Select the “Percentage” and “Cumulative Percentages” options of the “Options” tab.

  7. In the “Output” tab, specify the output options as described at the begining of the section called “Statistical Analysis”.

  8. Press the OK button.

The results are shown in Figure 6.37, “Histogram Tool Output”.

Figure 6.37. Histogram Tool Output

An image of the output from the histogram
              analysis tool.

Moving Average Tool

Figure 6.38. Moving Average Tool Dialog

An image of the dialog for the moving average
              analysis tool.

Use the moving average tool to calculate moving averages of one or more data sets. A moving average provides useful trend information of the data that is lost in a simple average. In addition, moving averages can be used to eliminate random variance. For example, use this tool to create a smoother curve of a stock prize.

Specify the cells containing the datasets in the “Input Range” entry. The entered range or ranges are grouped into datasets either by rows or by columns.

If you have labels in the first cell of each data set, select the “Labels” option.

Specify the “Interval” for the moving average. The interval i is the number of consecutive values to be included in each moving average.

The results are given in one column for each dataset Each row represents the moving average of the corresponding row or column in the input range. The moving average cannot be calculated for the first k rows in the input range where k is smaller than the given interval i.

Figure 6.39. Some Example Data for the Moving Average Tool

An image of some example data for use with the
              moving average analysis tool.

Example 6.9. Using the Moving Average Tool

Figure 6.39, “Some Example Data for the Moving Average Tool” shows some example data and Figure 6.40, “Moving Averages Tool Output” the corresponding output.

Figure 6.40. Moving Averages Tool Output

An image of the output from the moving average
              analysis tool.

Rank and Percentile Tool

Figure 6.41. Rank and Percentile Tool Dialog

An image of the rank and percentile analysis
              tool.

Use this tool to rank given data and to calculate the percentiles of each data point.

Specify the datasets to use in the “Input Range:” entry. The given range can be grouped into datasets by columns, by rows, or by areas.

For each dataset, the tool creates three columns in the output table:

  1. The first column gives the indices of the ordered data from largest to smallest data value.

  2. The second column gives data values corresponding to the indices in the first column.

  3. The third column indicates the percentile of the data value in the second column.

If you have labels in the first cell of each data set, select the “Labels” option.

Figure 6.42. Some Example Data for the Rank and Percentile Tool

An image of example data for use with the rank
              and percentile analysis tool.

Example 6.10. Using the Rank and Percentile Tool

Figure 6.42, “Some Example Data for the Rank and Percentile Tool” shows some example data and Figure 6.43, “Rank and Percentile Tool Output” the corresponding output.

Figure 6.43. Rank and Percentile Tool Output

An image of the output from a rank and
              percentile analysis.
Note

In the case of ties, the rank calculated by this tool differs from the value of the RANK function for the same data. This tool calculates the rank as it is normally used in Statistics: If two values are tied, the assigned rank is the average rank for those entries. For example in Figure 6.42, “Some Example Data for the Rank and Percentile Tool” the two values 10 are the second and third largest values. Since they are equal each receives the rank of 2.5, the average of 2 and 3. The rank function on the other hand assigns the rank as it is normally used to determine placements. The two values 10 would therefore each receive a rank of 2.

Regression Tool

Figure 6.44. Regression Tool Dialog

An image of the regression tool dialog.

The regression tool performs a multiple regression analysis.

Enter a range or list of ranges containing the independent variables into the “X Variables:” entry. These ranges can be grouped into the various independent variables by columns, by rows, or by areas. Select the appropriate option.

Enter a single range containing the dependent variable into the “Y Variable:” entry.

If the ranges for the independent and dependent variables also contains labels in the first field of each row, column or area, select the “ Labels” option.

Specify the confidence level in the “Confidence Level:” entry. The default is 95%.

To force the regression line or plane to pass through the origin, select the “Force Intercept To Be Zero” option.

Specify the output options as described above. If the output is directed into a specific output range, that range should contain at least seven columns and 17 rows more than there are independent variables.

Figure 6.45. Regression Example Data

An image of example data for use with the
              regression tool.

Example 6.11. Using the Regression Tool

Suppose you want to perform a regression analysis on the data given in Figure 6.45, “Regression Example Data” using v and y as independent variables and u as dependent variable.

  1. Enter B1:B9,E1:E9 in the “X Variables:” entry by typing this directly into the entry or clicking in the entry field and then selecting the first part range on the sheet, typing comma, and then selecting the second range. In the latter case the entry will also contain the sheet name.

  2. Enter A1:A9 in the “Y Variable:” entry.

  3. Select the “Columns” or “Areas” option since each variable is in its own column and also its own area.

  4. Select the “Labels” option since the first row contains labels. (see Figure 6.46, “Completed Regression Dialog”).

  5. Specify the output options as described above.

  6. Press the OK button.

The output of this regression analysis is shown in Figure 6.47, “Regression Tool Output”.

Figure 6.46. Completed Regression Dialog

An image of the regression tool dialog with the
              required fields completed.

Figure 6.47. Regression Tool Output

An image of the output from a regression
              analysis.

Sampling Tool

Figure 6.48. Sampling Tool Dialog

An image of the sampling tool.

Use the sampling tool to take a sample of a data set. This tool can take both a random sample of a given size or a periodic sample:

random sample

A random sample is a subset of the population such that every subset of that size has the same chance of being picked.

periodic sample

In a periodic sample every kth element in the population is selected.

To use this tool, first specify the data set or data sets by setting the “Input Range:” entry. The range or ranges given can be grouped into datasets by rows, by columns, or by areas.

If the first entry in each data set contains a variable, select the “Labels” option.

Select the sampling method which can be either periodic or random.

random sample

Specify the size of the random sample in the “Size of Sample:” entry.

periodic sample

Specify the period in the “Period:” entry.

Specify the number of samples you would like to obtain in the “ Number of Samples:” entry.

Note

Since the period uniquely determines a periodic sample, if you specify that you would like 2 samples you will be given the identical sample twice.

Note

If the dataset for a periodic sample is a two dimensional range, Gnumeric will enumerate the data points by row first.

Figure 6.49. Some Example Data for the Sampling Tool

An image of example data for use with the
              sampling tool.

Example 6.12. Using the Sampling Tool

Figure 6.49, “Some Example Data for the Sampling Tool” shows some example data and Figure 6.50, “Sampling Tool Output” the corresponding output.

Figure 6.50. Sampling Tool Output

An image of the output from the sampling
              tool.

Comparing Means of 2 Populations

Gnumeric provides 4 similar tools to test whether the difference of two population means is equal to a hypothesized value. These four tools use the same dialog (see Figure 6.51, “t- and z-Test Tool Dialog”).

Figure 6.51. t- and z-Test Tool Dialog

An image of the t-test and z-test dialog.

Depending on the options settings, the appropriate test will be performed. The entries in the “Input”, “Test”, and “Output” frames are independent from the specific test.

Enter the first variable in the “Variable 1 Range” entry and the second variable in the “Variable 2 Range” entry.

Enter the hypothesized difference between the population means in the “Hypothesized Mean Difference” entry, which has a default of 0. Enter the significance level in the “Alpha” entry, which has a default of 5 %.

Specify the output options as described above. If the output is printed into a range, it should have at least three columns and ten rows.

There are up to three possible options that can be selected:

Paired” versus “Unpaired

If the variables are dependent (or paired) select the “Paired” option.

Known” versus “Unknown

For unpaired or independent variables, the population variances may be known or unknown. In the latter case they will be estimated using the sample variances. Select the “Known” option if you in fact know the population variances prior to collecting the sample.

Equal” versus “Unequal

For paired variables with unknown population variances, we may either assume that the population variances are equal or not. If the population variances are assumed to be equal, Gnumeric will estimate the common variance by pooling the sample variances. Select the “Equal” option to assume that the population variances are equal.

t-Test: Paired Two Sample for Means Tool

Figure 6.52. t-Test (Paired) Tool Dialog Options

An image of the options for the t-test.

For paired variables, when you click on “OK”, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.

Example 6.13. Using the t-Test (Paired) Tool

See Figure 6.53, “t-Test (Paired) Example Data” for an example of a completed dialog and Figure 6.54, “Output from the t-Test (Paired) Tool” for the corresponding output.

Figure 6.53. t-Test (Paired) Example Data

An image of the example for a t-test.

Figure 6.54. Output from the t-Test (Paired) Tool

An image of the output results from a t-test.

t-Test: Two-Sample Assuming Equal Variances Tool

Figure 6.55. t-Test (Equal Variances) Tool Dialog Options

An image of the options for a t-test
              analysis of two samples with equal variances.

For unpaired variables with unknown but assumed equal population variances, when you click on “OK”, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.

Example 6.14. Using the t-Test (Unknown but Equal Variances) Tool

See Figure 6.56, “t-Test (Unknown but Equal Variances) Example Data” for an example of a completed dialog and Figure 6.57, “Output from the t-Test (Unknown but Equal Variances) Tool” for the corresponding output.

Figure 6.56. t-Test (Unknown but Equal Variances) Example Data

An image of example data for use with a t-test
              with unknown but equal variances.

Figure 6.57. Output from the t-Test (Unknown but Equal Variances) Tool

An image of the output from a t-test
              with unknown but equal variances.

t-Test: Two-Sample Assuming Unequal Variances Tool

Figure 6.58. t-Test (Unknown and Unequal Variances) Tool Dialog Options

An image of the options in a t-test of two
              samples with unknown and possibly unequal
              variances.

For unpaired variables with unknown and assumed unequal population variances, when you click on “OK”, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.

Example 6.15. Using the t-Test (Unknown and Unequal Variances) Tool

See Figure 6.59, “t-Test (Unknown and Unequal Variances) Example Data” for an example of a completed dialog and Figure 6.60, “Output from the t-Test (Unknown and Unequal Variances) Tool” for the corresponding output.

Figure 6.59. t-Test (Unknown and Unequal Variances) Example Data

An image of example data for use in a t-test of two
              samples with unknown and possibly unequal
              variances.

Figure 6.60. Output from the t-Test (Unknown and Unequal Variances) Tool

An image of the output of a t-test of two
              samples with unknown and possibly unequal
              variances.

z-Test: Two Samples for Means Tool

Figure 6.61. z-Test Tool Dialog Options

An image of the options in a z-test of two
              samples.

For unpaired variables with known population variances, enter those variances in the “Variable 1 Pop. Variance” and “Variable 2 Pop. Variance” entries. When you click on “OK”, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.

Example 6.16. Using the z-Test Tool

See Figure 6.62, “z-Test Example Data” for an example of a completed dialog and Figure 6.63, “Output from the z-Test Tool” for the corresponding output.

Figure 6.62. z-Test Example Data

An image of example data for use in a z-test of two
              samples.

Figure 6.63. Output from the z-Test Tool

An image of the output from a z-test of two
            samples.

Previous
Analysis using scenarios
ContentsNext
Graphics: Plots, Images and Drawings
PreviousNext

Chapter 7. Graphics: Plots, Images and Drawings

This chapter explains how to use Gnumeric to add graphical elements to a worksheet. Data plots allow users to create charts of data in a worksheet including pie charts, bar and column charts and scatterplots. Images in standard computer formats can be added on top of a worksheet. Drawings allow users to add simple graphical elements on top of a worksheet including lines, arrows and simple polygons.

Table of Contents

Adding Graphical Elements to a Worksheet
Adding Data Plots to a Worksheet
Creating a Basic Graph
Advanced Graphing
Adding Images to a Worksheet
Adding Drawing and Graphical Interface Elements to a Worksheet
Drawing Lines.
Drawing Arrows.
Drawing Ovals.
Drawing Rectangles.
Adding Labels.
Adding Frames.
Adding Checkboxes.
Adding Scrollbars.
Adding Spinbuttons.
Adding Sliders.
Drawing Lines.
Adding Combination Boxes.

Previous
Statistical Analysis
ContentsNext
Adding Graphical Elements to a Worksheet
PreviousNext

Adding Graphical Elements to a Worksheet

Gnumeric


Previous
Graphics: Plots, Images and Drawings
ContentsNext
Adding Data Plots to a Worksheet
PreviousNext

Adding Data Plots to a Worksheet

Gnumeric can create graphical plots of the data contained in a worksheet. Gnumeric can make the following graph types:

Creating a Basic Graph

Creating a basic graph is a relativly straight forward process.

  1. Enter data into your spreadsheet.

  2. Select the data you wish to include in the graph. This includes labels for rows and columns.

  3. Click the Graph button. This is the button on the standard toolbar which has three columns of different colours, just to the left of the zomm box.

  4. Select the type of graph you wish to use.

  5. Click Finish to use the default settings.

  6. Press and hold on the spreadsheet to start to draw your graph. A box will form. Drag the box to the size you wish the graph to be and let go. The graph will be drawn.

Advanced Graphing

In no way does graphing in Gnumeric stop with a simple graph. In the graphs you make, you can customize it. For example, you can say which cells define the ranges or labels. If a label for a field is in paraenthesis, it means that field is optional.

Selecting Data Ranges

In the second step of the graphing assistant, you'll find you can customize the ranges which are taken into account for drawing the graph.

At the top of the window is a preview of the graph. Below that are your settings. When you change a setting, the sample graph will change automatically to reflect your customizations.

Plot

A graph is made up of plots. Currently, Gnumeric can only generate one graph from a spreadsheet. However, you can import an Excel spreadsheet to use multiple plots. You can customize the data ranges of each plot.

Series

A the section called “Plot” is made up of a group of series. A series is each item that is to be graphed.

Example 7.1. Series Example

A small Boston based software company is doing a spreadsheet for their montly income and spendings. The month goes on the x-axis while the dollars spent a month goes on the y-axis. Two bars are drawn for each month: in and out. In and out are the two series.

You can customize the ranges for every series included in your graph.

Name Data Range

The Name field defines what the name of each series is. This is reflected in the legend. Per the Example 7.1, “Series Example”, the name for the first series would be in.

The Name field takes a simple reference. The reference field needs what sheet and cell the information is stored on. For more information on references, please consult the section called “Cell Referencing”.

Example 7.2. Name Example

A name needs to be derived from Sheet1 and cell B1. The name field would include:

		Sheet1!$B$1
	      

Values Data Range

The Values field defines which data should be included in the graph. The Values field takes two arguements. The reference requires the sheet name and cell range the information is located on. For more information on references, please consult the section called “Cell Referencing”.

Example 7.3. Values Example

A series needs to have information graphed from Sheet1, using cells B2 through B13. The following would be inserted into Values:

		Sheet1!$B$2:$B$13
	      

Category Labels Data Range

The Category Labels field sets what cells are used to derive the labels on the x-axis. The Category Labels takes a simple reference. The reference needs the sheet name and cell ranges that the information is on. For more information on references, please consult the section called “Cell Referencing”.

Example 7.4. Category Labels Example

A graph needs to be generated that uses labels defined on Sheet1, using cells A2 or A13. The following would be inserted into Category Labels:

		Sheet1$A$2:$A$13
	      

Customizing Graph Layout

The graph layout can be customized using the third step of the graphing assistant.

At this time, only the legend position can be edited. This is done by selecting the Position radio buttons at the bottom of the window. The demo graph will be updated accordingly.


Previous
Adding Graphical Elements to a Worksheet
ContentsNext
Adding Images to a Worksheet
PreviousNext

Adding Images to a Worksheet

Gnumeric


Previous
Adding Data Plots to a Worksheet
ContentsNext
Adding Drawing and Graphical Interface Elements to a Worksheet
PreviousNext

Adding Drawing and Graphical Interface Elements to a Worksheet

A Gnumeric worksheet can contain graphical elements above the sheet grid layer both to allow simple drawings and to allow the inclusion of a limited number of user interface elements.

All of these elements are added using the toolbar which contains icons for the elements. This toolbar may not be visible in which case it will have to be made visible using the View menu and selecting the Toolbars menu item (see the section called “Configuring Gnumeric Toolbars” for a detailed explanation. The basic process to add any of these elements is to click with the left hand mouse button on the toolbar icon representing the element to be added and then to click on the sheet grid. The element will then appear on the worksheet and can be moved and resized like all of the graphical elements in Gnumeric. The next sections explain in turn how to use each these elements.

Drawing Lines.

Drawing Arrows.

Drawing Ovals.

Drawing Rectangles.

Adding Labels.

Adding Frames.

Adding Checkboxes.

Adding Scrollbars.

Adding Spinbuttons.

Adding Sliders.

Drawing Lines.

Adding Combination Boxes.


Previous
Adding Images to a Worksheet
ContentsNext
Managing and Viewing Worksheets
PreviousNext

Chapter 8. Managing and Viewing Worksheets

This chapter explains how to manage worksheets and manipulate the view of the worksheet contents.

Table of Contents

An Overview of Worksheets and Views
Manipulating Whole Columns and Rows
Manipulating Columns
Manipulating Rows
Managing Worksheets
The Sheet Management Dialog
Duplicating a Worksheet
Adding a Blank Worksheet
Renaming a Worksheet
Removing Worksheets
Viewing Worksheet Contents
Zoom: Changing the Scale of a View
Moving the View
Having Multiple Views of a Worksheet
Freezing a Portion of a Worksheet View
Grouping and Outlining Cells in a Worksheet

Previous
Adding Drawing and Graphical Interface Elements to a Worksheet
ContentsNext
An Overview of Worksheets and Views
PreviousNext

An Overview of Worksheets and Views

Each workbook (or file) can contain multiple worksheets which hold both the cell grid and graphical objects such as charts and drawing elements. The collection of worksheets can be manipulated allowing the addition, duplication, deletion and re-ordering of worksheets within a workbook. Gnumeric includes several techniques to work simultaneously with several different views of the same workbook, to fix parts of a worksheet and scroll others or to group data within a worksheet for convinient editing and analysis.

This chapter has not yet been written.


Previous
Managing and Viewing Worksheets
ContentsNext
Manipulating Whole Columns and Rows
PreviousNext

Manipulating Whole Columns and Rows

This section has not yet been written.

Manipulating Columns

This section has not yet been written.

Manipulating Rows

This section has not yet been written.


Previous
An Overview of Worksheets and Views
ContentsNext
Managing Worksheets
PreviousNext

Managing Worksheets

This section has not yet been written.

The Sheet Management Dialog

This section has not yet been written.

Duplicating a Worksheet

This section has not yet been written.

Adding a Blank Worksheet

This section has not yet been written.

Renaming a Worksheet

This section has not yet been written.

Removing Worksheets

This section has not yet been written.

Warning

This operation cannot be undone through the undo button and the history mechanism. Deleted sheets are permanently deleted.


Previous
Manipulating Whole Columns and Rows
ContentsNext
Viewing Worksheet Contents
PreviousNext

Viewing Worksheet Contents

This section has not yet been written.

Zoom: Changing the Scale of a View

This section has not yet been written.

Moving the View

This section has not yet been written.

Having Multiple Views of a Worksheet

This section has not yet been written.

The location of new views

This section has not yet been written.

View sharing

This section has not yet been written.

Freezing a Portion of a Worksheet View

This section has not yet been written.

Grouping and Outlining Cells in a Worksheet

This section has not yet been written.


Previous
Managing Worksheets
ContentsNext
Workbook Settings
PreviousNext

Chapter 9. Workbook Settings

This chapter explains the contents of a Gnumeric workbook which are not part of the worksheets. This includes several settings which apply to the workbook and are saved in the Gnumeric file. Settings which apply to the Gnumeric program itself are called `preferences' and are explained in Chapter 10, Configuring Gnumeric.

Table of Contents

Overview of the File Contents and Settings
Document Summary
Document Settings
Document Printing Settings
Document Autosave Settings
Document Autocorrection Settings
Document View Settings
Document Protection Settings
Document Validation Settings
Document Recalculation Lag Settings
Document Named Elements

Previous
Viewing Worksheet Contents
ContentsNext
Overview of the File Contents and Settings
PreviousNext

Overview of the File Contents and Settings

The contents of a Gnumeric file describe all of the elements which can be changed by the user. This sections examines all of the workbook contents which are not part of the worksheets.

This chapter has not yet been written.


Previous
Workbook Settings
ContentsNext
Document Summary
PreviousNext

Document Summary

A small amount of metadata is associated with each document. These metadata describe the author of the document and other related information.


Previous
Overview of the File Contents and Settings
ContentsNext
Document Settings
PreviousNext

Document Settings

Document Printing Settings

Document Autosave Settings

Document Autocorrection Settings

Document View Settings

Document Protection Settings

Document Validation Settings

Document Recalculation Lag Settings


Previous
Document Summary
ContentsNext
Document Named Elements
PreviousNext

Document Named Elements


Previous
Document Settings
ContentsNext
Configuring Gnumeric
PreviousNext

Chapter 10. Configuring Gnumeric

This chapter explains how to change the default behaviour of Gnumeric including the startup behaviour and default locale (language and number display).

Table of Contents

Configuring Gnumeric
Configuring Gnumeric Toolbars
Configuring Gnumeric Preferences
Configuring Gnumeric Plugins
Configuring the Language and Local Settings of Gnumeric

Previous
Document Named Elements
ContentsNext
Configuring Gnumeric
PreviousNext

Configuring Gnumeric


Previous
Configuring Gnumeric
ContentsNext
Configuring Gnumeric Toolbars
PreviousNext

Configuring Gnumeric Toolbars


Previous
Configuring Gnumeric
ContentsNext
Configuring Gnumeric Preferences
PreviousNext

Configuring Gnumeric Preferences

The Preferences Dialog allows to configure various aspects of Gnumeric.

TIP

When your cursor hovers over an entry field or checkbox, a tooltip may appear outlining the effect of the option.

The Preferences Dialog has several pages. Each page addresses a certain aspects of using Gnumeric.

Figure 10.1. General Font Tab

The General Font Tab sets the default font name, size and style to be used in the cells on every sheet.

Figure 10.2. Header & Footer Font Tab

The Header & Footer Font Tab sets the default font name, size and style for the headers and footers of each page when printed. THe content of the headers and footers is determined via the Page Setup dialog, detailed in the section called “Page Setup.”

Figure 10.3. Windows Tab

The Windows Tab includes various settings related to new workbooks, such as the window size and the number of intial sheets.

Figure 10.4. Files Tab

The Files Tab provides settings related to the handling of files.

TIP

If you are usually using one of a small number of documents, you should set the Length of File History to be slightly larger than the number of these documents.

Figure 10.5. Undo Tab

The Undo Tab permits to customize the undo feature. You would normally like the number of undo items to be in the 10 to 25 range and the maximal undo size to be 10000 to 100000, unless you only have little memory available.

Figure 10.6. Sorting Tab

The Sorting Tab allows to determine the default settings for the Sort Dialog. See the ???

Figure 10.7. Various Tab

The Various Tab includes a variety of options that did not fit within any of the other tabs.

Figure 10.8. Various (Internal) Tab

The Various (Internal) Tab includes a variety of options that customize the internal working of Gnumeric.

WARNING

Do not change any of the settings in the Various (Internal) Tab without serious consideration.


Previous
Configuring Gnumeric Toolbars
ContentsNext
Configuring Gnumeric Plugins
PreviousNext

Configuring Gnumeric Plugins


Previous
Configuring Gnumeric Preferences
ContentsNext
Configuring the Language and Local Settings of Gnumeric
PreviousNext

Configuring the Language and Local Settings of Gnumeric

This section has not yet been written.


Previous
Configuring Gnumeric Plugins
ContentsNext
File Opening and Saving
PreviousNext

Chapter 11. File Opening and Saving

This chapter explains how to use files in Gnumeric including how to save the current file, how to change the file format of saved files and how to open files from a different format.

Table of Contents

Working with Files
Opening and Importing Files
Opening Files
Importing Files
File Formats
Saving Files
AutoSave Tool

Previous
Configuring the Language and Local Settings of Gnumeric
ContentsNext
Working with Files
PreviousNext

Working with Files


Previous
File Opening and Saving
ContentsNext
Opening and Importing Files
PreviousNext

Opening and Importing Files

There are several ways to open an existing file to be used in Gnumeric. Usually, a given file can be opened in Gnumeric if Gnumeric also allows the file to be saved in the same format. Other file formats may be imported into Gnumeric (see the section called “File Formats” for a list of supported formats).

Opening Files

The Open File Dialog can be invoked several ways. It is available in the Menubar from the File/ Open.. menuitem (see the section called “The File Menu”). There is also a toolbar Open (see the section called “The Standard Toolbar”). All these methods are equivalent.

Opening a file

Menubar

File/ Open..

Standard Toolbar

An image of the open file button.&nbsp; Open

Keyboard Shortcut

F3

Importing Files

The Import File Dialog can be invoked in the Menubar from the File/ Import.. menuitem (see the section called “The File Menu”).

Importing a file

Menubar

File/ Save as...

File Formats

In the Save as.. dialog you can choose between various file formats. (see Figure 11.1, “File Format Selector”)

Figure 11.1. File Format Selector

An image of the list of supported file types.

Similarly, in the Import.. dialog you can also choose between various file formats. (see Figure 11.2, “File Format Selector”)

Figure 11.2. File Format Selector

An image of the supported importing file formats.

Most of these formats are provided by plug-ins. If they don't appear on your list of available plug-ins use the Tools Plug-ins... menu item to verify that the appropriate plug-in has been loaded.

Gnumeric XML File Format

The default file format and Gnumeric's native format is an xml based file. The file format is a ascii text based xml format. It is however, typically written and read in a gzip compressed form.

The uncompressed format is human readable and designed to be easily parsed. It is very extensible.

Data Interchange Format

This format is supported by the “Data Interchange Format (DIF) module” plug-in.

Note

This format is available when saving or importing files.

DVI TeX Format

This format is supported by the “HTML & TeX” plug-in.

Note

This format is only available when saving files.

Creation of a dvi file with Gnumeric requires that groff has been installed. If a complete TeX installation is available it is probably advisable to use the LaTeX format (the section called “LaTeX 2e Format”) instead, since the created LaTeX file can be extensively customized before creating the dvi file from it.

Figure 11.3. Gnumeric Sample Screenshot

An image of currency data in Gnumeric .

Example 11.1. Saving as DVI TeX

The screenshot Figure 11.3, “Gnumeric Sample Screenshot” shows an example Gnumeric file. If we save this file in DVI TeX format and open it using xdvi we obtain Figure 11.4, “xdvi Screenshot of DVI TeX File”.

Figure 11.4. xdvi Screenshot of DVI TeX File

An image of DVI ouput from
              Gnumeric.

MS Excel (tm) File Formats

This format is supported by the “MS Excel (tm) File Formats” plug-in.

Gnumeric can open files from most recent versions of MS Excel (tm). It can also save files in MS Excel (tm) 95 format.

Experimental Bonobo EFS Format

This format is supported by the “EXPERIMENTAL SAX based XML” plug-in.

Note

This format is available when importing or saving files.

Gnome Glossary PO File Format

This format is supported by the “Gnome Glossary” plug-in.

Note

This format is only available when saving files.

HTML File Formats

These formats are supported by the “HTML & TeX” plug-in.

HTML generated by Gnumeric
Note

This format is only available when importing or opening files.

Very simple and well structured HTML tables can be opened by Gnumeric into an appropriate spreadsheet. In this process, Gnumeric will lose information on merged cells and most other formatting, but the main cell values should be preserved.

HTML 3.2 File Format
Note

This format is only available when saving files.

Gnumeric can create HTML 3.2 files. All sheets of the current workbook are exported. The tables in the HTML 3.2 file contain all cells, whether visible or not, including merged cells and spans. Horizontal as well as vertical alignment is preserved, as are font colors and some font characteristics (italic, bold). These files also include an appropriate preamble.

Example 11.2. Saving as HTML 3.2

The screenshot Figure 11.3, “Gnumeric Sample Screenshot” shows an example Gnumeric file. If we save this file in HTML 3.2 format and open it using Mozilla 0.95 we obtain Figure 11.5, “Mozilla Screenshot of HTML 3.2 File”.

Figure 11.5. Mozilla Screenshot of HTML 3.2 File

An image of html output.
HTML 4.0 File Format
Note

This format is only available when saving files.

Gnumeric can create HTML 4.0 files. All sheets of the current workbook are exported. The tables in the HTML 4.0 file contain all cells, whether visible or not, including merged cells and spans. Horizontal as well as vertical alignment is preserved, as are some font characteristics (italic, bold) and cell background colors. These files also include an appropriate preamble.

Example 11.3. Saving as HTML 4.0

The screenshot Figure 11.3, “Gnumeric Sample Screenshot” shows an example Gnumeric file. If we save this file in HTML 4.0 format and open it using Mozilla 0.95 we obtain Figure 11.6, “Mozilla Screenshot of HTML 4.0 File”.

Figure 11.6. Mozilla Screenshot of HTML 4.0 File

An image of the html4.0 export format.
HTML Fragment Format
Note

This format is only available when saving files.

Gnumeric can create HTML fragments. All sheets of the current workbook are exported. The tables in such a fragment file contain all cells, whether visible or not, including merged cells and spans. Horizontal as well as vertical alignment is preserved, as are some font characteristics (italic, bold) as well as cell background and font colors. These files do not contain any preamble. Note that each tag used in these files is valid in some HTML version, the combination of these tags in a Gnumeric generated HTML fragment may not be.

Example 11.4. Saving as HTML fragment

The screenshot Figure 11.3, “Gnumeric Sample Screenshot” shows an example Gnumeric file. If we save this file as an HTML fragment and open it using Mozilla 0.95 we obtain Figure 11.7, “Mozilla Screenshot of HTML Fragment”.

Figure 11.7. Mozilla Screenshot of HTML Fragment

An image of an html table.

LaTeX 2e Format

This format is supported by the “HTML & TeX” plug-in.

Note

This format is only available when saving files.

Only the top sheet of the current workbook is exported.

The created LaTeX file can either be input into another LaTeX file (see the section called “Including Tables Into Other Documents”) or latexed independently. See the content and the section called “Customizing The LaTeX Tables” of the created file for various customization options.

Example 11.5. Saving as LaTeX file

The screenshot Figure 11.3, “Gnumeric Sample Screenshot” shows an example Gnumeric file. If we save this file as LaTeX file, tex it using pdflatex and open it using xpdf we obtain Figure 11.8, “xpdf Screenshot of LaTeX file”.

Figure 11.8. xpdf Screenshot of LaTeX file

An image of a table rendered in LaTeX.
Including Tables Into Other Documents

To include an exported Gnumeric table into another LaTeX document you need to use several packages

        \usepackage{color}
        \usepackage{array}
        \usepackage{longtable}
        \usepackage{calc}
        \usepackage{multirow}
        \usepackage{hhline}
        \usepackage{ifthen}  
      

and to add the following lines to the preamble of your document:

        \newlength{\gnumericTableWidth}
        \newlength{\gnumericTableWidthComplete}
  

When you have set up your main document in this way, include each table with:

        \input{mygnumericfile.tex}  
  
Customizing The LaTeX Tables

To switch from portrait to landscape for independently latexed tables, uncomment the line:

	                  %,landscape%
  

to obtain

	\documentclass[12pt%
	                  ,landscape%
                    ]{report}
  

To change the column widths, look for the following section in the LaTeX file:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                  %%
%% The following are the widths of the various columns. We are      %%
%% defining them here because then they are easier to change.       %%
%% Depending on the cell formats we may use them more than once.    %%
%%                                                                  %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\gnumericColA{107pt*\gnumericScale}
\def\gnumericColB{89pt*\gnumericScale}
\def\gnumericColC{98pt*\gnumericScale}
\def\gnumericColD{89pt*\gnumericScale}
\def\gnumericColE{89pt*\gnumericScale}
  

To change the second column (Column B) to a width of 0.75 inches, we would simply have to modify this code to:

\def\gnumericColA{107pt*\gnumericScale}
\def\gnumericColB{0.75in}
\def\gnumericColC{98pt*\gnumericScale}
\def\gnumericColD{89pt*\gnumericScale}
\def\gnumericColE{89pt*\gnumericScale}
  

Linear and Integer Program File Format

This format is supported by the “Linear and integer expression (MPS) format module” plug-in.

Note

This format is only available when importing files.

Plan Perfect Format

This format is supported by the “Plan Perfect” plug-in.

Note

This format is only available when importing files.

PDF Format

Currently, Gnumeric cannot save directly as a PDF file; but, provided a standard tetex installation is available, the Gnumeric file can be saved as a LaTeX file (see the section called “LaTeX 2e Format”), and turned into a PDF file using pdflatex.

See Figure 11.8, “xpdf Screenshot of LaTeX file” for an example of a created PDF file.

SC/XSpread Format

This format is supported by the “SC/XSpread Format” plug-in.

Note

This format is only available when importing files.

Text Format

This format exports Gnumeric spreadsheets as straight text or imports them from straight text files. Both export (save as) as well as import can be highly customized.

The Text Export Druid

After specifying the “Text File Export” Format and a file name in the “Save as..” dialog, the text export druid starts to guide you through the various options:

  1. Specify which sheets to export.

    Figure 11.9. Specifying which sheets to export

    An image of the first page of the text export
              druid.
  2. Choose the line terminator to use. You should select it based on the platform you want the created file to be used on. Choose one of several field separators and whether to quote all fields or only as needed. The defaults create the standard Unix csv format.

    Figure 11.10. Specifying line terminators

    An image of the second page of the text export druid.
  3. Select “Finish” to finally export the selected sheets and create the text file. The standard csv output of Figure 11.3, “Gnumeric Sample Screenshot” is shown in Figure 11.11, “csv File”.

    Figure 11.11. csv File

    ,"Operating System",,,
    ,DOS,Linux,SCO,
    January,"$1000.00 ","$900.00 ","$500.00 ",
    February,"$900.00 ","$2500.00 ","$300.00 ",
    March,"$800.00 ","$4100.00 ","$100.00 ",
    April,"$700.00 ","$5700.00 ",($100.00),
    May,"$600.00 ","$7300.00 ",($300.00),
    June,"$500.00 ","$8900.00 ",($500.00),
    July,"$400.00 ","$10500.00 ",($700.00),
    August,"$300.00 ","$12100.00 ",($900.00),
    September,"$200.00 ","$13700.00 ",($1100.00),
    October,"$100.00 ","$15300.00 ",($1300.00),
    November,"$0.00 ","$16900.00 ",($1500.00),
    December,($100.00),"$18500.00 ",($1700.00),
    ,,,,
    Totals:,"$5400.00 ","$116400.00 ",($7200.00),
    ,,,,
        
The Text Import Druid

After specifying the “Text File Import” Format and a file name in the “Import..” dialog, the text import druid starts to guide you through the various options.

On the first screen of the druid specify the basic format type (fixed width fields or fields separated by specific characters), as well as the line numbers of the lines to import.

Figure 11.12. Selecting the basic format type

An image of the first page of the text import
              druid.
The Text Import Druid for Separated Fields
  1. Figure 11.13. Separation Customization

    An image of the second page of the text import
              druid.

    Select the appropriate field separator(s) in the “Separator” frame. Select the “See two separators as one”option if any sequence of separators are supposed to be considered a single separator. The “Example” frame gives immediate feedback on your choices:

    Figure 11.14. Separation Customization With Correct Selection

    An image of the second page of the text import
              druid with the comma separator seleced.
  2. Finally select the appropriate format for each input column:

    Figure 11.15. Selecting Formats

    An image of the third page of the text import
              druid.

    After selecting a column on the left select the appropriate format on the right. In the preview section at the bottom of the dialog, you can immediately see the effect of selecting that format. The following types of formats are available:

    General

    This format will guess for each field value whether it is text, a number, a date, etc.

    Numbers

    You can choose between various number formats. The following list presents just a short selection of those formats:

    Figure 11.16. Some Number Formats

    0
    0.00
    #,##0
    #,##0_);(#,##0)
    #,##0.00_);[Red](#,##0.00)
        

    There are also formats facilitating the use of scientific notation, see Figure 11.21, “Some Scientific Formats”.

    Currency Amounts

    You can choose between various currency formats. The following list presents just a short selection of those formats:

    Figure 11.17. Some Currency Formats

    "$"#,##0
    "$"#,##0_);(#,##0)
    "$"#,##0.00_);[Red](#,##0.00)
        
    Dates and Times

    You can choose between various date and time formats. Some of these formats will recognize combined date/time entries. The following list presents just a short selection of those formats:

    Figure 11.18. Some Date and Time Formats

    m/d/yy
    d-mmm-yyyy
    d-mm
    mmm/d
    mmm/ddd/yyyy
    mmmm-yyyy
    m/d/yyyy h:mm
    yyyy
    h:mm:ss AM/PM
    [h]:mm:ss
        
    Percentages

    You can choose between various formats that recognize percentages. The following list presents just a short selection of those formats:

    Figure 11.19. Some Percentage Formats

    0%
    0.00%
        
    Fractions

    You can choose between a few formats that recognize fractions. The following list presents just a short selection of those formats:

    Figure 11.20. Some Fraction Formats

    # ?/?
    # ??/??
        
    Scientific Notation

    You can choose between a few formats that recognize numbers in scientific notation.. The following list presents just a short selection of those formats:

    Figure 11.21. Some Scientific Formats

    0.00E+00
    ##0.0E+0
        
    Text

    If you want the importer to simply read the field value as text without attempting to interpret it in any way, use the following text format:

    Figure 11.22. The Text Format

    @
        

    More details on the various formats can be found in the section called “File Formats”.

  3. Click the “Finish” button to complete importing the file.

The Text Import Druid for Fixed Width Fields
  1. If you selected fixed width fields you are asked to specify the widths for each field. Click the “Auto Column Discovery” button to have Gnumeric try to determine the fields widths automatically.

    Figure 11.23. 

    An image of the third page of the text import
              druid with fixed width customization.
  2. Finally select the appropriate format for each input column as in Figure 11.15, “Selecting Formats”.

  3. Click the “Finish” button to complete importing the file.

TROFF Format

This format is supported by the “HTML & TeX” plug-in.

Note

This format is only available when saving files.

Files in this format are useful because they can be converted with the groff or troff commands into various other common formats. For example, given a TROFF file myfile.me, the command

  groff -me -t -Tps myfile.me >myfile.ps
  

will create a postscript file of the corresponding table.

Similarly, the command

groff -me -t -Tascii myfile.me >myfile.ascii
  

creates an ascii (straight text) file.

Example 11.6. Creating an ASCII File

If we save Figure 11.3, “Gnumeric Sample Screenshot” as a troff file hypothetical-sales.me and then execute the command

groff -me -t -Tascii hypothetical-sales.me >hypothetical-sales.ascii
  

then the file hypothetical-sales.ascii contains:








Sheet 0


+----------+------------------+-------------+------------+---+
|          | Operating System |             |            |   |
+----------+------------------+-------------+------------+---+
|          |       DOS        |    Linux    |    SCO     |   |
+----------+------------------+-------------+------------+---+
|  January | $1000.00         | $900.00     | $500.00    |   |
+----------+------------------+-------------+------------+---+
| February | $900.00          | $2500.00    | $300.00    |   |
+----------+------------------+-------------+------------+---+
|    March | $800.00          | $4100.00    | $100.00    |   |
+----------+------------------+-------------+------------+---+
|    April | $700.00          | $5700.00    | ($100.00)  |   |
+----------+------------------+-------------+------------+---+
|      May | $600.00          | $7300.00    | ($300.00)  |   |
+----------+------------------+-------------+------------+---+
|     June | $500.00          | $8900.00    | ($500.00)  |   |
+----------+------------------+-------------+------------+---+
|     July | $400.00          | $10500.00   | ($700.00)  |   |
+----------+------------------+-------------+------------+---+
|   August | $300.00          | $12100.00   | ($900.00)  |   |
+----------+------------------+-------------+------------+---+
|September | $200.00          | $13700.00   | ($1100.00) |   |
+----------+------------------+-------------+------------+---+
|  October | $100.00          | $15300.00   | ($1300.00) |   |
+----------+------------------+-------------+------------+---+
| November | $0.00            | $16900.00   | ($1500.00) |   |
+----------+------------------+-------------+------------+---+
| December | ($100.00)        | $18500.00   | ($1700.00) |   |
+----------+------------------+-------------+------------+---+
|          |                  |             |            |   |
+----------+------------------+-------------+------------+---+
|  Totals: | $5400.00         | $116400.00  | ($7200.00) |   |
+----------+------------------+-------------+------------+---+
|          |                  |             |            |   |
+----------+------------------+-------------+------------+---+

















                              1



      

Previous
Working with Files
ContentsNext
Saving Files
PreviousNext

Saving Files

There are several ways to save a file that is currently open. If the file has been named and already exists (i.e., it is not a new worksheet) the Save function will save the file to the existing name.

The Save procedure can be invoked several ways. It is available in the Menubar from the File/ Save menuitem (see the section called “The File Menu”). There is also a toolbar Save (see the section called “The Standard Toolbar”). All these methods are equivalent.

Saving a file

Menubar

File/ Save

Standard Toolbar

An image of the save button.&nbsp; Save

Keyboard Shortcut

Alt+f s

To save new files, or to rename a file, the Save As... is used. This will prompt the user for a new filename and path for the file to be saved as.

Saving a file as..

Menubar

File/ Save as...

Standard Toolbar

An image of the save button.&nbsp; Save This calls Save as... for new unnamed files. To rename a file, the menu or keyboard shortcut needs to be used.

Keyboard Shortcut

Alt+f a


Previous
Opening and Importing Files
ContentsNext
AutoSave Tool
PreviousNext

AutoSave Tool

The AutoSave tool can save your workbook automatically at specific intervals. You can specify how often you want your work to be saved by entering a number in the ``Minutes'' box. If you check the ``Prompt before saving'' button on, Gnumeric asks a confirmation before each automatic save.

Figure 11.24. The Auto Save Tool dialog


Previous
Saving Files
ContentsNext
Printing
PreviousNext

Chapter 12. Printing

This chapter explains how to print spreadsheets, tables and plots from Gnumeric to a printer directly or into Postscript or PDF (both are page description languages).

Table of Contents

Printing to a Printer or a File.
Page Setup.
Page Setup Dialog - Page
Page Setup Dialog - Headers and Footers
Customizing Headers and Footers
Page Setup Dialog - Sheet
Print Preview.
Menu Bar
Toolbar

Previous
AutoSave Tool
ContentsNext
Printing to a Printer or a File.
PreviousNext

Printing to a Printer or a File.

The Print dialog includes the most important options related to printing. More detailed options related to printing can be set in the Page Setup dialog, detailed in the section called “Page Setup.” Press the Print to print out the workbook. Press the Print Preview button to display the Print Preview dialog.

The Print dialog has 3 tabs that include different groups of options.

Figure 12.1. Print Dialog Printer Tab

Normally you want to select Generic Postscript as Printer and the appropriate printer name as Location. Then click on Print to send the document to your printer.

You can also send the printed document to a postscript file by selecting File as Location and specifying an appropriate output file.

Figure 12.2. Print Dialog Job Tab

In the Job tab you may also select a multiple number of copies, or specify which sheets to print. Choose Selection to print just the range of cells currently selected on the active sheet.

Figure 12.3. Print Dialog Paper Tab

In the Paper tab you can select the paper size used for printing, the page orientation and the layout. The layout specification allows to print several logical pages on the same physical sheet of paper. If you need to change your margins, scale the output to fit properly onto your page or customize the page footers or headers, see the the section called “Page Setup.”


Previous
Printing
ContentsNext
Page Setup.
PreviousNext

Page Setup.

The Page Setup Dialog can be used to configure various options related to printing out a workbook. Click on File Menu->Page Setup to activate the Page Setup.

TIP

Remember that at any time you can click on the Print preview button to see what your document looks like with your selected options. See the the section called “Print Preview.”

Normally the specified settings apply only to the current sheet. Select another sheet at the bottom of the Page Setup Dialog or select Apply to all sheets of this workbook.

Page Setup Dialog - Page

Figure 12.4. Page Setup Dialog - Page

Select the paper size and page orientation (portrait or landscape) to suit the best layout for your document.

Specify the required margins of the page. Nothing will be printed inside these margins, not even page numbers.

The margins will be measured in the same units (centimetres, millimetres, points or inches) as the paper size. Change the unit in the paper and layout section to best fit your needs.

Change the scale your image to fit it to your page size suitably. The scaling can both enlarge and diminish the size of your printed document.

Select the Fit to option to have the document automatically scaled. When scaling, the aspect ratio will be preserved. Therefore less pages than specified might be printed.

You may also specify whether the page is centered horizontally and/or vertically on the printable part of the page.

Page Setup Dialog - Headers and Footers

Figure 12.5. Print Dialog - Headers and Footers

Select the space available for the header and footer. If you do not provide sufficient space for the header and footer, they will not print even if you chose a style for them.

Click on the option menu to choose from a range of different header and footer styles.

TIP

You can choose the font in which the header and footer is printed by selecting a default header/footer font the preferences (see in the section called “Configuring Gnumeric Preferences”).

Customize the header or footer by choosing the last option on the menu.

TIP

Double clicking on the header or footer preview will quickly allow you to customize that header or footer.

Customizing Headers and Footers

Figure 12.6. Print Dialog - Customize Header/Footer

Enter what text you would like to appear in the header or footer. There are a number of special opcodes for common options. These are:

&[TAB]

Name of the workbook.

&[PAGE]

Page number in the printing.

&[PAGES]

Total number of pages in the printout.

&[DATE]

Current date in format dd-mmm-yyyy. The format can be changed by specifying the desired format in the opcode: &[DATE:yyyy/mm/dd].

&[TIME]

Current time in format hh:mm. The format can be changed by specifying the desired format in the opcode: &[TIME:hh:mm:ss].

&[FILE]

The basename of the file. For the file /home/jdoe/file.gnumeric, this opcode prints file.gnumeric.

&[PATH]

The path of the file excluding the basename. For the file /home/jdoe/file.gnumeric, this opcode prints /home/jdoe/.

Page Setup Dialog - Sheet

Figure 12.7. Page Setup Dialog - Sheet

You can select rows or columns to be printed on every page of the output. This is commonly used for printing column or row names. To enable this, enter the range of cells to be repeated in Rows to repeat... or Columns to repeat.. field. Instead of entering them manually, you can also select columns or rows to be repeated using the mouse.

WARNING

Note that the rows and columns must be entered as ranges. That is, if you want to have first row repeated, you must enter 1:1, not just 1. Similarly, to have column A repeated, you must enter A:A.

Select Grid lines to print the cell grid lines with your document. Unselect the button to hide the grid lines from your print output.

Select Black and white to convert the colours in your document to a greyscale range.

Select Styles with no content to ensure cells with style changes will be printed, even if they are empty. For example, if you have a number of cells with the background color changed but no data in them, you can select this option to ensure they are in the printed output.


Previous
Printing to a Printer or a File.
ContentsNext
Print Preview.
PreviousNext

Print Preview.

The Print Preview Dialog is used to display what the printed output will look like. The Print Preview dialog can be used to check whether you have the desired formating and layout before you print out the workbook.

Figure 12.8. Print Preview Dialog

Menu Bar

View

This menu contains:

  • First Page —Shows the first page in the workbook.

  • Previous Page —Shows the previous page in the workbook.

  • Next Page —Shows the next page in the workbook.

  • Last Page —Shows the last page in the workbook.

  • Zoom in —Zooms the current page in, showing more detail.

  • Zoom out —Zooms the current page out, showing less detail.

Toolbar

An image of the print toolbar button.&nbsp; Print

Prints the current worksheet to a file or a printer.

An image of the print preview toolbar move to
              the first page button.&nbsp; First

Show the first page in the workbook.

An image of the print preview toolbar move back
              button.&nbsp; Back

Show the previous page in the workbook.

An image of the print preview toolbar next page
              button.&nbsp; Next

Show the next page in the workbook.

An image of the print preview toolbar last page
              button.&nbsp; Last

Show the last page in the workbook.

An image of the print preview toolbar zoom in
              button.&nbsp; Zoom in

Zooms the current page in, showing greater detail.

An image of the print preview toolbar zoom out
              button.&nbsp; Zoom out

Zooms the current page out, showing less detail.

An image of the print preview toolbar zoom to fit
              button.&nbsp; Fit

Fits the whole page into the screen space.

An image of the print preview toolbar zoom to fit width
              button.&nbsp; Fit Wide

Fits the whole width of the page into the screen space.

An image of the print preview toolbar zoom to fit height
              button.&nbsp; Fit Tall

Fits the whole height of the page into the screen space.


Previous
Page Setup.
ContentsNext
Getting Help from Other Sources
PreviousNext

Chapter 13. Getting Help from Other Sources

This chapter describes other sources of help which are available to users including the Gnumeric web site, the mailing list, and the internet relay chat (IRC) discussion channel. The chapter also explains how to tell the project about a problem with the program.

Table of Contents

Getting Help using Gnumeric
The Gnumeric Web Site and Other Web Resources
The Gnumeric Web Site
The Gnumeric Mailing List
Joining the Gnumeric Discussion Channel
Reporting Bugs in the Program

Previous
Print Preview.
ContentsNext
Getting Help using Gnumeric
PreviousNext

Getting Help using Gnumeric

This manual is the most complete source of explanation for Gnumeric and attempts to describe as much of the program as possible. However, this manual is not yet complete and there are many situtations which cannot be explained through a manual. There are several other sources of information which might be helpful.

Warning

Several of the sources of information below involve talking directly with the people who have created Gnumeric. These people are volunteers who have spend several years working on the program to make it useful. They will all be glad to help you but only if they decide they want to. They are all busy and only volunteer on this project. You can take several steps to make these people want to help you.

First, please look carefully through this manual to see if you can answer your own question. This can be hard and requires careful thinking but will teach you the most. Second, look at the Gnumeric web site, look on the world wide web for explanations using other spreasheets or look for a book on how to use another spreadsheet. Finally, if you want to meet the developers and ask for their help directly then be nice. If you are using their program, consider introducing yourself and thanking them for their work. Then be polite as you talk to them. They are all nice people but may sound brisk because that is how they talk to each other. These developers will not spend time to make sure you do not become offended because they do not want to offend you. They want to help you quickly and then get back to their own work. Please assume they respect you and want to help you, after all they have written a program for you to use.


Previous
Getting Help from Other Sources
ContentsNext
The Gnumeric Web Site and Other Web Resources
PreviousNext

The Gnumeric Web Site and Other Web Resources


Previous
Getting Help using Gnumeric
ContentsNext
The Gnumeric Web Site
PreviousNext

The Gnumeric Web Site

Gnumeric strives to mimic the behaviour of other spreadsheets so books which explain how to use these other spreadsheets will probably be useful to help understand Gnumeric.


Previous
The Gnumeric Web Site and Other Web Resources
ContentsNext
The Gnumeric Mailing List
PreviousNext

The Gnumeric Mailing List


Previous
The Gnumeric Web Site
ContentsNext
Joining the Gnumeric Discussion Channel
PreviousNext

Joining the Gnumeric Discussion Channel


Previous
The Gnumeric Mailing List
ContentsNext
Reporting Bugs in the Program
PreviousNext

Reporting Bugs in the Program


Previous
Joining the Gnumeric Discussion Channel
ContentsNext
Extending Gnumeric
PreviousNext

Chapter 14. Extending Gnumeric

This chapter explains how to go about extending Gnumeric to provide extra functionality. Because Gnumeric is Free Software this is quite easy to do.

Table of Contents

The Approaches to Extending Gnumeric
Defining New Functions
Programming Gnumeric using Python
Installing and Building Gnumeric for Python
The Python Console
Using the built-in Python functions
Writing your own Python functions
Upgrading
Fancy tricks
Features wanted, and Questions
Writing New Plugins
Adding to the Gnumeric Program

Previous
Reporting Bugs in the Program
ContentsNext
The Approaches to Extending Gnumeric
PreviousNext

The Approaches to Extending Gnumeric

There are several ways that Gnumeric can be extended to add functionality.


Previous
Extending Gnumeric
ContentsNext
Defining New Functions
PreviousNext

Defining New Functions


Previous
The Approaches to Extending Gnumeric
ContentsNext
Programming Gnumeric using Python
PreviousNext

Programming Gnumeric using Python

A powerful way to access and manipulate data in Gnumeric involves using the Python programming language. As Gnumeric develops from version 1.2, the scripting methods will become increasingly powerful. Since Gnumeric is free software, you could extend it directly using the source code and adding C language functions to the code. Python offers a higher level abstraction through which to interact with the spreadsheet.

Python and Gnumeric can be used in several ways. This section will describe how to obtain Gnumeric, install it and get things configured correctly for access with Python. If you already have the pieces in place, you can skip the section the section called “Installing and Building Gnumeric for Python”.

This section was written by Charles Twardy. It owes a great deal to the nice guide Travis Whitton wrote: Python/Gnumeric guide for the old API in Gnumeric 1.0. Jon Käre Hellan contributed most of the code to enable Python in Gnumeric and wrote the file python-gnumeric.txt in the source tree. Nathan Hurst provided the idea and support.

Warning

The Python API, that is the list of methods available in Python, is still experimental and may change!

For further information, the web page maintained by Jon Käre Hellan's has some python plugins and other useful information. That page can be found through this link. The main Gnumeric page may also have useful information.

If you need help online, you may want to check out:

Installing and Building Gnumeric for Python

This section describes how to obtain the Gnumeric source code, configure it for Python and build it. This section will eventually be removed as Python becomes supported by default.

Preliminaries

I'm going to define some variables here so that you can insert the appropriate command or item for your system when they occur. I'll prefix them all with '$'.

  • $root: Do whatever you do to become root. The usual options are:

    • su - and hit Enter

    • sudo

    • fakeroot (works in some situations, but not all)

  • $version: Whatever your current Gnumeric version is. Some examples:

    • 1.1.20

    • 1.1.20-bonobo

    • 1.1.90

In the Beginning (Installing and Building)

You need to get Python and Gnumeric, and the Python plugin for Gnumeric. You can get the binaries, the packaged source, or the developing edge CVS.

Getting the binaries (Debian)

I've only tested this on sid (unstable). The version you get from stable (woody) may not act quite the same.

  • $root apt-get install gnumeric gnumeric-python python

Getting and building the current Debianized source

If you have Debian, and don't need the bleeding edge, this is by far the easiest way to get and build the source.

  1. Change to a directory where you want to hang the source directory.

  2. $root apt-get build-dep gnumeric

  3. apt-get source gnumeric

  4. cd gnumeric-$version

  5. debian/rules build

  6. To make the .deb packages: $root ./debian/rules binary

  7. To install those .deb packages:

    1. cd .. to change to that directory.

    2. $root dpkg -i gnum*deb (presuming you don't have other .deb packages beginning with "gnum" lying around here.

  8. You may or may not want to remove those .deb files now: $root rm gnum*deb)

Getting and building the source from CVS-HEAD

Remember that this is the developing edge. Things may not work. Generally don't do this unless you are subscribed to the mail list and possibly also on the IRC channel.

You will need a few things for this to work at all:

  1. gnome-common

  2. libgsf (see below)

  3. pygtk2 (On Debian, make sure to get python-gtk2 and python-gtk2-dev)

  4. gnumeric (see below, obviously)

And although the following will build in the main build space, it's probably better to build in a temporary space. But I can't be bothered to learn how to fiddle the build pathways.

  1. Change to a directory where you want to hang the source directory for Gnumeric and a few other Gnome things.

  2. export CVSROOT=:pserver:anonymous@anoncvs.gnome.org:/cvs/gnome

  3. cvs login (No password -- hit RETURN.)

  4. Getting and building libgsf:

    1. cvs co libgsf

    2. cd libgsf

    3. RedHat: ./autogen.sh

    4. Debian: ./autogen.sh --prefix=/usr --with-gconf-schema-file-dir=/etc/gconf/schemas

    5. make

    6. $root make install

    7. If you find that this didn't work, try make clean and then repeat from the autogen step.

  5. Getting and building libgal No longer necessary! (13 June 2003)

  6. Getting and building gnumeric:

    1. cvs -z3 checkout gnumeric -d gnumeric-head

    2. cd gnumeric-head

    3. RedHat: ./autogen.sh and wait while it compiles

    4. Debian: ./autogen.sh --prefix=/usr --with-gconf-schema-file-dir=/etc/gconf/schemas

    5. make

    6. Optional: $root make install

    7. If you find that this didn't work, try make clean and then repeat from the autogen step. For example, sometimes I've had it not create the python-loader.

OK, you should now have gnumeric! Test it! If you installed the Debianized version via apt-get, or did "make install", it should be installed to /usr/bin (or /usr/local/bin on RedHat?) and you can just type gnumeric. Otherwise you will find it in gnumeric-head/src/ and you will have to run it from there.

The Python Console

There is an interactive Python console available from inside Gnumeric. This is a good place to explore things, and if the console is expanded, will be a nice place for scripting. In the meantime, what I have called "Spellbooks" below are much more useful, but are fixed plugins as of Gnumeric startup. So right now I putter in the console as I develop plugin literal in the form of spellbooks. After 1.2.0, Gnumeric will be working on its scripting API, so the two approaches may merge. Or not.

Enabling the Python Console

You can run a Python interpreter from inside Gnumeric, but you have to turn it on. To do this you simply uncomment a line in python-loader/plugins.xml. Normally, that file lives in /usr/lib/gnumeric/$version/plugins/python-loader/, or perhaps /usr/local/lib... on RedHat. I used to suggest making a local but you should probably make a local copy, but that was pain for little gain. So:

  1. gnumeric --version to make sure you get the right version name for the following. (You'll have to do this for every new version of Gnumeric!).

  2. cd ~/.gnumeric/ $version /plugins/

  3. Edit python-loader/plugin.xml.

  4. Uncomment the five lines starting with ui-console-menu service near the bottom (remove the "<!--" and "-->" tags around the <service...> and </service> tags.

  5. Save the file.

  6. Start gnumeric (same version).

  7. Select from the Tools the Python console.

  8. Enjoy!

Playing with the Python console

At the top there is a drop-down menu Execute in. Right now your only choice will be Default. After you evaluate functions from other plugins, those environments will become available too (JK says this is called lazy loading). But I'll assume you are using Default. (The only real difference is that you have to import Gnumeric first, and you can't see your plugin functions.)

(Note: older releases required you to type print dir() instead of just dir(). Fixed in cvs 16 June 2003, and certainly in 1.1.20 and higher.

Let's start by taking a look at the environment.

>>> import 1Gnumeric
>>> dir()
['Gnumeric', '__builtins__', '__doc__', '__name__']
>>> dir(Gnumeric)
['Boolean', 'CellPos', 'FALSE', 'GnumericError', 'GnumericErrorDIV0',
'GnumericErrorNA', 'GnumericErrorNAME', 'GnumericErrorNULL',
'GnumericErrorNUM', 'GnumericErrorRECALC', 'GnumericErrorREF',
'GnumericErrorVALUE', 'MStyle', 'Range', 'TRUE', '__doc__',
'__name__', 2'functions', 'plugin_info', 'workbook_new', 'workbooks'] 

      
1

'Gnumeric' is a module that exists only within Gnumeric, and which defines the Gnumeric Python API.

2

Gnumeric.functions is the list of all the Gnumeric functions you would see in the function browser. You cannot yet do dir(Gnumeric.functions) but maybe someone will bind that soon.

RangeRef is not listed. That seems to limit us, though later in the tutorial we'll see how to use regular functions to get inside RangeRefs.

So do some exploring. First, let's poke around to figure out how to use CellPos.

# I wonder how to use CellPos (I've glanced at the source, but...)

>>> dir(Gnumeric.CellPos)                 # shows nothing useful

>>> Gnumeric.CellPos()                    
TypeError: CellPos() takes exactly 2 arguments (0 given)  

>>> Gnumeric.CellPos("a1","a2") 
TypeError: an integer is required.        # Right. 

>>> a=Gnumeric.CellPos(1,2)               # It worked!
>>> a
<CellPos object at 0x106b6eb8>      # Yeah, I know...

>>> dir(a)
['get_tuple']

>>> a.get_tuple()
(1,2)                                     # Cool. That's (col,row)

>>> str(a)                                # Super cool.
'B3'                                      # JK hasn't implemented this for tuples yet
       

Similarly, we can explore Gnumeric.Range:

>>> r = Gnumeric.Range((1,2),(3,4))
TypeError: Range() argument 1 must be CellPos, not tuple

>>> r = Gnumeric.Range(a,a)
>>> r
<Range object at 0x1071d888>

>>> dir(r)
['get_tuple']

>>> r.get_tuple()
(3, 7, 3, 7)
	  

If you evaluate in the context of a plugin (rather than in Default), then dir(Gnumeric.plugin_info) will reveal some simple informational functions you can call for the local plugin(s).

Note: obviously I don't really know what I'm doing, or I wouldn't be poking around like this.

More fun with the Python console

Jon K. Hellan writes, "Here are some more things you can do from the console:"

# Get a workbook
>>> wb=Gnumeric.workbooks()[0]
>>> wb
<Workbook object at 0x862a490>
>>> dir(wb)
>>> ['gui_add', 'sheet_add', 'sheets']

# Get a sheet
>>> s=wb.sheets()[0]
>>> s
<Sheet object at 0x863e8d0>
>>> dir(s)
['cell_fetch', 'get_extent', 'get_name_unquoted', 'rename',
'style_apply_range', 'style_get', 'style_set_pos', 'style_set_range']

# Get a cell. s.cell_fetch(0,0) and s[0,0] are synonyms. First
# coordinate is columns, i.e. s[1,0] is B1.
>>> c=s[0,0]
>>> c
<Cell object at 0x863d810>
>>> dir(c)
['get_entered_text', 'get_mstyle', 'get_rendered_text', 'get_value',
'get_value_as_string', 'set_text']

# Change the cell - it changes in the grid
>>> c.set_text('foo')

# Retrieve the cell - both ways.
>>> c.get_value()
foo
>>> s.cell_fetch(0,0).get_value()
foo

Very, very nice. Note, after setting a value, it won't show up until that cell is redrawn. That will happen automatically with plugin functions, but in the console, you may have to click on the cell.

Using the built-in Python functions

To enable the Python-loader and Python plugins:

  1. Select the Tools menu and the Plugins menuitem.

  2. Select "Python plugin loader" and "Python functions". Restart Gnumeric.

The quickest way to test whether you now have Python functions is to type =py_capwords("fred flintstone") in the first cell. After you hit <Enter>, you should see "Fred Flintstone".

You can also click on the functions button, and scroll down to the "Python" category. Select that. You should see at least two functions defined: PY_CAPWORDS and PY_PRINTF. They're not very useful, but they prove you've got the plugins. Test them either via the GUI or by typing into the cell.

I'll presume they worked.

Writing your own Python functions

To scribe new magic you must write your spells in places where Gnumeric will find them. That place is in folders under: ~/.gnumeric/<version>/plugins/ Each folder under here is one "spellbook" of new plugin functions. You may put all your spells in one spellbook, or group them neatly depending on your tastes. Each spellbook must have two files. We'll create a spellbook called "myfuncs". A pedestrian name for pedestrian spells. When I have more skill, perhaps I'll make some with better names. Several suggest themselves:

  • Transformations: of obvious value for a spreadsheet

  • Illusions: statistical functions, clearly

  • Charms: presentation graphics

  • Necromancy: file repair and missing values?

  • Divination: data mining!

Prepare the spellbook

In many ways it would be easier to start by copying the py_func spellbook to your local .gnumeric folder, and just adding a function to that. But in general it will be more useful to be able to write your own separate spellbooks, so here we go.

  1. Make the folder: First we make the folders and get into the right one. As noted above, we'll call our folder (spellbook) myfuncs.

    1. If they don't already exist:

      1. mkdir ~/.gnumeric

      2. mkdir ~/.gnumeric/<version>

    2. mkdir ~/.gnumeric/<version>/myfuncs/

    3. cd ~/.gnumeric/<version>/myfuncs/

  2. Make the files: A spellbook has two files. The first is the python file with the functions. The second is the XML file "plugin.xml". The XML file holds that master spells that tell Gnumeric what functions we've defined, and what the name of the python file is, and one other important item. We'll create these as blank files.

    1. touch my-func.py

    2. touch plugin.xml

  3. Write the master spells The good news is that you only need to do this once per spellbook. After that you just add spells to it.

    Your XML file must tell Gnumeric about your plugin. Here is a simple template. (If you want to learn about internationalization, see the example in the system's py-func spellbook.) Open up plugin.xml and insert the following lines:

    <?xml version="1.0"?>
    <plugin id="Gnumeric_MyFuncPlugin">
    	<information>
    		<name>Other Python functions from HOWTO</name>
    		<description>A few extra python functions demonstrating the API.</description>
    	</information>
    	<loader type="Gnumeric_PythonLoader:python">
    		<attribute name="module_name" value="my-func"/> 1
    	</loader>
    	<services>
    		<service type="function_group" id="example"> 2
    			<category>Local Python</category>
    			<functions>
    			</functions>
    		</service>
    	</services>
    </plugin>
    		  
    1

    The value of "name" determines the name of your python script (file). In this case, it must be "my-func.py"

    2

    The value of "id" here determines the name of the function dictionary in your python script. In this case, it must be "example_functions" because here the value is "example".

  4. Prepare to write the spells: Next we'll create a minimal python file. As noted above, we must name the file my-func.py and it must have a dictionary called example_functions. So open up my-func.py and insert the following lines.

    # my-func.py
    #
    
    from Gnumeric import GnumericError GnumericErrorVALUE
    import Gnumeric
    import string
    	
    example_functions = {
    }
    		  

Writing new spells

To add new functions to Python, you now must do five things (three sir!):

  1. Write the python function in your copy of my-func.py.

  2. Insert the function info into the example_functions dictionary at the end of my_func.py

  3. Insert the function name into the functions list at the end of plugin.xml.

Writing a simple script: Let's do something very simple: add two numbers together. First, edit my-func.py.

	# Add two numbers together
    def func_add(num1, num2):
        return num1 + num2

    # Translate the func_add python function to a gnumeric function and register it
    example_functions = {
        'py_add': func_add
    }
	  

Then let the plugin-loader(?) know about your function. Add the following line near the end of plugin.xml (between <functions> and </functions>).

                 <function name="py_add"/>
	

Now start Gnumeric and type py_add(2,3) into a cell. You should get "5". You can also use cell references. If that was in cell A1, go to cell A2 and type py_add(A1,3) and you will get "8". But your function won't show up in the GUI list yet.

Tell the GUI: To make your function show up in the GUI, you have to tell Gnumeric some things about it via a standard header, like this:

	# Add two numbers together
	def func_add(num1, num2):
        '@FUNCTION=PY_ADD\n'\
        '@SYNTAX=py_add(num1, num2)\n'\
        '@DESCRIPTION=Adds two numbers together.\n'\
        'Look, the description can go onto other lines.\n\n'\
        '@EXAMPLES=To add two constants, just type them in: py_add(2,3)\n'\
        'To add two cells, use the cell addresses: py_add(A1,A2)\n\n'\
        '@SEEALSO='

        return num1 + num2
	  

The text after '@DESCRIPTION=' is the description that shows up in the function GUI. You can make it as simple or detailed as you want. I'm not sure how many other fields get used right now, as I haven't seen the EXAMPLES show up anywhere.

But this still isn't quite right. Gnumeric doesn't know how many arguments the function can handle, nor of what type. So the function GUI will prompt for the two values it knows about (as type "Any") and then keep prompting for more. But py_add cannot accept all types, nor can it handle more than two arguments, so unless you give it precisely 2 numbers, you will get an error when you click "OK".

Know your limits... We got away last time just because Gnumeric was forgiving. Now we need to say that we can accept only 2 values, of type floating-point (which will also handle ints).

Where before we had: 'py_add': func_add, we should now put: 'py_add': ('ff','num1,num2',func_add) This says that Gnumeric should expect two floating-point numbers ('ff') with names 'num1' and 'num2', and pass them to func_add.

...and surpass them Of course, there is no reason an add function shouldn't be able to handle a range. The simplest way to do that is to accept a range, and then call Gnumeric's own SUM function on it! All of Gnumeric's functions are available to you in the dictionary Gnumeric.functions, keyed by name. So here is how to write py_sum.

  1. First, define func_sum (in my-func.py):

    def func_sum(gRange):
    	'@FUNCTION=PY_SUM\n'\
    	'@SYNTAX=PY_SUM(range)\n'\
    	'@DESCRIPTION=Adds a range of numbers together.'\
    	'Just like built-in SUM.\n\n'\
    	'@EXAMPLES=To add values in A1 to A5, just type them in:\n'\
    	'    py_sum(a1:a5)\n'\
    	'@SEEALSO='
    	try:
    		sum = Gnumeric.functions['sum']
    		val = sum(gRange)
    		#  val = reduce(lambda a,b: a+b, vals)
    	except TypeError:
    		raise GnumericError, GnumericErrorVALUE
    	else:
    		return val
    		  
  2. Then insert it into your functions dictionary. That dictionary now looks like this (with 'r' denoting a range type):

    example_functions = {
    	'py_add': ('ff','num1,num2',func_add),
    	'py_sum': ('r', 'values', func_sum)
    }
    		  
  3. Finally, make an entry in the XML list, so that it now looks like:

    			<functions>
    				<function name="py_add"/>
    				<function name="py_sum"/>
    			</functions>
    		  

I told you this was the easy way to do it. Obviously it's not very useful to just duplicate Gnumeric functions. But that's as far as I've made it. From what can tell, range objects are packaged as opaque pointers of type RangeRefObject. There seems to be no way to work with them from within Python, so we must rely on the Gnumeric functions.

Do it yourself (mostly)

All is not lost, despite the opaque pointers. For in Gnumeric we can read about all the functions that have been defined. Some of those take references (including RangeRefs) and return useful information. For example, under "Lookup" we find "Column" and "Row" which return arrays of all the column (or row) indices in the range. So we can redo the sum function.

Presume we can convert our RangeRef to a start tuple and and end tuple. Then we can write sum2:

def func_sum2(gRange):
	'@FUNCTION=PY_SUM2\n'\
	'@SYNTAX=PY_SUM2(range)\n'\
	'@DESCRIPTION=Adds a range of numbers together,'\
	'without calling built-in SUM.\n\n'\
	'@EXAMPLES=To add values in A1 to A5, just type them in:\n'\
	'    py_sum(a1:a5)\n'\
	'@SEEALSO='
	try:
		[r_begin, r_end] = range_ref_to_tuples(gRange)
		wb=Gnumeric.Workbooks()[0]   # Careful! This is WRONG! It doesn't
		s=wb.sheets()[0]             # use the ACTUAL workbook or sheet.

		val = 0
		for col in range(r_begin[0], r_end[0]):
			for row in range(r_begin[1], r_end[1]):
				cell = s[col, row]
				val = val + cell.get_value()
				# Note: this doesn't skip blank cells etc.

	except TypeError:
		raise GnumericError,GnumericErrorVALUE
	else:
		return val
		

That's fine as far as it goes, but we need to define the helper function "range_ref_to_tuples". Although I'm rather ashamed to show this ugly literal, here's how I did it (someone suggest a better way, please!):

def range_ref_to_tuples(range_ref):
	'''I need a function to find the bounds of a RangeRef. This one
	extracts them from the Gnumeric "column" and "row" commands, and
	returns them as a pair of tuples. Surely there is a better way?
	For example, return a list of cells??'''

	col  = Gnumeric.functions['column']   
	row  = Gnumeric.functions['row']

	# "column" and "row" take references and return an array of col or row
	# nums for each cell in the reference. For example, [[1, 1, 1], [2, 2, 2]]
	# for columns and [[2, 3, 4], [2, 3, 4]] for rows.

	try:
		columns = col(range_ref)
		rows    = row(range_ref)

		begin_col = columns[0][0] - 1  
		begin_row = rows[0][0] - 1     

		end_col = columns[-1][-1]
		end_row = rows[-1][-1]

		# We subtracted 1 from the begin values because in the API,
		# indexing begins at 0, while "column" and "row" begin at 1.
		# We did NOT subtract 1 from the end values, in order to make
		# them suitable for Python's range(begin, end) paradigm.
		
	except TypeError:
		raise GnumericError,GnumericErrorVALUE
	except NameError:                     # right name?
		raise GnumericError,Gnumeric.GnumericErrorNAME
	except RefError:                     # right name?
		raise GnumericError,Gnumeric.GnumericErrorREF
	except NumError:                     # right name?
		raise GnumericError,Gnumeric.GnumericErrorNUM


	return [ (begin_col, begin_row), (end_col, end_row) ]
		

From there, insert the function into the dictionary, and insert its name into plugin.xml. I leave these as exercises to the reader (answers in the sample files -- no peeking!). Restart Gnumeric and you should be able to use py_sum2!

There are a couple of glitches:

  • It fails the first time with "could not import gobject". Just run again, I don't know what that's about.

  • It will only work for Workbook 1 and Sheet 1. JK thinks that there may be no way to get the current Workbook/Sheet in the Python API. Hrm....

  • As noted, it should do some simple trapping to skip blank or text-filled cells. That can be done! I just didn't. It's late.

More help

Relative to the source tree:

  • The Python interface is defined in: plugins/python-loader/py-gnumeric.c That file also has good notes at the beginning.

  • There are interesting things about the way it used to be in: doc/developer/python-gnumeric.txt.

Program Listings

You can see my examples in full, with more comments:

Upgrading

To upgrade, first choose any method from the installation section above. But note: when you upgrade your Gnumeric version, it will look for your Python scripts in the corresponding version-named subdirectories. For example, if your scripts are in "~/.gnumeric/1.1.17/plugins", but you just upgraded to 1.1.18, you may need to rename that to "~/.gnumeric/1.1.18/plugins". If you want to keep and run several versions of Gnumeric, you'll have to copy or symlink them.

If you want the Python console, you'll also have to re-enable it, following the directions above. If you had made a local copy of the old one, make sure you don't copy or link that to the new directory. It won't work.

Find the new version with gnumeric --version, making sure to invoke the proper gnumeric.

Fancy tricks

To be written....

  • Swapping ranges (not a normal cell function, but I wrote one) that did this. But now I can rewrite it using the GUI, which will make a lot more sense.

  • JK's python-only transpose function

  • A Gnumeric interface to the Snob clustering algorithm. Coming soon to a spreadsheet near you!

Features wanted, and Questions

  • Is it really impossible to determine the current workbook/sheet from Python? That's a bummer. [JK writes: "Not yet fixed, but now fixable."]

  • Several previous items are no longer on this list, due to the diligence of the Gnumeric hackers.


Previous
Defining New Functions
ContentsNext
Writing New Plugins
PreviousNext

Writing New Plugins


Previous
Programming Gnumeric using Python
ContentsNext
Adding to the Gnumeric Program
PreviousNext

Adding to the Gnumeric Program


Previous
Writing New Plugins
ContentsNext
About Gnumeric
PreviousNext

Chapter 15. About Gnumeric

This chapter provides some background information on the creation and distribution of Gnumeric.

Table of Contents

The History of Gnumeric
Authors
License
How to Build Gnumeric from Source Code
How to Get Involved in Gnumeric

Previous
Adding to the Gnumeric Program
ContentsNext
The History of Gnumeric
PreviousNext

The History of Gnumeric

This section has not yet been written.


Previous
About Gnumeric
ContentsNext
Authors
PreviousNext

Authors

Table 15.1. Gnumeric was written by

Miguel de IcazaCreator
Jody GoldbergMaintainer
Morten WelinderCore development, Purification 
Jon K. HellanCore Development, GUI 
Jukka-Pekka IivonenCore Development, Functions and Tools 
Michael MeeksCore Development, Excel 
Almer S. TigelaarCore Development, STF, Autoformat 
Sean AtkinsonFunctions and X-Base importing 
Kenneth Christianseni18n, misc stuff 
Zbigniew ChylaPlugin system, i18n, python 
Tom DyasPlugin system 
ERDI GergoMisc widgets 
Andreas J. GuelzowStatistics Tools, HTML and LaTeX exporters 
Ross IhakaSpecial functions 
Lutz MullerSheetObject improvement 
Yukihiro NakaiInput method and multi-byte character support 
Federico M. QuinteroCanvas support 
JP RosevearSorting, and INDEX 
Ariel RiosGuile support 
Mark ProbstGuile support 
Frank ChiulliOLE support 
Arturo TenaOLE support 
Tuomas KuosmanenArt 
Jakub SteinerArt 
Grandma Chema CelorioQA and sheet copy. 
Juan PabloQA 
Kevin BreitDocumentation 
Thomas CantyDocumentation 
Adrian CusterQA, Documentation 
Adrian LikinsQA, Documentation 
Wayne SchullerDocumentation, printer headers 
Aaron WeberDocumentation 
Alexander KirillovDocumentation 
J.H.M. (Ray) DassenDebian packaging 
John GottsRPM packaging 
Takashi MatsudaOriginal text plugin 
Vincent RenardiasOriginal CSV support 
Alan Cox2nd csv plugin 
Bruno UnnaOriginal fmt dialog 
Daniel VeillardOriginal DOM support 
Vladimir VuksanOriginal financial functions 
Jakub JelinekEarly canvas work 
Chris LaheyOriginal number format engine 
RascaOriginal HTML, Troff, LaTeX exporters 

To find more information about Gnumeric, please visit the Web site.

If you have some comments or suggestions regarding this application or documentation, need help, or want to report a bug, please contact us! Either via the web. or on the mailing list


Previous
The History of Gnumeric
ContentsNext
License
PreviousNext

License

Gnumeric is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Gnumeric is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public License is included as an appendix to the GNOME Users Guide. You may also obtain a copy of the GNU General Public License from the Free Software Foundation by visiting their Web site or by writing to


      Free Software Foundation, Inc.
      59 Temple Place - Suite 330
      BostonMA 02111-1307
      USA
    


Previous
Authors
ContentsNext
How to Build Gnumeric from Source Code
PreviousNext

How to Build Gnumeric from Source Code

This section has not yet been written.


Previous
License
ContentsNext
How to Get Involved in Gnumeric
PreviousNext

How to Get Involved in Gnumeric

This section has not yet been written.


Previous
How to Build Gnumeric from Source Code
ContentsNext
Function Reference
PreviousNext

Appendix A. Function Reference

This appendix provides a list of all the functions which are currently defined in Gnumeric.

Table of Contents

Alphabetical List of Gnumeric Functions
Bitwise Operations
Complex
Database
Date/Time
Engineering
Finance
Gnumeric
Information
Logic
Lookup
Mathematics
Number Theory
Random Numbers
Statistics
String

Previous
How to Get Involved in Gnumeric
ContentsNext
Alphabetical List of Gnumeric Functions
PreviousNext

Alphabetical List of Gnumeric Functions

Bitwise Operations

Name

BITAND

Synopsis

BITAND(a,b)

Description

BITAND function returns bitwise and-ing of its arguments.

Examples

See also

BITOR, BITXOR.


Name

BITLSHIFT

Synopsis

BITLSHIFT(x,n)

Description

BITLSHIFT function returns x bit-shifted left by n bits.

  • If n is negative, a right shift will in effect be performed.

Examples

See also

BITRSHIFT.


Name

BITOR

Synopsis

BITOR(a,b)

Description

BITOR function returns bitwise or-ing of its arguments.

Examples

See also

BITXOR, BITAND.


Name

BITRSHIFT

Synopsis

BITRSHIFT(x,n)

Description

BITRSHIFT function returns x bit-shifted right by n bits.

  • If n is negative, a left shift will in effect be performed.

Examples

See also

BITLSHIFT.


Name

BITXOR

Synopsis

BITXOR(a,b)

Description

BITXOR function returns bitwise exclusive or-ing of its arguments.

Examples

See also

BITOR, BITAND.

Complex

Name

COMPLEX

Synopsis

COMPLEX(real,im[,suffix])

Description

COMPLEX returns a complex number of the form x + yi.

real is the real and im is the imaginary part of the complex number. suffix is the suffix for the imaginary part. If it is omitted, COMPLEX uses 'i' by default.

  • If suffix is neither 'i' nor 'j', COMPLEX returns #VALUE! error.

  • This function is Excel compatible.

Examples

COMPLEX(1,-1) equals 1-i.

See also


Name

IMABS

Synopsis

IMABS(inumber)

Description

IMABS returns the absolute value of a complex number.

  • If inumber is not a valid complex number, IMABS returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMABS("2-j") equals 2.23606798.

See also

IMAGINARY, IMREAL.


Name

IMAGINARY

Synopsis

IMAGINARY(inumber)

Description

IMAGINARY returns the imaginary part of a complex number.

  • If inumber is not a valid complex number, IMAGINARY returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMAGINARY("132-j") equals -1.

See also

IMREAL.


Name

IMARCCOS

Synopsis

IMARCCOS(inumber)

Description

IMARCCOS returns the complex arccosine of the complex number inumber. The branch cuts are on the real axis, less than -1 and greater than 1.

  • If inumber is not a valid complex number, IMARCCOS returns #VALUE! error.

Examples

IMARCCOS("1+j") equals 0.9045569-1.061275j.

See also

IMARCSIN, IMARCTAN.


Name

IMARCCOSH

Synopsis

IMARCCOSH(inumber)

Description

IMARCCOSH returns the complex hyperbolic arccosine of the complex number inumber. The branch cut is on the real axis, less than 1.

  • If inumber is not a valid complex number, IMARCCOSH returns #VALUE! error.

Examples

IMARCCOSH("1+j") equals 1.06127506+0.904557j.

See also

IMARCSINH, IMARCTANH.


Name

IMARCCOT

Synopsis

IMARCCOT(inumber)

Description

IMARCCOT returns the complex arccotangent of the complex number z (inumber), where

arccot(z) = arctan(1/z).

  • If inumber is not a valid complex number, IMARCCOT returns #VALUE! error.

Examples

IMARCCOT("1+j") equals 0.553574+0.4023595j.

See also

IMARCSEC, IMARCCSC.


Name

IMARCCOTH

Synopsis

IMARCCOTH(inumber)

Description

IMARCCOTH returns the complex hyperbolic arccotangent of the complex number z (inumber), where

arccoth(z) = arctanh(1/z).

  • If inumber is not a valid complex number, IMARCCOTH returns #VALUE! error.

Examples

IMARCCOTH("1+j") equals 0.40235948-0.5535744j.

See also

IMARCSECH, IMARCCSCH.


Name

IMARCCSC

Synopsis

IMARCCSC(inumber)

Description

IMARCCSC returns the complex arccosecant of the complex number z (inumber), where

arccsc(z) = arcsin(1/z).

  • If inumber is not a valid complex number, IMARCCSC returns #VALUE! error.

Examples

IMARCCSC("1+j") equals 0.45227845-0.5306375j.

See also

IMARCSEC, IMARCCOT.


Name

IMARCCSCH

Synopsis

IMARCCSCH(inumber)

Description

IMARCCSCH returns the complex hyperbolic arccosecant of the complex number z (inumber), where

arccsch(z) = arcsinh(1/z).

  • If inumber is not a valid complex number, IMARCCSCH returns #VALUE! error.

Examples

IMARCCSCH("1+j") equals 0.5306375-0.452278j.

See also

IMARCSECH, IMARCCOTH.


Name

IMARCSEC

Synopsis

IMARCSEC(inumber)

Description

IMARCSEC returns the complex arcsecant of the complex number z (inumber), where

arcsec(z) = arccos(1/z).

  • If inumber is not a valid complex number, IMARCSEC returns #VALUE! error.

Examples

IMARCSEC("1+j") equals 1.1185179+0.5306375j.

See also

IMARCCSC, IMARCCOT.


Name

IMARCSECH

Synopsis

IMARCSECH(inumber)

Description

IMARCSECH returns the complex hyperbolic arcsecant of the complex number z (inumber), where

arcsech(z) = arccosh(1/z).

  • If inumber is not a valid complex number, IMARCSECH returns #VALUE! error.

Examples

IMARCSECH("1+j") equals 0.5306375-1.118518j.

See also

IMARCCSCH, IMARCCOTH.


Name

IMARCSIN

Synopsis

IMARCSIN(inumber)

Description

IMARCSIN returns the complex arcsine of the complex number inumber. The branch cuts are on the real axis, less than -1 and greater than 1.

  • If inumber is not a valid complex number, IMARCSIN returns #VALUE! error.

Examples

IMARCSIN("1+j") equals 0.6662394+1.061275j.

See also

IMARCCOS, IMARCTAN.


Name

IMARCSINH

Synopsis

IMARCSINH(inumber)

Description

IMARCSINH returns the complex hyperbolic arcsine of the complex number inumber. The branch cuts are on the imaginary axis, below -i and above i.

  • If inumber is not a valid complex number, IMARCSINH returns #VALUE! error.

Examples

IMARCSINH("1+j") equals 1.061275+0.6662394j.

See also

IMARCCOSH, IMARCTANH.


Name

IMARCTAN

Synopsis

IMARCTAN(inumber)

Description

IMARCTAN returns the complex arctangent of the complex number inumber. The branch cuts are on the imaginary axis, below -i and above i.

  • If inumber is not a valid complex number, IMARCTAN returns #VALUE! error.

Examples

IMARCTAN("1+j") equals 1.0172220+0.4023595j.

See also

IMARCSIN, IMARCCOS.


Name

IMARCTANH

Synopsis

IMARCTANH(inumber)

Description

IMARCTANH returns the complex hyperbolic arctangent of the complex number inumber. The branch cuts are on the real axis, less than -1 and greater than 1.

  • If inumber is not a valid complex number, IMARCTANH returns #VALUE! error.

Examples

IMARCTANH("1+j") equals 0.4023595+1.0172220j.

See also

IMARCSINH, IMARCCOSH.


Name

IMARGUMENT

Synopsis

IMARGUMENT(inumber)

Description

IMARGUMENT returns the argument theta of a complex number, i.e. the angle in radians from the real axis to the representation of the number in polar coordinates.

  • If inumber is not a valid complex number, IMARGUMENT returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMARGUMENT("2-j") equals -0.463647609.

See also


Name

IMCONJUGATE

Synopsis

IMCONJUGATE(inumber)

Description

IMCONJUGATE returns the complex conjugate of a complex number.

  • If inumber is not a valid complex number, IMCONJUGATE returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMCONJUGATE("1-j") equals 1+j.

See also

IMAGINARY, IMREAL.


Name

IMCOS

Synopsis

IMCOS(inumber)

Description

IMCOS returns the cosine of a complex number.

  • If inumber is not a valid complex number, IMCOS returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMCOS("1+j") equals 0.833730-0.988898j.

See also

IMSIN, IMTAN.


Name

IMCOSH

Synopsis

IMCOSH(inumber)

Description

IMCOSH returns the complex hyperbolic cosine of the complex number z (inumber), where

cosh(z) = (exp(z) + exp(-z))/2.

  • If inumber is not a valid complex number, IMCOSH returns #VALUE! error.

Examples

IMCOSH("1+j") equals 0.83373+0.988898j.

See also

IMSINH, IMTANH.


Name

IMCOT

Synopsis

IMCOT(inumber)

Description

IMCOT returns the complex cotangent of the complex number z (inumber), where

cot(z) = 1/tan(z).

  • If inumber is not a valid complex number, IMCOT returns #VALUE! error.

Examples

IMCOT("2-j") equals -0.171384+0.821330j.

See also

IMSEC, IMCSC.


Name

IMCOTH

Synopsis

IMCOTH(inumber)

Description

IMCOTH returns the complex hyperbolic cotangent of the complex number z (inumber) where,

coth(z) = 1/tanh(z).

  • If inumber is not a valid complex number, IMCOTH returns #VALUE! error.

Examples

IMCOTH("1+j") equals 0.868014-0.217622j.

See also

IMSECH, IMCSCH.


Name

IMCSC

Synopsis

IMCSC(inumber)

Description

IMCSC returns the complex cosecant of the complex number z (inumber), where

csc(z) = 1/sin(z).

  • If inumber is not a valid complex number, IMCSC returns #VALUE! error.

Examples

IMCSC("2-j") equals 0.635494-0.221501j.

See also

IMSEC, IMCOT.


Name

IMCSCH

Synopsis

IMCSCH(inumber)

Description

IMCSCH returns the complex hyperbolic cosecant of the complex number z (inumber), where

csch(z) = 1/sinh(z).

  • If inumber is not a valid complex number, IMCSCH returns #VALUE! error.

Examples

IMCSCH("1+j") equals 0.303931-0.621518j.

See also

IMSECH, IMCOTH.


Name

IMDIV

Synopsis

IMDIV(inumber1,inumber2)

Description

IMDIV returns the quotient of two complex numbers.

  • If inumber1 or inumber2 are not valid complex numbers, IMDIV returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMDIV("2-j","2+j") equals 0.6-0.8j.

See also

IMPRODUCT.


Name

IMEXP

Synopsis

IMEXP(inumber)

Description

IMEXP returns the exponential of a complex number.

  • If inumber is not a valid complex number, IMEXP returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMEXP("2-j") equals 3.992324-6.217676j.

See also

IMLN.


Name

IMINV

Synopsis

IMINV(inumber)

Description

IMINV returns the the inverse, or reciprocal, of the complex number z (inumber), where

1/z = (x - i y)/(x^2 + y^2).

  • If inumber is not a valid complex number, IMINV returns #VALUE! error.

Examples

IMINV("1-j") equals 0.5+0.5j.

See also


Name

IMLN

Synopsis

IMLN(inumber)

Description

IMLN returns the natural logarithm of a complex number.

The result will have an imaginary part between -pi and +pi. The natural logarithm is not uniquely defined on complex numbers. You may need to add or subtract an even multiple of pi to the imaginary part.

  • If inumber is not a valid complex number, IMLN returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMLN("3-j") equals 1.15129-0.32175j.

See also

IMEXP, IMLOG2, IMLOG10.


Name

IMLOG10

Synopsis

IMLOG10(inumber)

Description

IMLOG10 returns the logarithm of a complex number in base 10.

  • If inumber is not a valid complex number, IMLOG10 returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMLOG10("3-j") equals 0.5-0.13973j.

See also

IMLN, IMLOG2.


Name

IMLOG2

Synopsis

IMLOG2(inumber)

Description

IMLOG2 returns the logarithm of a complex number in base 2.

  • If inumber is not a valid complex number, IMLOG2 returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMLOG2("3-j") equals 1.66096-0.46419j.

See also

IMLN, IMLOG10.


Name

IMNEG

Synopsis

IMNEG(inumber)

Description

IMNEG returns the negative of the complex number z (inumber), where

-z = (-x) + i(-y).

  • If inumber is not a valid complex number, IMNEG returns #VALUE! error.

Examples

IMNEG("1-j") equals -1+j.

See also


Name

IMPOWER

Synopsis

IMPOWER(inumber1,inumber2)

Description

IMPOWER returns a complex number raised to a power. inumber1 is the complex number to be raised to a power and inumber2 is the power to which you want to raise it.

  • If inumber1 or inumber2 are not valid complex numbers, IMPOWER returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMPOWER("4-j",2) equals 15-8j.

See also

IMSQRT.


Name

IMPRODUCT

Synopsis

IMPRODUCT(inumber1[,inumber2,...])

Description

IMPRODUCT returns the product of given complex numbers.

  • If any of the inumbers are not valid complex numbers, IMPRODUCT returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMPRODUCT("2-j","4-2j") equals 6-8j.

See also

IMDIV.


Name

IMREAL

Synopsis

IMREAL(inumber)

Description

IMREAL returns the real part of a complex number.

  • If inumber is not a valid complex number, IMREAL returns #VALUE! error.

  • This function is Excel compatible.

Examples

imreal("132-j") equals 132.

See also

IMAGINARY.


Name

IMSEC

Synopsis

IMSEC(inumber)

Description

IMSEC returns the complex secant of the complex number z (inumber), where

sec(z) = 1/cos(z).

  • If inumber is not a valid complex number, IMSEC returns #VALUE! error.

Examples

IMSEC("2-j") equals -0.413149-0.687527j.

See also

IMCSC, IMCOT.


Name

IMSECH

Synopsis

IMSECH(inumber)

Description

IMSECH returns the complex hyperbolic secant of the complex number z (inumber), where

sech(z) = 1/cosh(z).

  • If inumber is not a valid complex number, IMSECH returns #VALUE! error.

Examples

IMSECH("1+j") equals 0.498337-0.5910838j.

See also

IMCSCH, IMCOTH.


Name

IMSIN

Synopsis

IMSIN(inumber)

Description

IMSIN returns the sine of a complex number.

  • If inumber is not a valid complex number, IMSIN returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMSIN("1+j") equals 1.29846+0.63496j.

See also

IMCOS, IMTAN.


Name

IMSINH

Synopsis

IMSINH(inumber)

Description

IMSINH returns the complex hyperbolic sine of the complex number z (inumber), where

sinh(z) = (exp(z) - exp(-z))/2.

  • If inumber is not a valid complex number, IMSINH returns #VALUE! error.

Examples

IMSINH("1+j") equals 0.63496+1.29846j.

See also

IMCOSH, IMTANH.


Name

IMSQRT

Synopsis

IMSQRT(inumber)

Description

IMSQRT returns the square root of a complex number.

  • If inumber is not a valid complex number, IMSQRT returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMSQRT("1+j") equals 1.09868+0.4550899j.

See also

IMPOWER.


Name

IMSUB

Synopsis

IMSUB(inumber1,inumber2)

Description

IMSUB returns the difference of two complex numbers.

  • If inumber1 or inumber2 are not valid complex numbers, IMSUB returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMSUB("3-j","2+j") equals 1-2j.

See also

IMSUM.


Name

IMSUM

Synopsis

IMSUM(inumber1,inumber2)

Description

IMSUM returns the sum of two complex numbers.

  • If inumber1 or inumber2 are not valid complex numbers, IMSUM returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMSUM("2-4j","9-j") equals 11-5j.

See also

IMSUB.


Name

IMTAN

Synopsis

IMTAN(inumber)

Description

IMTAN returns the tangent of a complex number.

  • If inumber is not a valid complex number, IMTAN returns #VALUE! error.

  • This function is Excel compatible.

Examples

IMTAN("2-j") equals -0.2434582-1.1667363j.

See also

IMSIN, IMCOS.


Name

IMTANH

Synopsis

IMTANH(inumber)

Description

IMTANH returns the complex hyperbolic tangent of the complex number z (inumber), where

tanh(z) = sinh(z)/cosh(z).

  • If inumber is not a valid complex number, IMTANH returns #VALUE! error.

Examples

IMTANH("1+j") equals 1.083923+0.2717526j.

See also

IMSINH, IMCOSH.

Database

Name

DAVERAGE

Synopsis

DAVERAGE(database,field,criteria)

Description

DAVERAGE function returns the average of the values in a list or database that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

DAVERAGE(A1:C7, "Salary", A9:A11) equals 42296.3333.

DAVERAGE(A1:C7, "Age", A9:A11) equals 39.

DAVERAGE(A1:C7, "Salary", A9:B11) equals 40782.5.

DAVERAGE(A1:C7, "Age", A9:B11) equals 36.

See also

DCOUNT.


Name

DCOUNT

Synopsis

DCOUNT(database,field,criteria)

Description

DCOUNT function counts the cells that contain numbers in a database that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

DCOUNT(A1:C7, "Salary", A9:A11) equals 3.

DCOUNT(A1:C7, "Salary", A9:B11) equals 2.

DCOUNT(A1:C7, "Name", A9:B11) equals 0.

See also

DAVERAGE.


Name

DCOUNTA

Synopsis

DCOUNTA(database,field,criteria)

Description

DCOUNTA function counts the cells that contain data in a database that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

DCOUNTA(A1:C7, "Salary", A9:A11) equals 3.

DCOUNTA(A1:C7, "Salary", A9:B11) equals 2.

DCOUNTA(A1:C7, "Name", A9:B11) equals 2.

See also

DCOUNT.


Name

DGET

Synopsis

DGET(database,field,criteria)

Description

DGET function returns a single value from a column that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

  • If none of the items match the conditions, DGET returns #VALUE! error.

  • If more than one items match the conditions, DGET returns #NUM! error.

DGET(A1:C7, "Salary", A9:A10) equals 34323.

DGET(A1:C7, "Name", A9:A10) equals "Clark".

See also

DCOUNT.


Name

DMAX

Synopsis

DMAX(database,field,criteria)

Description

DMAX function returns the largest number in a column that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

DMAX(A1:C7, "Salary", A9:A11) equals 47242.

DMAX(A1:C7, "Age", A9:A11) equals 45.

DMAX(A1:C7, "Age", A9:B11) equals 43.

See also

DMIN.


Name

DMIN

Synopsis

DMIN(database,field,criteria)

Description

DMIN function returns the smallest number in a column that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

DMIN(A1:C7, "Salary", A9:B11) equals 34323.

DMIN(A1:C7, "Age", A9:B11) equals 29.

See also

DMAX.


Name

DPRODUCT

Synopsis

DPRODUCT(database,field,criteria)

Description

DPRODUCT function returns the product of numbers in a column that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

DPRODUCT(A1:C7, "Age", A9:B11) equals 1247.

See also

DSUM.


Name

DSTDEV

Synopsis

DSTDEV(database,field,criteria)

Description

DSTDEV function returns the estimate of the standard deviation of a population based on a sample. The populations consists of numbers that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

DSTDEV(A1:C7, "Age", A9:B11) equals 9.89949.

DSTDEV(A1:C7, "Salary", A9:B11) equals 9135.112506.

See also

DSTDEVP.


Name

DSTDEVP

Synopsis

DSTDEVP(database,field,criteria)

Description

DSTDEVP function returns the standard deviation of a population based on the entire populations. The populations consists of numbers that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

DSTDEVP(A1:C7, "Age", A9:B11) equals 7.

DSTDEVP(A1:C7, "Salary", A9:B11) equals 6459.5.

See also

DSTDEV.


Name

DSUM

Synopsis

DSUM(database,field,criteria)

Description

DSUM function returns the sum of numbers in a column that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

DSUM(A1:C7, "Age", A9:B11) equals 72.

DSUM(A1:C7, "Salary", A9:B11) equals 81565.

See also

DPRODUCT.


Name

DVAR

Synopsis

DVAR(database,field,criteria)

Description

DVAR function returns the estimate of variance of a population based on a sample. The populations consists of numbers that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

DVAR(A1:C7, "Age", A9:B11) equals 98.

DVAR(A1:C7, "Salary", A9:B11) equals 83450280.5.

See also

DVARP.


Name

DVARP

Synopsis

DVARP(database,field,criteria)

Description

DVARP function returns the variance of a population based on the entire populations. The populations consists of numbers that match conditions specified.

database is a range of cells in which rows of related information are records and columns of data are fields. The first row of a database contains labels for each column.

field specifies which column is used in the function. If field is an integer, for example 2, the second column is used. Field can also be the label of a column. For example, ``Age'' refers to the column with the label ``Age'' in database range.

criteria is the range of cells which contains the specified conditions. The first row of a criteria should contain the labels of the fields for which the criteria are for. Cells below the labels specify conditions, for example, ``>3'' or ``<9''. Equality condition can be given simply by specifying a value, e.g. ``3'' or ``John''.

Each row in criteria specifies a separate condition. If a row in database matches a row in criteria, then that row is counted. Technically speaking, this a boolean OR operation between the rows in criteria.

If criteria specifies more than one column, then each of the conditions in the specified columns must be true for the row in database to match. Technically speaking, this is a boolean AND operation between the columns in criteria.

Examples

Let us assume that the range A1:C7 contain the following values:

Name Age Salary

John 34 54342

Bill 35 22343

Clark 29 34323

Bob 43 47242

Susan 37 42932

Jill 45 45324

In addition, the cells A9:B11 contain the following values:

Age Salary

<30

>40 >46000

DVARP(A1:C7, "Age", A9:B11) equals 49.

DVARP(A1:C7, "Salary", A9:B11) equals 41725140.25.

See also

DVAR.


Name

GETPIVOTDATA

Synopsis

GETPIVOTDATA(pivot_table,field_name)

Description

GETPIVOTDATA function fetches summary data from a pivot table. pivot_table is a cell range containing the pivot table. field_name is the name of the field of which you want the summary data.

  • If the summary data is unavailable, GETPIVOTDATA returns #REF! error.

Examples

See also

Date/Time

Name

DATE

Synopsis

DATE (year,month,day)

Description

DATE returns the number of days since the 1st of January of 1900(the date serial number) for the given year, month and day.

  • If month < 1 or month > 12, the year will be corrected. A similar correction takes place for days.

  • The years should be at least 1900. If years < 1900, it is assumed to be 1900 + years.

  • If the given date is not valid, DATE returns #NUM! error.

  • This function is Excel compatible.

Examples

DATE(2001, 3, 30) returns 'Mar 30, 2001'.

See also

TODAY, NOW.


Name

DATE2UNIX

Synopsis

DATE2UNIX(serial)

Description

DATE2UNIX converts a spreadsheet date and time serial number into a unix time.

A unix time is the number of seconds since midnight January 1, 1970.

Examples

DATE2UNIX("01/01/2000") equals 946656000.

See also

NOW, DATE, UNIX2DATE.


Name

DATEDIF

Synopsis

DATEDIF(date1,date2,interval)

Description

DATEDIF returns the difference between two dates. interval is one of six possible values: "y", "m", "d", "ym", "md", and "yd".

The first three options will return the number of complete years, months, or days, respectively, between the two dates specified.

"ym" will return the number of full months between the two dates, not including the difference in years.

"md" will return the number of full days between the two dates, not including the difference in months.

"yd" will return the number of full days between the two dates, not including the difference in years.

  • This function is Excel compatible.

Examples

DATEDIF(DATE(2000,4,30),DATE(2003,8,4),"d") equals 1191.

DATEDIF(DATE(2000,4,30),DATE(2003,8,4),"y") equals 3.

See also

DATE.


Name

DATEVALUE

Synopsis

DATEVALUE(date_str)

Description

DATEVALUE returns the serial number of the date. date_str is the string that contains the date. The value depends on the date convention. The MS Excel 1900 convention dates things from Jan 1 1900 while the 1904 convention uses Jan 1 1904.

  • This function is Excel compatible.

Examples

DATEVALUE("1/1/1999") equals 36161 (in the 1900 convention).

See also

DATE.


Name

DAY

Synopsis

DAY (date)

Description

DAY converts a serial number to a day of month.

  • Note that Gnumeric will perform regular string to serial number conversion for you, so you can enter a date as a string.

  • This function is Excel compatible.

Examples

DAY("10/24/1968") equals 24.

See also

MONTH, TIME, NOW, YEAR.


Name

DAYS360

Synopsis

DAYS360 (date1,date2,method)

Description

DAYS360 returns the number of days from date1 to date2 following a 360-day calendar in which all months are assumed to have 30 days.

  • If method is 1, the European method will be used. In this case, if the day of the month is 31 it will be considered as 30.

  • If method is 0 or omitted, the XL US method will be used. This is a somewhat complicated industry standard method where the last day of February is considered to be the 30th day of the month, but only for the first date.

  • If method is 2, a saner version of the US method is used in which both dates get the same February treatment.

  • Note that Gnumeric will perform regular string to serial number conversion for you, so you can enter a date as a string.

  • This function is mostly Excel compatible.

Examples

DAYS360(DATE(2003, 2, 3), DATE(2007, 4, 2)) equals 1499.

See also

MONTH, TIME, NOW, YEAR.


Name

EDATE

Synopsis

EDATE(date,months)

Description

EDATE returns the serial number of the date that is the specified number of months before or after a given date. date is the serial number of the initial date and months is the number of months before (negative number) or after (positive number) the initial date.

  • If months is not an integer, it is truncated.

  • This function is Excel compatible.

Examples

EDATE(DATE(2001,12,30),2) returns 'Feb 28, 2002'.

See also

DATE.


Name

EOMONTH

Synopsis

EOMONTH (start_date,months)

Description

EOMONTH returns the last day of the month which is months from the start_date.

  • EOMONTH returns #NUM! if start_date or months are invalid.

  • This function is Excel compatible.

Examples

If A1 contains 12/21/00 then EOMONTH(A1,0)=12/31/00, EOMONTH(A1,5)=5/31/01, and EOMONTH(A1,2)=2/28/01

See also

MONTH.


Name

HOUR

Synopsis

HOUR (date)

Description

HOUR converts a serial number to an hour. The hour is returned as an integer in the range 0 (12:00 A.M.) to 23 (11:00 P.M.).

  • Note that Gnumeric will perform regular string to serial number conversion for you, so you can enter a date as a string.

  • This function is Excel compatible.

Examples

HOUR(0.128472) equals 3.

See also

MINUTE, NOW, TIME, SECOND.


Name

ISOWEEKNUM

Synopsis

ISOWEEKNUM (date)

Description

ISOWEEKNUM returns the ISO 8601 week number of date.

An ISO 8601 week starts on Monday. Weeks are numbered from 1. A week including days from two different years is assigned to the year which includes the most days. This means that Dec 31 could be in week 1 of the following year, and Jan 1 could be in week 52 or 53 of the previous year. ISOWEEKNUM returns the week number.

  • ISOWEEKNUM returns #NUM! if date is invalid.

Examples

If A1 contains 12/21/00 then ISOWEEKNUM(A1)=51

See also

WEEKNUM, ISOYEAR.


Name

ISOYEAR

Synopsis

ISOYEAR (date)

Description

ISOYEAR returns the year of the ISO 8601 week number of date.

An ISO 8601 week starts on Monday. Weeks are numbered from 1. A week including days from two different years is assigned to the year which includes the most days. This means that Dec 31 could be in week 1 of the following year, and Jan 1 could be in week 52 or 53 of the previous year. ISOYEAR returns the year the week is assigned to.

  • ISOYEAR returns #NUM! if date is invalid.

Examples

If A1 contains 12/31/2001 then ISOYEAR(A1)=2002

See also

ISOWEEKNUM.


Name

MINUTE

Synopsis

MINUTE (date)

Description

MINUTE converts a serial number to a minute. The minute is returned as an integer in the range 0 to 59.

  • Note that Gnumeric will perform regular string to serial number conversion for you, so you can enter a date as a string.

  • This function is Excel compatible.

Examples

MINUTE(0.128472) equals 5.

See also

HOUR, NOW, TIME, SECOND.


Name

MONTH

Synopsis

MONTH (date)

Description

MONTH converts a serial number to a month.

  • Note that Gnumeric will perform regular string to serial number conversion for you, so you can enter a date as a string.

  • This function is Excel compatible.

Examples

MONTH(DATE(2003, 4, 30)) equals 4.

See also

DAY, TIME, NOW, YEAR.


Name

NETWORKDAYS

Synopsis

NETWORKDAYS (start_date,end_date[,holidays])

Description

NETWORKDAYS returns the number of non-weekend non-holidays between start_date and end_date including these dates. Holidays are optionally supplied in holidays.

  • NETWORKDAYS returns #NUM! if start_date or end_date are invalid.

  • This function is Excel compatible.

Examples

NETWORKDAYS(DATE(2001,1,2),DATE(2001,2,15)) equals 33.

See also

WORKDAY.


Name

NOW

Synopsis

NOW ()

Description

NOW returns the serial number for the date and time at the time it is evaluated.

Serial Numbers in Gnumeric are represented as follows:The integral part is the number of days since the 1st of January of 1900. The decimal part represent the fraction of the day and is mapped into hour, minutes and seconds.

For example: .0 represents the beginning of the day, and 0.5 represents noon.

  • This function is Excel compatible.

Examples

NOW().

See also

TODAY.


Name

SECOND

Synopsis

SECOND (date)

Description

SECOND converts a serial number to a second. The second is returned as an integer in the range 0 to 59.

  • Note that Gnumeric will perform regular string to serial number conversion for you, so you can enter a date as a string.

  • This function is Excel compatible.

Examples

SECOND(0.600613) equals 53.

See also

HOUR, MINUTE, NOW, TIME.


Name

TIME

Synopsis

TIME (hours,minutes,seconds)

Description

TIME returns a fraction representing the time of day.

  • This function is Excel compatible.

Examples

TIME(3, 5, 23) equals 3:05AM.

See also

HOUR.


Name

TIMEVALUE

Synopsis

TIMEVALUE (timetext)

Description

TIMEVALUE returns a fraction representing the time of day, a number between 0 and 1.

  • This function is Excel compatible.

Examples

TIMEVALUE("3:05") equals 0.128472.

TIMEVALUE("2:24:53 PM") equals 0.600613.

See also

HOUR, MINUTE.


Name

TODAY

Synopsis

TODAY()

Description

TODAY returns the serial number for today (the number of days elapsed since the 1st of January of 1900).

  • This function is Excel compatible.

Examples

TODAY() returns 'Nov 6, 2001' on that particular day.

See also

NOW.


Name

UNIX2DATE

Synopsis

UNIX2DATE(unixtime)

Description

UNIX2DATE converts a unix time into a spreadsheet date and time.

A unix time is the number of seconds since midnight January 1, 1970.

Examples

See also

NOW, DATE, DATE2UNIX.


Name

WEEKDAY

Synopsis

WEEKDAY (date[, method])

Description

WEEKDAY converts a serial number to a weekday.

This function returns an integer indicating the day of week.

METHOD indicates the numbering system. It defaults to 1.

For METHOD=1: Sunday is 1, Monday is 2, etc.

For METHOD=2: Monday is 1, Tuesday is 2, etc.

For METHOD=3: Monday is 0, Tuesday is 1, etc.

  • Note that Gnumeric will perform regular string to serial number conversion for you, so you can enter a date as a string.

  • This function is Excel compatible.

Examples

WEEKDAY("10/24/1968") equals 5 (Thursday).

See also

DAY, MONTH, TIME, NOW, YEAR.


Name

WEEKNUM

Synopsis

WEEKNUM (date[,method])

Description

WEEKNUM returns the week number of date according to the given method.

method defaults to 1.

For method=1, week starts on Sunday, and days before first Sunday are in week 0.

For method=2, week starts on Monday, and days before first Monday are in week 0.

For method=150, the ISO 8601 week number is returned.

  • WEEKNUM returns #NUM! if date or method is invalid.

  • This function is Excel compatible, except that Excel does not support ISO 8601 week numbers.

Examples

If A1 contains 12/21/00 then WEEKNUM(A1,2)=51

See also

ISOWEEKNUM.


Name

WORKDAY

Synopsis

WORKDAY (start_date,days[,holidays])

Description

WORKDAY returns the date which is days working days from the start_date. Weekends and holidays optionally supplied in holidays are respected.

  • WORKDAY returns #NUM! if start_date or days are invalid.

  • This function is Excel compatible.

Examples

DAY(WORKDAY(DATE(2001,1,5),30)) equals 16 and

MONTH(WORKDAY(DATE(2001,1,5),30)) equals 2.

See also

NETWORKDAYS.


Name

YEAR

Synopsis

YEAR (date)

Description

YEAR converts a serial number to a year.

  • Note that Gnumeric will perform regular string to serial number conversion for you, so you can enter a date as a string.

  • This function is Excel compatible.

Examples

YEAR(DATE(2003, 4, 30)) equals 2003.

See also

DAY, MONTH, TIME, NOW.


Name

YEARFRAC

Synopsis

YEARFRAC (start_date, end_date [,basis])

Description

YEARFRAC returns the number of full days between start_date and end_date according to the basis.

Examples

See also

DATEDIF.

Engineering

Name

BESSELI

Synopsis

BESSELI(x,y)

Description

BESSELI function returns the Neumann, Weber or Bessel function.

x is where the function is evaluated. y is the order of the Bessel function, if non-integer it is truncated.

  • If x or y are not numeric a #VALUE! error is returned.

  • If y < 0 a #NUM! error is returned.

  • This function is Excel compatible.

Examples

BESSELI(0.7,3) equals 0.007367374.

See also

BESSELJ, BESSELK, BESSELY.


Name

BESSELJ

Synopsis

BESSELJ(x,y)

Description

BESSELJ function returns the Bessel function with x is where the function is evaluated. y is the order of the Bessel function, if non-integer it is truncated.

  • If x or y are not numeric a #VALUE! error is returned.

  • If y < 0 a #NUM! error is returned.

  • This function is Excel compatible.

Examples

BESSELJ(0.89,3) equals 0.013974004.

See also

BESSELI, BESSELK, BESSELY.


Name

BESSELK

Synopsis

BESSELK(x,y)

Description

BESSELK function returns the Neumann, Weber or Bessel function. x is where the function is evaluated. y is the order of the Bessel function, if non-integer it is truncated.

  • If x or y are not numeric a #VALUE! error is returned.

  • If y < 0 a #NUM! error is returned.

  • This function is Excel compatible.

Examples

BESSELK(3,9) equals 397.95880.

See also

BESSELI, BESSELJ, BESSELY.


Name

BESSELY

Synopsis

BESSELY(x,y)

Description

BESSELY function returns the Neumann, Weber or Bessel function.

x is where the function is evaluated. y is the order of the Bessel function, if non-integer it is truncated.

  • If x or y are not numeric a #VALUE! error is returned.

  • If y < 0 a #NUM! error is returned.

  • This function is Excel compatible.

Examples

BESSELY(4,2) equals 0.215903595.

See also

BESSELI, BESSELJ, BESSELK.


Name

BIN2DEC

Synopsis

BIN2DEC(x)

Description

BIN2DEC function converts a binary number in string or number to its decimal equivalent.

  • This function is Excel compatible.

Examples

BIN2DEC(101) equals 5.

See also

DEC2BIN, BIN2OCT, BIN2HEX.


Name

BIN2HEX

Synopsis

BIN2HEX(number[,places])

Description

BIN2HEX function converts a binary number to a hexadecimal number. places is an optional field, specifying to zero pad to that number of spaces.

  • If places is too small or negative #NUM! error is returned.

  • This function is Excel compatible.

Examples

BIN2HEX(100111) equals 27.

See also

HEX2BIN, BIN2OCT, BIN2DEC.


Name

BIN2OCT

Synopsis

BIN2OCT(number[,places])

Description

BIN2OCT function converts a binary number to an octal number. places is an optional field, specifying to zero pad to that number of spaces.

  • If places is too small or negative #NUM! error is returned.

  • This function is Excel compatible.

Examples

BIN2OCT(110111) equals 67.

See also

OCT2BIN, BIN2DEC, BIN2HEX.


Name

CONVERT

Synopsis

CONVERT(number,from_unit,to_unit)

Description

CONVERT returns a conversion from one measurement system to another. For example, you can convert a weight in pounds to a weight in grams. number is the value you want to convert, from_unit specifies the unit of the number, and to_unit is the unit for the result.

from_unit and to_unit can be any of the following:

Weight and mass:

'g' Gram

'sg' Slug

'lbm' Pound

'u' U (atomic mass)

'ozm' Ounce

Distance:

'm' Meter

'mi' Statute mile

'Nmi' Nautical mile

'in' Inch

'ft' Foot

'yd' Yard

'ang' Angstrom

'Pica' Pica

Time:

'yr' Year

'day' Day

'hr' Hour

'mn' Minute

'sec' Second

Pressure:

'Pa' Pascal

'atm' Atmosphere

'mmHg' mm of Mercury

Force:

'N' Newton

'dyn' Dyne

'lbf' Pound force

Energy:

'J' Joule

'e' Erg

'c' Thermodynamic calorie

'cal' IT calorie

'eV' Electron volt

'HPh' Horsepower-hour

'Wh' Watt-hour

'flb' Foot-pound

'BTU' BTU

Power:

'HP' Horsepower

'W' Watt

Magnetism:

'T' Tesla

'ga' Gauss

Temperature:

'C' Degree Celsius

'F' Degree Fahrenheit

'K' Degree Kelvin

Liquid measure:

'tsp' Teaspoon

'tbs' Tablespoon

'oz' Fluid ounce

'cup' Cup

'pt' Pint

'qt' Quart

'gal' Gallon

'l' Liter

For metric units any of the following prefixes can be used:

'Y' yotta 1E+24

'Z' zetta 1E+21

'E' exa 1E+18

'P' peta 1E+15

'T' tera 1E+12

'G' giga 1E+09

'M' mega 1E+06

'k' kilo 1E+03

'h' hecto 1E+02

'e' deka 1E+01

'd' deci 1E-01

'c' centi 1E-02

'm' milli 1E-03

'u' micro 1E-06

'n' nano 1E-09

'p' pico 1E-12

'f' femto 1E-15

'a' atto 1E-18

'z' zepto 1E-21

'y' yocto 1E-24

  • If from_unit and to_unit are different types, CONVERT returns #NUM! error.

  • This function is Excel compatible.

Examples

CONVERT(3,"lbm","g") equals 1360.7769.

CONVERT(5.8,"m","in") equals 228.3465.

CONVERT(7.9,"cal","J") equals 33.07567.

See also


Name

DEC2BIN

Synopsis

DEC2BIN(number[,places])

Description

DEC2BIN function converts a decimal number to a binary number. places is an optional field, specifying to zero pad to that number of spaces.

  • If places is too small or negative #NUM! error is returned.

  • This function is Excel compatible.

Examples

DEC2BIN(42) equals 101010.

See also

BIN2DEC, DEC2OCT, DEC2HEX.


Name

DEC2HEX

Synopsis

DEC2HEX(number[,places])

Description

DEC2HEX function converts a decimal number to a hexadecimal number. places is an optional field, specifying to zero pad to that number of spaces.

  • If places is too small or negative #NUM! error is returned.

  • This function is Excel compatible.

Examples

DEC2HEX(42) equals 2A.

See also

HEX2DEC, DEC2BIN, DEC2OCT.


Name

DEC2OCT

Synopsis

DEC2OCT(number[,places])

Description

DEC2OCT function converts a decimal number to an octal number. places is an optional field, specifying to zero pad to that number of spaces.

  • If places is too small or negative #NUM! error is returned.

  • This function is Excel compatible.

Examples

DEC2OCT(42) equals 52.

See also

OCT2DEC, DEC2BIN, DEC2HEX.


Name

DELTA

Synopsis

DELTA(x[,y])

Description

DELTA function tests for numerical equivalence of two arguments, returning 1 in case of equality.

  • y is optional, and defaults to 0.

  • If either argument is non-numeric returns a #VALUE! error.

  • This function is Excel compatible.

Examples

DELTA(42.99,43) equals 0.

See also

EXACT, GESTEP.


Name

ERF

Synopsis

ERF([lower limit,]upper_limit)

Description

ERF returns the error function. With a single argument ERF returns the error function, defined as

erf(x) = 2/sqrt(pi)* integral from 0 to x of exp(-t*t) dt.

If two arguments are supplied, they are the lower and upper limits of the integral.

  • If either lower_limit or upper_limit is not numeric a #VALUE! error is returned.

  • This function is upward-compatible with that in Excel. (If two arguments are supplied, Excel will not allow either to be negative.)

Examples

ERF(0.4) equals 0.428392355.

ERF(1.6448536269515/SQRT(2)) equals 0.90.

The second example shows that a random variable with a normal distribution has a 90 percent chance of falling within approximately 1.645 standard deviations of the mean.

See also

ERFC.


Name

ERFC

Synopsis

ERFC(x)

Description

ERFC function returns the complementary error function, defined as

1 - erf(x).

erfc(x) is calculated more accurately than 1 - erf(x) for arguments larger than about 0.5.

  • If x is not numeric a #VALUE! error is returned.

Examples

ERFC(6) equals 2.15197367e-17.

See also

ERF.


Name

GESTEP

Synopsis

GESTEP(x[,y])

Description

GESTEP function test for if x is >= y, returning 1 if it is so, and 0 otherwise. y is optional, and defaults to 0.

  • If either argument is non-numeric returns a #VALUE! error.

  • This function is Excel compatible.

Examples

GESTEP(5,4) equals 1.

See also

DELTA.


Name

HEX2BIN

Synopsis

HEX2BIN(number[,places])

Description

HEX2BIN function converts a hexadecimal number to a binary number. places is an optional field, specifying to zero pad to that number of spaces.

  • If places is too small or negative #NUM! error is returned.

  • This function is Excel compatible.

Examples

HEX2BIN("2A") equals 101010.

See also

BIN2HEX, HEX2OCT, HEX2DEC.


Name

HEX2DEC

Synopsis

HEX2DEC(x)

Description

HEX2DEC function converts a hexadecimal number to its decimal equivalent.

  • This function is Excel compatible.

Examples

HEX2DEC("2A") equals 42.

See also

DEC2HEX, HEX2BIN, HEX2OCT.


Name

HEX2OCT

Synopsis

HEX2OCT(number[,places])

Description

HEX2OCT function converts a hexadecimal number to an octal number. places is an optional field, specifying to zero pad to that number of spaces.

  • If places is too small or negative #NUM! error is returned.

  • This function is Excel compatible.

Examples

HEX2OCT("2A") equals 52.

See also

OCT2HEX, HEX2BIN, HEX2DEC.


Name

OCT2BIN

Synopsis

OCT2BIN(number[,places])

Description

OCT2BIN function converts an octal number to a binary number. places is an optional field, specifying to zero pad to that number of spaces.

  • If places is too small or negative #NUM! error is returned.

  • This function is Excel compatible.

Examples

OCT2BIN("213") equals 10001011.

See also

BIN2OCT, OCT2DEC, OCT2HEX.


Name

OCT2DEC

Synopsis

OCT2DEC(x)

Description

OCT2DEC function converts an octal number in a string or number to its decimal equivalent.

  • This function is Excel compatible.

Examples

OCT2DEC("124") equals 84.

See also

DEC2OCT, OCT2BIN, OCT2HEX.


Name

OCT2HEX

Synopsis

OCT2HEX(number[,places])

Description

OCT2HEX function converts an octal number to a hexadecimal number. places is an optional field, specifying to zero pad to that number of spaces.

  • If places is too small or negative #NUM! error is returned.

  • This function is Excel compatible.

Examples

OCT2HEX(132) equals 5A.

See also

HEX2OCT, OCT2BIN, OCT2DEC.

Finance

Name

ACCRINT

Synopsis

ACCRINT(issue,first_interest,settlement,rate,par,frequency[,basis])

Description

ACCRINT calculates the accrued interest for a security that pays periodic interest.

issue is the issue date of the security. first_interest is the first interest date of the security. settlement is the settlement date of the security. The settlement date is always after the issue date (the date when the security is bought). rate is the annual rate of the security and par is the par value of the security. frequency is the number of coupon payments per year.

Allowed frequencies are:

1 = annual,

2 = semi,

4 = quarterly.

basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If issue date, first_interest date, or settlement date is not valid, ACCRINT returns #NUM! error.

  • The dates must be issue < first_interest < settlement, or ACCRINT returns #NUM! error.

  • If rate <= 0 or par <= 0 , ACCRINT returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis < 0 or basis > 4, ACCRINT returns #NUM! error.

  • If issue date is after settlement date or they are the same, ACCRINT returns #NUM! error.

Examples

See also

ACCRINTM.


Name

ACCRINTM

Synopsis

ACCRINTM(issue,maturity,rate[,par,basis])

Description

ACCRINTM calculates and returns the accrued interest for a security from issue to maturity date.

issue is the issue date of the security. maturity is the maturity date of the security. rate is the annual rate of the security and par is the par value of the security. If you omit par, ACCRINTM applies $1,000 instead. basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If issue date or maturity date is not valid, ACCRINTM returns #NUM! error.

  • If rate <= 0 or par <= 0, ACCRINTM returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis < 0 or basis > 4, ACCRINTM returns #NUM! error.

  • If issue date is after maturity date or they are the same, ACCRINTM returns #NUM! error.

Examples

See also

ACCRINT.


Name

AMORDEGRC

Synopsis

AMORDEGRC(cost,purchase_date,first_period,salvage,period,rate[,basis])

Description

AMORDEGRC: Calculates depreciation for each accounting period using French accounting conventions. Assets purchased in the middle of a period take prorated depreciation into account. This is similar to AMORLINC, except that a depreciation coefficient is applied in the calculation depending on the life of the assets.

Named for AMORtissement DEGRessif Comptabilite

cost The value of the asset.

purchase_date The date the asset was purchased.

first_period The end of the first period.

salvage Asset value at maturity.

period The length of accounting periods.

rate rate of depreciation as a percentage.

basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If basis is omitted, US 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples

AMORDEGRC(2400,DATE(1998,8,19),DATE(1998,12,30),300,1,0.14,1) = 733

See also

AMORLINC.


Name

AMORLINC

Synopsis

AMORLINC(cost,purchase_date,first_period,salvage,period,rate[,basis])

Description

AMORLINC: Calculates depreciation for each accounting period using French accounting conventions. Assets purchased in the middle of a period take prorated depreciation into account.

Named for AMORtissement LINeaire Comptabilite.

cost The value of the asset.

purchase_date The date the asset was purchased.

first_period The end of the first period.

salvage Asset value at maturity.

period The length of accounting periods.

rate rate of depreciation as a percentage.

basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If basis is omitted, US 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples

AMORLINC(2400,DATE(1998,8,19),DATE(1998,12,31),300,1,0.15,1) = 360

See also

AMORDEGRC.


Name

COUPDAYBS

Synopsis

COUPDAYBS(settlement,maturity,frequency[,basis,eom])

Description

COUPDAYBS returns the number of days from the beginning of the coupon period to the settlement date.

settlement is the settlement date of the security.

maturity is the maturity date of the security.

frequency is the number of coupon payments per year.

eom = TRUE handles end of month maturity dates special.

Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly, 6 = bimonthly, 12 = monthly.

basis is the type of day counting system you want to use:

0 MSRB 30/360 (MSRB Rule G33 (e))

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

5 European+ 30/360

(See the gnumeric manual for a detailed description of these bases).

  • If frequency is invalid, COUPDAYBS returns #NUM! error.

  • If basis is omitted, MSRB 30/360 is applied.

  • If basis is invalid, #NUM! error is returned.

Examples

COUPDAYBS (DATE(2002,11,29),DATE(2004,2,29),4,0) = 89

COUPDAYBS (DATE(2002,11,29),DATE(2004,2,29),4,0,FALSE) = 0

See also


Name

COUPDAYS

Synopsis

COUPDAYS(settlement,maturity,frequency[,basis,eom])

Description

COUPDAYS returns the number of days in the coupon period of the settlement date.

settlement is the settlement date of the security.

maturity is the maturity date of the security.

frequency is the number of coupon payments per year.

eom = TRUE handles end of month maturity dates special.

Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly, 6 = bimonthly, 12 = monthly.

basis is the type of day counting system you want to use:

0 MSRB 30/360 (MSRB Rule G33 (e))

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

5 European+ 30/360

(See the gnumeric manual for a detailed description of these bases).

  • If frequency is invalid, COUPDAYS returns #NUM! error.

  • If basis is omitted, MSRB 30/360 is applied.

  • If basis is invalid, #NUM! error is returned.

Examples

COUPDAYS (DATE(2002,11,29),DATE(2004,2,29),4,0) = 90

COUPDAYS (DATE(2002,11,29),DATE(2004,2,29),4,0,FALSE) = 90

COUPDAYS (DATE(2002,11,29),DATE(2004,2,29),4,1,FALSE) = 91

See also


Name

COUPDAYSNC

Synopsis

COUPDAYSNC(settlement,maturity,frequency[,basis,eom])

Description

COUPDAYSNC returns the number of days from the settlement date to the next coupon date.

settlement is the settlement date of the security.

maturity is the maturity date of the security.

frequency is the number of coupon payments per year.

eom = TRUE handles end of month maturity dates special.

Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly, 6 = bimonthly, 12 = monthly.

basis is the type of day counting system you want to use:

0 MSRB 30/360 (MSRB Rule G33 (e))

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

5 European+ 30/360

(See the gnumeric manual for a detailed description of these bases).

  • If frequency is invalid, COUPDAYSNC returns #NUM! error.

  • If basis is omitted, MSRB 30/360 is applied.

  • If basis is invalid, #NUM! error is returned.

Examples

COUPDAYSNC (DATE(2002,11,29),DATE(2004,2,29),4,0) = 1

COUPDAYSNC (DATE(2002,11,29),DATE(2004,2,29),4,0,FALSE) = 89

See also


Name

COUPNCD

Synopsis

COUPNCD(settlement,maturity,frequency[,basis,eom])

Description

COUPNCD returns the coupon date following settlement.

settlement is the settlement date of the security.

maturity is the maturity date of the security.

frequency is the number of coupon payments per year.

eom = TRUE handles end of month maturity dates special.

Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly, 6 = bimonthly, 12 = monthly.

basis is the type of day counting system you want to use:

0 MSRB 30/360 (MSRB Rule G33 (e))

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

5 European+ 30/360

(See the gnumeric manual for a detailed description of these bases).

  • If frequency is invalid, COUPNCD returns #NUM! error.

  • If basis is omitted, MSRB 30/360 is applied.

  • If basis is invalid, #NUM! error is returned.

Examples

COUPNCD (DATE(2002,11,29),DATE(2004,2,29),4,0) = 30-Nov-2002

COUPNCD (DATE(2002,11,29),DATE(2004,2,29),4,0,FALSE) = 28-Feb-2003

See also


Name

COUPNUM

Synopsis

COUPNUM(settlement,maturity,frequency[,basis,eom])

Description

COUPNUM returns the numbers of coupons to be paid between the settlement and maturity dates, rounded up.

settlement is the settlement date of the security.

maturity is the maturity date of the security.

frequency is the number of coupon payments per year.

eom = TRUE handles end of month maturity dates special.

Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. 6 = bimonthly, 12 = monthly.

basis is the type of day counting system you want to use:

0 MSRB 30/360 (MSRB Rule G33 (e))

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

5 European+ 30/360

  • If frequency is other than 1, 2, 4, 6 or 12, COUPNUM returns #NUM! error.

  • If basis is omitted, MSRB 30/360 is applied.

  • If basis is not in between 0 and 5, #NUM! error is returned.

Examples

COUPNUM (DATE(2002,11,29),DATE(2004,2,29),4,0) = 6

COUPNUM (DATE(2002,11,29),DATE(2004,2,29),4,0,FALSE) = 5

See also


Name

COUPPCD

Synopsis

COUPPCD(settlement,maturity,frequency[,basis,eom])

Description

COUPPCD returns the coupon date preceding settlement.

settlement is the settlement date of the security.

maturity is the maturity date of the security.

frequency is the number of coupon payments per year.

eom = TRUE handles end of month maturity dates special.

Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly, 6 = bimonthly, 12 = monthly.

basis is the type of day counting system you want to use:

0 MSRB 30/360 (MSRB Rule G33 (e))

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

5 European+ 30/360

(See the gnumeric manual for a detailed description of these bases).

  • If frequency is invalid, COUPPCD returns #NUM! error.

  • If basis is omitted, MSRB 30/360 is applied.

  • If basis is invalid, #NUM! error is returned.

Examples

COUPPCD (DATE(2002,11,29),DATE(2004,2,29),4,0) = 31-Aug-2002

COUPPCD (DATE(2002,11,29),DATE(2004,2,29),4,0,FALSE) = 29-Nov-2002

See also


Name

CUM_BIV_NORM_DIST

Synopsis

CUM_BIV_NORM_DIST(a,b,rho)

Description

CUM_BIV_NORM_DIST calculates the cumulative bivariate normal distribution from parameters a, b & rho. The return value is the probability that two random variables with correlation rho are respectively each less than a and b.

Examples


Name

CUMIPMT

Synopsis

CUMIPMT(rate,nper,pv,start_period,end_period,type)

Description

CUMIPMT returns the cumulative interest paid on a loan between start_period and end_period.

  • If rate <= 0, CUMIPMT returns #NUM! error.

  • If nper <= 0, CUMIPMT returns #NUM! error.

  • If pv <= 0, CUMIPMT returns #NUM! error.

  • If start_period < 1, CUMIPMT returns #NUM! error.

  • If end_period < start_period, CUMIPMT returns #NUM! error.

  • If end_period > nper, CUMIPMT returns #NUM! error.

  • If type <> 0 and type <> 1, CUMIPMT returns #NUM! error.

Examples

See also


Name

CUMPRINC

Synopsis

CUMPRINC(rate,nper,pv,start_period,end_period,type)

Description

CUMPRINC returns the cumulative principal paid on a loan between start_period and end_period.

  • If rate <= 0, CUMPRINC returns #NUM! error.

  • If nper <= 0, CUMPRINC returns #NUM! error.

  • If pv <= 0, CUMPRINC returns #NUM! error.

  • If start_period < 1, CUMPRINC returns #NUM! error.

  • If end_period < start_period, CUMPRINC returns #NUM! error.

  • If end_period > nper, CUMPRINC returns #NUM! error.

  • If type <> 0 and type <> 1, CUMPRINC returns #NUM! error.

Examples

See also


Name

DB

Synopsis

DB(cost,salvage,life,period[,month])

Description

DB calculates the depreciation of an asset for a given period using the fixed-declining balance method. cost is the initial value of the asset. salvage is the value after the depreciation.

life is the number of periods overall. period is the period for which you want the depreciation to be calculated. month is the number of months in the first year of depreciation.

  • If month is omitted, it is assumed to be 12.

  • If cost = 0, DB returns #NUM! error.

  • If life <= 0, DB returns #NUM! error.

  • If salvage / cost < 0, DB returns #NUM! error.

Examples

See also

DDB, SLN, SYD.


Name

DDB

Synopsis

DDB(cost,salvage,life,period[,factor])

Description

DDB returns the depreciation of an asset for a given period using the double-declining balance method or some other similar method you specify.

cost is the initial value of the asset, salvage is the value after the last period, life is the number of periods, period is the period for which you want the depreciation to be calculated, and factor is the factor at which the balance declines.

  • If factor is omitted, it is assumed to be two (double-declining balance method).

  • If life <= 0, DDB returns #NUM! error.

Examples

See also

SLN, SYD.


Name

DISC

Synopsis

DISC(settlement,maturity,par,redemption[,basis])

Description

DISC calculates and returns the discount rate for a security. settlement is the settlement date of the security.

maturity is the maturity date of the security. par is the price per $100 face value of the security. redemption is the redeption value per $100 face value of the security.

basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If settlement date or maturity date is not valid, DISC returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis < 0 or basis > 4, DISC returns #NUM! error.

  • If settlement date is after maturity date or they are the same, DISC returns #NUM! error.

Examples

See also


Name

DOLLARDE

Synopsis

DOLLARDE(fractional_dollar,fraction)

Description

DOLLARDE converts a dollar price expressed as a fraction into a dollar price expressed as a decimal number.

fractional_dollar is the fractional number to be converted. fraction is the denominator of the fraction.

  • If fraction is non-integer it is truncated.

  • If fraction <= 0, DOLLARDE returns #NUM! error.

Examples

See also

DOLLARFR.


Name

DOLLARFR

Synopsis

DOLLARFR(decimal_dollar,fraction)

Description

DOLLARFR converts a decimal dollar price into a dollar price expressed as a fraction.

  • If fraction is non-integer it is truncated.

  • If fraction <= 0, DOLLARFR returns #NUM! error.

Examples

See also

DOLLARDE.


Name

DURATION

Synopsis

DURATION(settlement,maturity,coup,yield,frequency[,basis])

Description

DURATION calculates the duration of a security.

settlement is the settlement date of the security.

maturity is the maturity date of the security.

coup The annual coupon rate as a percentage.

yield The annualized yield of the security as a percentage.

frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If frequency is other than 1, 2, or 4, DURATION returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples


Name

EFFECT

Synopsis

EFFECT(r,nper)

Description

EFFECT calculates the effective interest rate from a given nominal rate.

Effective interest rate is calculated using this formula:

(1 + r / nper) ^ nper - 1

where:

r = nominal interest rate (stated in yearly terms)

nper = number of periods used for compounding

  • If rate < 0, EFFECT returns #NUM! error.

  • If nper <= 0, EFFECT returns #NUM! error.

Examples

For example credit cards will list an APR (annual percentage rate) which is a nominal interest rate.

For example if you wanted to find out how much you are actually paying interest on your credit card that states an APR of 19% that is compounded monthly you would type in:

=EFFECT(.19,12) and you would get .2075 or 20.75%. That is the effective percentage you will pay on your loan.

See also

NOMINAL.


Name

EURO

Synopsis

EURO(currency)

Description

EURO converts one Euro to a given national currency in the European monetary union.

currency is one of the following:

ATS (Austria)

BEF (Belgium)

DEM (Germany)

ESP (Spain)

EUR (Euro)

FIM (Finland)

FRF (France)

GRD (Greek)

IEP (Ireland)

ITL (Italy)

LUF (Luxembourg)

NLG (Netherlands)

PTE (Portugal)

  • If the given currency is other than one of the above, EURO returns #NUM! error.

Examples

EURO("DEM") returns 1.95583.

See also


Name

EUROCONVERT

Synopsis

EUROCONVERT(n,source,target)

Description

EUROCONVERT converts the currency value n of source currency to a target currency target. Both currencies are given as three-letter strings using the ISO code system names. The following currencies are available:

ATS (Austria)

BEF (Belgium)

DEM (Germany)

ESP (Spain)

EUR (Euro)

FIM (Finland)

FRF (France)

GRD (Greek)

IEP (Ireland)

ITL (Italy)

LUF (Luxembourg)

NLG (Netherlands)

PTE (Portugal)

  • If the given source or target is other than one of the above, EUROCONVERT returns #VALUE! error.

Examples

EUROCONVERT(2.1,"DEM","EUR") returns 1.07.

See also

EURO.


Name

FV

Synopsis

FV(rate,nper,pmt[,pv,type])

Description

FV computes the future value of an investment. This is based on periodic, constant payments and a constant interest rate. The interest rate per period is rate, nper is the number of periods in an annuity, pmt is the payment made each period, pv is the present value and type is when the payment is made.

  • If type = 1 then the payment is made at the beginning of the period.

  • If type = 0 it is made at the end of each period.

Examples

See also

PV, PMT, PPMT.


Name

FVSCHEDULE

Synopsis

FVSCHEDULE(principal,schedule)

Description

FVSCHEDULE returns the future value of given initial value after applying a series of compound periodic interest rates. The argument principal is the present value; schedule is an array of interest rates to apply. The schedule argument must be a range of cells.

Examples

Let us assume that the cells A1, A2, ..., A5 contain interest rates 0.11, 0.13, 0.09, 0.17, and 0.03. Then

FVSCHEDULE(3000,A1:A5) equals 4942.7911611.

See also

PV, FV.


Name

G_DURATION

Synopsis

G_DURATION(rate,pv,fv)

Description

G_DURATION calculates number of periods needed for an investment to attain a desired value. This function is similar to FV and PV with a difference that we do not need give the direction of cash flows e.g. -100 for a cash outflow and +100 for a cash inflow.

  • If rate <= 0, G_DURATION returns #DIV0 error.

  • If fv = 0 or pv = 0, G_DURATION returns #DIV0 error.

  • If fv / pv < 0, G_DURATION returns #VALUE error.

Examples

See also

PPMT, PV, FV, DURATION, MDURATION.


Name

INTRATE

Synopsis

INTRATE(settlement,maturity,investment,redemption[,basis])

Description

INTRATE calculates and returns the interest rate of a fully vested security.

settlement is the settlement date of the security. maturity is the maturity date of the security. investment is the prize of the security paid at settlement date and redemption is the amount to be received at maturity date.

basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If settlement date or maturity date is not valid, INTRATE returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis < 0 or basis > 4, INTRATE returns #NUM! error.

  • If settlement date is after maturity date or they are the same, INTRATE returns #NUM! error.

Examples

If you had a bond with a settlement date of April 15, 2000, maturity date September 30, 2000, investment of $100,000, redemption value $103,525, using the actual/actual basis, the bond discount rate is:

=INTRATE(36631, 36799, 100000, 103525, 1) which equals 0.0648 or 6.48%

See also

RECEIVED, DATE.


Name

IPMT

Synopsis

IPMT(rate,per,nper,pv[,fv,type])

Description

IPMT calculates the amount of a payment of an annuity going towards interest.

Formula for IPMT is:

IPMT(PER) = -PRINCIPAL(PER-1) * INTEREST_RATE

where:

PRINCIPAL(PER-1) = amount of the remaining principal from last period

  • If fv is omitted, it is assumed to be 0.

  • If type is omitted, it is assumed to be 0.

Examples

See also

PPMT, PV, FV.


Name

IRR

Synopsis

IRR(values[,guess])

Description

IRR calculates and returns the internal rate of return of an investment. This function is closely related to the net present value function (NPV). The IRR is the interest rate for a series of cash flows where the net preset value is zero.

values contains the series of cash flows generated by the investment. The payments should occur at regular intervals. The optional guess is the initial value used in calculating the IRR. You do not have to use that, it is only provided for the Excel compatibility.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1:A8 contain the numbers -32432, 5324, 7432, 9332, 12324, 4334, 1235, -3422. Then

IRR(A1:A8) returns 0.04375.

See also

FV, NPV, PV.


Name

ISPMT

Synopsis

ISPMT(rate,per,nper,pv)

Description

ISPMT function returns the interest paid on a given period.

  • If per < 1 or per > nper, ISPMT returns #NUM! error.

Examples

See also

PV.


Name

MDURATION

Synopsis

MDURATION(settlement,maturity,coupon,yield,frequency[,basis])

Description

MDURATION returns the Macauley duration for a security with par value 100.

basis is the type of day counting system you want to use:

0 MSRB 30/360 (MSRB Rule G33 (e))

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

5 European+ 30/360

  • If settlement or maturity are not valid dates, MDURATION returns #NUM! error.

  • If frequency is other than 1, 2, or 4, MDURATION returns #NUM! error.

  • If basis is omitted, MSRB 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples

See also

DURATION, G_DURATION.


Name

MIRR

Synopsis

MIRR(values,finance_rate,reinvest_rate)

Description

MIRR function returns the modified internal rate of return for a given periodic cash flow.

Examples

See also

NPV.


Name

NOMINAL

Synopsis

NOMINAL(r,nper)

Description

NOMINAL calculates the nominal interest rate from a given effective rate.

Nominal interest rate is given by a formula:

nper * (( 1 + r ) ^ (1 / nper) - 1 )

where:

r = effective interest rate

nper = number of periods used for compounding

  • If rate < 0, NOMINAL returns #NUM! error.

  • If nper <= 0, NOMINAL returns #NUM! error.

Examples

See also

EFFECT.


Name

NPER

Synopsis

NPER(rate,pmt,pv[,fv,type])

Description

NPER calculates number of periods of an investment based on periodic constant payments and a constant interest rate.

The interest rate per period is rate, pmt is the payment made each period, pv is the present value, fv is the future value and type is when the payments are due. If type = 1, payments are due at the beginning of the period, if type = 0, payments are due at the end of the period.

  • If rate <= 0, NPER returns #DIV0 error.

Examples

For example, if you deposit $10,000 in a savings account that earns an interest rate of 6%. To calculate home many years it will take to double your investment use NPER as follows:

=NPER(0.06, 0, -10000, 20000,0)returns 11.895661046 which indicates that you can double your money just before the end of the 12th year.

See also

PPMT, PV, FV.


Name

NPV

Synopsis

NPV(rate,v1,v2,...)

Description

NPV calculates the net present value of an investment generating periodic payments. rate is the periodic interest rate and v1, v2, ... are the periodic payments. If the schedule of the cash flows are not periodic use the XNPV function.

Examples

NPV(0.17,-10000,3340,2941,2493,3233,1732,2932) equals 186.30673.

See also

PV, XNPV.


Name

ODDFPRICE

Synopsis

ODDFPRICE(settlement,maturity,issue,first_coupon,rate,yld,redemption,frequency[,basis])

Description

ODDFPRICE returns the price per $100 face value of a security. The security should have an odd short or long first period.

settlement is the settlement date of the security. maturity is the maturity date of the security. issue is the issue date of the security. frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If frequency is other than 1, 2, or 4, ODDFPRICE returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples

See also


Name

ODDFYIELD

Synopsis

ODDFYIELD(settlement,maturity,issue,first_coupon,rate,pr,redemption,frequency[,basis])

Description

ODDFYIELD calculates the yield of a security having an odd first period.

settlement is the settlement date of the security. maturity is the maturity date of the security. frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If frequency is other than 1, 2, or 4, ODDFYIELD returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples

See also


Name

ODDLPRICE

Synopsis

ODDLPRICE(settlement,maturity,last_interest,rate,yld,redemption,frequency[,basis])

Description

ODDLPRICE calculates the price per $100 face value of a security that has an odd last coupon period.

settlement is the settlement date of the security. maturity is the maturity date of the security. frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If frequency is other than 1, 2, or 4, ODDLPRICE returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples

See also


Name

ODDLYIELD

Synopsis

ODDLYIELD(settlement,maturity,last_interest,rate,pr,redemption,frequency[,basis])

Description

ODDLYIELD calculates the yield of a security having an odd last period.

settlement is the settlement date of the security. maturity is the maturity date of the security. frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If frequency is other than 1, 2, or 4, ODDLYIELD returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples

See also


Name

OPT_BAW_AMER

Synopsis

OPT_BAW_AMER(call_put_flag,spot,strike,time,rate,cost_of_carry,volatility)

Description

OPT_BAW_AMER models the theoretical price of an option according to the Barone Adesie & Whaley approximation.

call_put_flag is c or p to indicate whether the option is a call or a put

spot is the spot price of the underlying asset

strike is the strike price at which the option is struck

time is the number of days to maturity of the option

rate is the risk annualised free rate of interest

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

volatility is the annualised volatility in price of the underlying

Examples


Name

OPT_BJERSTENS

Synopsis

OPT_BJERSTENS(call_put_flag,spot,strike,time,rate,volatility[,cost_of_carry])

Description

OPT_BJERSTENS models the theoretical price of american options according to the Bjerksund & Stensland approximation technique.

call_put_flag is c or p to indicate whether the option is a call or a put

spot is the spot price of the underlying asset

strike is the strike price at which the option is struck

time is the number of days to maturity of the option

rate is the risk annualised free rate of interest

volatility is the annualised volatility in price of the underlying

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield.

Examples


Name

OPT_BS

Synopsis

OPT_BS(call_put_flag,spot,strike,time,rate,volatility [,cost_of_carry])

Description

OPT_BS uses the Black-Scholes model to calculate the price of a European option using call_put_flag, call_put_flag, c or p struck at strike on an asset with spot price spot.

time is the time to maturity of the option expressed in years

rate is the risk-free interest rate

volatility is the annualized volatility, in percent, of the asset or the period through to the exercise date.

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

  • The returned value will be expressed in the same units as strike and spot.

Examples


Name

OPT_BS_CARRYCOST

Synopsis

OPT_BS_CARRYCOST(call_put_flag,spot,strike,time,rate,volatility[,cost_of_carry])

Description

OPT_BS_CARRYCOST uses the Black-Scholes model to calculate the "elasticity" of a European option struck at strike on an asset with spot price spot.

call_put_flag is c or p to indicate whether the option is a call or a put

(The elasticity of an option is the rate of change of its price with respect to its cost of carry.)

volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date. time is the time to maturity of the option expressed in years

rate is the risk-free interest rate to the exercise date, in percent.

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield.

  • The returned value will be expressed as the rate of change of option value, per 100% volatility.

Examples


Name

OPT_BS_DELTA

Synopsis

OPT_BS_DELTA(call_put_flag,spot,strike,time,rate,volatility[,cost_of_carry])

Description

OPT_BS_DELTA uses the Black-Scholes model to calculate the "delta" of a European option with call_put_flag, call_put_flag, c or p struck at strike on an asset with spot price spot.

Where time is the time to maturity of the option expressed in years

rate is the risk-free interest rate

volatility is the annualized volatility, in percent, of the asset or the period through to the exercise date.

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

  • The returned value will be expressed in the same units as strike and spot.

Examples


Name

OPT_BS_GAMMA

Synopsis

OPT_BS_GAMMA(spot,strike,time,rate,volatility[,cost_of_carry])

Description

OPT_BS_GAMMA uses the Black-Scholes model to calculate the "gamma" of a European option struck at strike on an asset with spot price spot.

(The gamma of an option is the second derivative of its price with respect to the price of the underlying asset, and is the same for calls and puts.)

time is the time to maturity of the option expressed in years

rate is the risk-free interest rate to the exercise date, in percent.

volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date.

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

  • The returned value will be expressed as the rate of change of delta per unit change in spot.

Examples


Name

OPT_BS_RHO

Synopsis

OPT_BS_RHO(call_put_flag,spot,strike,time,rate,volatility[,cost_of_carry])

Description

OPT_BS_RHO uses the Black-Scholes model to calculate the "rho" of a European option with call_put_flag, call_put_flag struck at strike on an asset with spot price spot.

call_put_flag is c or p to indicate whether the option is a call or a put.

(The rho of an option is the rate of change of its price with respect to the risk free interest rate.)

time is the time to maturity of the option expressed in years

rate is the risk-free interest rate to the exercise date, in percent.

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

  • The returned value will be expressed as the rate of change of option value, per 100% change in rate.

Examples


Name

OPT_BS_THETA

Synopsis

OPT_BS_THETA(call_put_flag,spot,strike,time,rate,volatility[,cost_of_carry])

Description

OPT_BS_THETA uses the Black-Scholes model to calculate the "theta" of a European option with call_put_flag, call_put_flag struck at strike on an asset with spot price spot.

(The theta of an option is the rate of change of its price with respect to time to expiry.)

time is the time to maturity of the option expressed in years

and rate is the risk-free interest rate to the exercise date, in percent.

volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date.

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

  • The returned value will be expressed as minus the rate of change of option value, per 365.25 days.

Examples


Name

OPT_BS_VEGA

Synopsis

OPT_BS_VEGA(spot,strike,time,rate,volatility[,cost_of_carry])

Description

OPT_BS_VEGA uses the Black-Scholes model to calculate the "vega" of a European option struck at strike on an asset with spot price spot.

(The vega of an option is the rate of change of its price with respect to volatility, and is the same for calls and puts.)

volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date.

time is the time to maturity of the option expressed in years

rate is the risk-free interest rate to the exercise date, in percent.

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield.

  • The returned value will be expressed as the rate of change of option value, per 100% volatility.

Examples


Name

OPT_COMPLEX_CHOOSER

Synopsis

OPT_COMPLEX_CHOOSER(call_put_flag,spot,strike_call,strike_put,time,time_call,time_put,rate,cost_of_carry,volatility)

Description

OPT_COMPLEX_CHOOSER models the theoretical price of complex chooser options.

call_put_flag is c or p to indicate whether the option is a call or a put

spot is the spot price of the underlying asset

strike_call is the strike price at which the option is struck

strike_put is the strike price at which the option is struck

time is the time in years until the holder chooses a put or a call option

time_call is the time in years to maturity of the call option if chosen

time_put is the time in years to maturity of the put option if chosen

rate is the risk annualised free rate of interest

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

volatility is the annualised volatility in price of the underlying

Examples


Name

OPT_EXEC

Synopsis

OPT_EXEC(call_put_flag,spot,strike,time,rate,volatility,cost_of_carry,lambda)

Description

OPT_EXEC models the theoretical price of executive stock options call_put_flag is c or p to indicate whether the option is a call or a put

One would expect this to always be a call option

spot is the spot price of the underlying asset

strike is the strike price at which the option is struck

time is the number of days to maturity of the option

rate is the risk annualised free rate of interest

volatility is the annualised volatility in price of the underlying

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

lambda is the jump rate for executives. The model assumes executives forfeit their options if they leave the company.

Examples


Name

OPT_EXTENDIBLE_WRITER

Synopsis

OPT_EXTENDIBLE_WRITER(call_put_flag,spot,strike1,strike2,time1,time2,rate,cost_of_carry,volatility)

Description

OPT_EXTENDIBLE_WRITER models the theoretical price of extendible writer options. These are options that can be exercised at an initial period, time1, or their maturity extended to time2 if the option is out of the money at time1

call_put_flag is c or p to indicate whether the option is a call or a put

spot is the spot price of the underlying asset.

strike1 is the strike price at which the option is struck.

strike2 is the strike price at which the option is struck.

time1 is the initial maturity of the option in years.

time2 is the is the extended maturity in years if chosen.

rate is the risk annualised free rate of interest.

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield.

volatility is the annualised volatility in price of the underlying.

Examples


Name

OPT_FORWARD_START

Synopsis

OPT_FORWARD_START(call_put_flag,spot,alpha,time1,time,rate,volatility,cost_of_carry)

Description

OPT_FORWARD_START models the theoretical price of forward start options

call_put_flag is c or p to indicate whether the option is a call or a put

spot is the spot price of the underlying asset

alpha is a fraction that set the strike price the future date time1

time1 is the number of days until the option starts

time is the number of days to maturity of the option

rate is the risk annualised free rate of interest

volatility is the annualised volatility in price of the underlying

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

Examples


Name

OPT_FRENCH

Synopsis

OPT_FRENCH(call_put_flag,spot,strike,time,t2,rate,volatility[,cost_of_carry])

Description

OPT_FRENCH values the theoretical price of a European option adjusted for trading day volatility, struck at strike on an asset with spot price spot.

call_put_flag is 'c' or 'p' to indicate whether the option is a call or a put.

volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date.

time the number of calendar days to exercise divided by calendar days in the year.

t2 is the number of trading days to exercise divided by trading days in the year.

rate is the risk-free interest rate.

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield to the exercise date, in percent.

  • The returned value will be expressed as the rate of change of option value, per 100% volatility.

Examples


Name

OPT_GARMAN_KOHLHAGEN

Synopsis

OPT_GARMAN_KOHLHAGEN(call_put_flag,spot,strike,time,domestic_rate,foreign_rate,volatility[,cost_of_carry])

Description

OPT_GARMAN_KOHLHAGEN values the theoretical price of a European currency option struck at strike on an asset with spot price spot.

call_put_flag is c or p to indicate whether the option is a call or a put

volatility is the annualized volatility, in percent, of the asset for the period through to the exercise date.

time the number of days to exercise

domestic_rate is the domestic risk-free interest rate to the exercise date

foreign_rate is the foreign risk-free interest rate to the exercise date, in percent.

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

  • The returned value will be expressed as the rate of change of option value, per 100% volatility.

Examples


Name

OPT_JUMP_DIFF

Synopsis

OPT_JUMP_DIFF(call_put_flag,spot,strike,time,rate,volatility,lambda,gamma)

Description

OPT_JUMP_DIFF models the theoretical price of an option according to the Jump Diffusion process (Merton).

call_put_flag is c or p to indicate whether the option is a call or a put

spot is the spot price of the underlying

strike is the strike price of the option

time is the time to maturity of the option expressed in years

rate is the annualised rate of interest

volatility is the annualized volatility of the underlying asset

lambda is expected number of 'jumps' per year

gamma is proportion of volatility explained by the 'jumps'

Examples


Name

OPT_MILTERSEN_SCHWARTZ

Synopsis

OPT_MILTERSEN_SCHWARTZ(call_put_flag,p_t,f_t,x,t1,t2,v_s,v_e,v_f,rho_se,rho_sf,rho_ef,kappa_e,kappa_f)

Description

OPT_MILTERSEN_SCHWARTZ models the theoretical price of options on commodities futures according to Miltersen & Schwartz.

call_put_flag is c or p to indicate whether the option is a call or a put

p_t is a zero coupon bond with expiry at option maturity

f_t is is the futures price

x is is the strike price

t1 is the time to maturity of the option

t2 is the time to maturity of the underlying commodity futures contract

v_s is the volatility of the spot commodity price

v_e is the volatility of the future convenience yield

v_f is the volatility of the forward rate of interest

rho_se is correlation between the spot commodity price and the convenience yield

rho_sf is correlation between the spot commodity price and the forward interest rate

rho_ef is correlation between the forward interest rate and the convenience yield

kappa_e is the speed of mean reversion of the convenience yield

kappa_f is the speed of mean reversion of the forward interest rate

Examples


Name

OPT_ON_OPTIONS

Synopsis

OPT_ON_OPTIONS(type_flag,spot,strike1,strike2,time1,time2,rate,cost_of_carry,volatility)

Description

OPT_ON_OPTIONS models the theoretical price of options on options

type_flag is 'cc' for calls on calls, 'cp' for calls on puts, and so on for 'pc', and 'pp'

spot is the spot price of the underlying asset.

strike1 is the strike price at which the option is struck.

strike2 is the strike price at which the option is struck.

time1 is the time in years to maturity of the option.

time2 is the time in years to the maturity of the underlying option.

(time2 >= time1)

rate is the risk annualised free rate of interest

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

volatility is the annualised volatility in price of the underlying

Examples


Name

OPT_RGW

Synopsis

OPT_RGW(call_put_flag,spot,strike,t1,t2,rate,d,volatility)

Description

OPT_RGW models the theoretical price of an american option according to the Roll-Geske-Whaley approximation where:

call_put_flag is c or p to indicate whether the option is a call or a put

spot is the spot price of the underlying asset

strike is the strike price at which the option is struck

t1 is the time to the dividend payout

t2 is the time to option expiration.

rate is the annualised rate of interest

d is the amount of the dividend to be paid

volatility is the annualized rate of volatility of the underlying asset

Examples


Name

OPT_SIMPLE_CHOOSER

Synopsis

OPT_SIMPLE_CHOOSER(call_put_flag,spot,strike,time1,time2,rate,cost_of_carry,volatility)

Description

OPT_SIMPLE_CHOOSER models the theoretical price of simple chooser options.

call_put_flag is c or p to indicate whether the option is a call or a put

spot is the spot price of the underlying asset

strike is the strike price at which the option is struck

time1 is the time in years until the holder chooses a put or a call option

time2 is the time in years until the the chosen option expires

rate is the risk annualised free rate of interest

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

Examples


Name

OPT_TIME_SWITCH

Synopsis

OPT_TIME_SWITCH(call_put_flag,spot,strike,a,time,m,dt,rate,cost_of_carry,volatility)

Description

OPT_TIME_SWITCH models the theoretical price of time switch options. (Pechtl 1995)

The holder receives a * dt for each period dt that the asset price was greater than the strike price (for a call) or below it (for a put)

call_put_flag is c or p to indicate whether the option is a call or a put

spot is the spot price of the underlying asset

strike is the strike price at which the option is struck

a is the amount received for each time period as discussed above

time is the maturity of the option in years

m is the number of time units the option has already met the condition

dt is the agreed upon discrete time period (often a day) expressed as a fraction of a year

rate is the risk annualised free rate of interest

cost_of_carry is the leakage in value of the underlying asset, for common stocks, this would be the dividend yield

Examples


Name

PMT

Synopsis

PMT(rate,nper,pv[,fv,type])

Description

PMT returns the amount of payment for a loan based on a constant interest rate and constant payments (each payment is equal amount).

rate is the constant interest rate.

nper is the overall number of payments.

pv is the present value.

fv is the future value.

type is the type of the payment: 0 means at the end of the period and 1 means at the beginning of the period.

  • If fv is omitted, Gnumeric assumes it to be zero.

  • If type is omitted, Gnumeric assumes it to be zero.

Examples

See also

PPMT, PV, FV.


Name

PPMT

Synopsis

PPMT(rate,per,nper,pv[,fv,type])

Description

PPMT calculates the amount of a payment of an annuity going towards principal.

Formula for it is:

PPMT(per) = PMT - IPMT(per)

where:

PMT = Payment received on annuity

IPMT(per) = amount of interest for period per

  • If fv is omitted, it is assumed to be 0.

  • If type is omitted, it is assumed to be 0.

Examples

See also

IPMT, PV, FV.


Name

PRICE

Synopsis

PRICE(settle,mat,rate,yield,redemption_price,[frequency,basis])

Description

PRICE returns price per $100 face value of a security. This method can only be used if the security pays periodic interest.

frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If frequency is other than 1, 2, or 4, PRICE returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples

See also


Name

PRICEDISC

Synopsis

PRICEDISC(settlement,maturity,discount,redemption[,basis])

Description

PRICEDISC calculates and returns the price per $100 face value of a security bond. The security does not pay interest at maturity.

settlement is the settlement date of the security. maturity is the maturity date of the security. discount is the rate for which the security is discounted. redemption is the amount to be received on maturity date.

basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If settlement date or maturity date is not valid, PRICEDISC returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis < 0 or basis > 4, PRICEDISC returns #NUM! error.

  • If settlement date is after maturity date or they are the same, PRICEDISC returns #NUM! error.

Examples

See also

PRICEMAT.


Name

PRICEMAT

Synopsis

PRICEMAT(settlement,maturity,issue,rate,yield[,basis])

Description

PRICEMAT calculates and returns the price per $100 face value of a security. The security pays interest at maturity.

settlement is the settlement date of the security. maturity is the maturity date of the security. issue is the issue date of the security. rate is the discount rate of the security. yield is the annual yield of the security. basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If settlement date or maturity date is not valid, PRICEMAT returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis < 0 or basis > 4, PRICEMAT returns #NUM! error.

  • If settlement date is after maturity date or they are the same, PRICEMAT returns #NUM! error.

Examples

See also

PRICEDISC.


Name

PV

Synopsis

PV(rate,nper,pmt[,fv,type])

Description

PV calculates the present value of an investment. rate is the periodic interest rate, nper is the number of periods used for compounding. pmt is the payment made each period, fv is the future value and type is when the payment is made.

  • If type = 1 then the payment is made at the beginning of the period.

  • If type = 0 (or omitted) it is made at the end of each period.

Examples

See also

FV.


Name

RATE

Synopsis

RATE(nper,pmt,pv[,fv,type,guess])

Description

RATE calculates the rate of an investment.

  • If nper <= 0, RATE returns #NUM! error.

  • If type != 0 and type != 1, RATE returns #VALUE! error.

Examples

See also

PV, FV.


Name

RECEIVED

Synopsis

RECEIVED(settlement,maturity,investment,rate[,basis])

Description

RECEIVED calculates and returns the amount to be received at maturity date for a security bond.

settlement is the settlement date of the security. maturity is the maturity date of the security. The amount of investment is specified in investment. rate is the security's discount rate.

basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If settlement date or maturity date is not valid, RECEIVED returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis < 0 or basis > 4, RECEIVED returns #NUM! error.

  • If settlement date is after maturity date or they are the same, RECEIVED returns #NUM! error.

Examples

See also

INTRATE.


Name

SLN

Synopsis

SLN(cost,salvage_value,life)

Description

SLN function will determine the straight line depreciation of an asset for a single period.

The formula is:

Depreciation expense = ( cost - salvage_value ) / life

cost is the cost of an asset when acquired (market value).

salvage_value is the amount you get when asset is sold at the end of the asset's useful life.

life is the anticipated life of an asset.

  • If life <= 0, SLN returns #NUM! error.

Examples

For example, lets suppose your company purchases a new machine for $10,000, which has a salvage value of $700 and will have a useful life of 10 years. The SLN yearly depreciation is computed as follows:

=SLN(10000, 700, 10)

This will return the yearly depreciation figure of $930.

See also

SYD.


Name

SYD

Synopsis

SYD(cost,salvage_value,life,period)

Description

SYD function calculates the sum-of-years digits depreciation for an asset based on its cost, salvage value, anticipated life and a particular period. This method accelerates the rate of the depreciation, so that more depreciation expense occurs in earlier periods than in later ones. The depreciable cost is the actual cost minus the salvage value. The useful life is the number of periods (typically years) over with the asset is depreciated.

The Formula used for sum-of-years digits depreciation is:

Depreciation expense =

( cost - salvage_value ) * (life - period + 1) * 2 / life * (life + 1).

cost is the cost of an asset when acquired (market value).

salvage_value is the amount you get when asset sold at the end of its useful life.

life is the anticipated life of an asset.

period is the period for which we need the expense.

  • If life <= 0, SYD returns #NUM! error.

Examples

For example say a company purchases a new computer for $5000 which has a salvage value of $200, and a useful life of five years. We would use the following to calculate the second year's depreciation using the SYD method:

=SYD(5000, 200, 5, 2) which returns 1,280.00.

See also

SLN.


Name

TBILLEQ

Synopsis

TBILLEQ(settlement,maturity,discount)

Description

TBILLEQ function returns the bond-yield equivalent (BEY) for a treasury bill. TBILLEQ is equivalent to

(365 * discount) / (360 - discount * DSM),

where DSM is the days between settlement and maturity.

  • If settlement is after maturity or the maturity is set to over one year later than the settlement, TBILLEQ returns #NUM! error.

  • If discount is negative, TBILLEQ returns #NUM! error.

Examples


Name

TBILLPRICE

Synopsis

TBILLPRICE(settlement,maturity,discount)

Description

TBILLPRICE function returns the price per $100 value for a treasury bill where settlement is the settlement date and maturity is the maturity date of the bill. discount is the treasury bill's discount rate.

  • If settlement is after maturity or the maturity is set to over one year later than the settlement, TBILLPRICE returns #NUM! error.

  • If discount is negative, TBILLPRICE returns #NUM! error.

Examples

See also

TBILLEQ, TBILLYIELD.


Name

TBILLYIELD

Synopsis

TBILLYIELD(settlement,maturity,pr)

Description

TBILLYIELD function returns the yield for a treasury bill. settlement is the settlement date and maturity is the maturity date of the bill. discount is the treasury bill's discount rate.

  • If settlement is after maturity or the maturity is set to over one year later than the settlement, TBILLYIELD returns #NUM! error.

  • If pr is negative, TBILLYIELD returns #NUM! error.

Examples

See also

TBILLEQ, TBILLPRICE.


Name

VDB

Synopsis

VDB(cost,salvage,life,start_period,end_period[,factor,switch])

Description

VDB calculates the depreciation of an asset for a given period or partial period using the double-declining balance method.

  • If start_period < 0, VDB returns #NUM! error.

  • If start_period > end_period, VDB returns #NUM! error.

  • If end_period > life, VDB returns #NUM! error.

  • If cost < 0, VDB returns #NUM! error.

  • If salvage > cost, VDB returns #NUM! error.

  • If factor <= 0, VDB returns #NUM! error.

Examples

See also

DB.


Name

XIRR

Synopsis

XIRR(values,dates[,guess])

Description

XIRR calculates and returns the internal rate of return of an investment that has not necessarily periodic payments. This function is closely related to the net present value function (NPV and XNPV). The XIRR is the interest rate for a series of cash flows where the XNPV is zero.

values contains the series of cash flows generated by the investment. dates contains the dates of the payments. The first date describes the payment day of the initial payment and thus all the other dates should be after this date. The optional guess is the initial value used in calculating the XIRR. You do not have to use that, it is only provided for the Excel compatibility.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1:A5 contain the numbers -6000, 2134, 1422, 1933, and 1422, and the cells B1:B5 contain the dates "1999-01-15", "1999-04-04", "1999-05-09", "2000-03-12", and "2000-05-1". Then

XIRR(A1:A5,B1:B5) returns 0.224838.

See also

IRR, XNPV.


Name

XNPV

Synopsis

XNPV(rate,values,dates)

Description

XNPV calculates the net present value of an investment. The schedule of the cash flows is given in dates array. The first date indicates the beginning of the payment schedule. rate is the interest rate and values are the payments.

  • If values and dates contain unequal number of values, XNPV returns the #NUM! error.

Examples

See also

NPV, PV.


Name

YIELD

Synopsis

YIELD(settlement,maturity,rate,price,redemption_price,frequency[,basis])

Description

YIELD returns the yield on a security that pays periodic interest.

frequency is the number of coupon payments per year. Allowed frequencies are: 1 = annual, 2 = semi, 4 = quarterly. basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If frequency is other than 1, 2, or 4, YIELD returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples

See also


Name

YIELDDISC

Synopsis

YIELDDISC(settlement,maturity,pr,redemption[,basis])

Description

YIELDDISC calculates the annual yield of a security that is discounted.

settlement is the settlement date of the security. maturity is the maturity date of the security. pr is the price per $100 face value of the security. redemption is the redemption value per $100 face value. basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If frequency is other than 1, 2, or 4, YIELDDISC returns #NUM! error.

  • If basis is omitted, US 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples

See also


Name

YIELDMAT

Synopsis

YIELDMAT(settlement,maturity,issue,rate,pr[,basis])

Description

YIELDMAT calculates the annual yield of a security for which the interest is payed at maturity date.

settlement is the settlement date of the security. maturity is the maturity date of the security. issue is the issue date of the security. rate is the interest rate set to the security. pr is the price per $100 face value of the security. basis is the type of day counting system you want to use:

0 US 30/360

1 actual days/actual days

2 actual days/360

3 actual days/365

4 European 30/360

  • If basis is omitted, US 30/360 is applied.

  • If basis is not in between 0 and 4, #NUM! error is returned.

Examples

See also

Gnumeric

Name

GNUMERIC_VERSION

Synopsis

GNUMERIC_VERSION()

Description

GNUMERIC_VERSION returns the version of gnumeric as a string.

Examples

GNUMERIC_VERSION().

See also

Information

Name

CELL

Synopsis

CELL(type,ref)

Description

CELL returns information about the formatting, location, or contents of a cell.

type specifies the type of information you want to obtain:

address Returns the given cell reference as text.

col Returns the number of the column in ref.

contents Returns the contents of the cell in ref.

format Returns the code of the format of the cell.

parentheses Returns 1 if ref contains a negative value

and its format displays it with parentheses.

row Returns the number of the row in ref.

width Returns the column width.

  • This function is Excel compatible.

Examples

Cell("format",A1) returns the code of the format of the cell A1.

See also


Name

COUNTBLANK

Synopsis

COUNTBLANK(range)

Description

COUNTBLANK returns the number of blank cells in a range.

  • This function is Excel compatible.

Examples

COUNTBLANK(A1:A20) returns the number of blank cell in A1:A20.

See also

COUNT.


Name

ERROR

Synopsis

ERROR(text)

Description

ERROR return the specified error.

Examples

ERROR("#OWN ERROR").

See also

ISERROR.


Name

ERROR.TYPE

Synopsis

ERROR.TYPE(value)

Description

ERROR.TYPE returns an error number corresponding to the given error value. The error numbers for error values are:

#DIV/0! 2

#VALUE! 3

#REF! 4

#NAME? 5

#NUM! 6

#N/A 7

  • This function is Excel compatible.

Examples

ERROR.TYPE(NA()) equals 7.

See also

ISERROR.


Name

EXPRESSION

Synopsis

EXPRESSION(cell)

Description

EXPRESSION returns expression in cell as a string, or empty if the cell is not an expression.

Examples

entering '=EXPRESSION(A3)' in A2 = empty (assuming there is nothing in A3).

entering '=EXPRESSION(A2)' in A1 = 'EXPRESSION(A3)'.

See also

TEXT.


Name

GETENV

Synopsis

GETENV(string)

Description

GETENV retrieves a value from the execution environment.

  • If the variable specified by string does not exist, #N/A! will be returned. Note, that variable names are case sensitive.

Examples

See also


Name

INFO

Synopsis

INFO(type)

Description

INFO returns information about the current operating environment.

type is the type of information you want to obtain:

memavail Returns the amount of memory available, bytes.

memused Returns the amount of memory used (bytes).

numfile Returns the number of active worksheets.

osversion Returns the operating system version.

recalc Returns the recalculation mode (automatic).

release Returns the version of Gnumeric as text.

system Returns the name of the environment.

totmem Returns the amount of total memory available.

  • This function is Excel compatible, except that types directory and origin are not implemented.

Examples

INFO("system") returns "Linux" on a Linux system.

See also


Name

ISBLANK

Synopsis

ISBLANK(value)

Description

ISBLANK returns TRUE if the value is blank.

  • This function is Excel compatible.

Examples

ISBLANK(A1).

See also


Name

ISERR

Synopsis

ISERR(value)

Description

ISERR returns TRUE if the value is any error value except #N/A.

  • This function is Excel compatible.

Examples

ISERR(NA()) return FALSE.

See also

ISERROR.


Name

ISERROR

Synopsis

ISERROR(value)

Description

ISERROR returns a TRUE value if the expression has an error.

  • This function is Excel compatible.

Examples

ISERROR(NA()) equals TRUE.

See also

ERROR.


Name

ISEVEN

Synopsis

ISEVEN(value)

Description

ISEVEN returns TRUE if the number is even.

  • This function is Excel compatible.

Examples

ISEVEN(4) equals TRUE.

See also

ISODD.


Name

ISLOGICAL

Synopsis

ISLOGICAL(value)

Description

ISLOGICAL returns TRUE if the value is a logical value.

  • This function is Excel compatible.

Examples

ISLOGICAL(A1).

See also


Name

ISNA

Synopsis

ISNA(value)

Description

ISNA returns TRUE if the value is the #N/A error value.

  • This function is Excel compatible.

Examples

ISNA(NA()) equals TRUE.

See also

NA.


Name

ISNONTEXT

Synopsis

ISNONTEXT(value)

Description

ISNONTEXT Returns TRUE if the value is not text.

  • This function is Excel compatible.

Examples

ISNONTEXT("text") equals FALSE.

See also

ISTEXT.


Name

ISNUMBER

Synopsis

ISNUMBER(value)

Description

ISNUMBER returns TRUE if the value is a number.

  • This function is Excel compatible.

Examples

ISNUMBER("text") equals FALSE.

See also


Name

ISODD

Synopsis

ISODD(value)

Description

ISODD returns TRUE if the number is odd.

  • This function is Excel compatible.

Examples

ISODD(3) equals TRUE.

See also

ISEVEN.


Name

ISREF

Synopsis

ISREF(value)

Description

ISREF returns TRUE if the value is a reference.

  • This function is Excel compatible.

Examples

ISREF(A1) equals TRUE.

See also


Name

ISTEXT

Synopsis

ISTEXT(value)

Description

ISTEXT returns TRUE if the value is text.

  • This function is Excel compatible.

Examples

ISTEXT("text") equals TRUE.

See also

ISNONTEXT.


Name

N

Synopsis

N(value)

Description

N returns a value converted to a number. Strings containing text are converted to the zero value.

  • This function is Excel compatible.

Examples

N("42") equals 42.

See also


Name

NA

Synopsis

NA()

Description

NA returns the error value #N/A.

  • This function is Excel compatible.

Examples

NA() equals #N/A error.

See also

ISNA.


Name

TYPE

Synopsis

TYPE(value)

Description

TYPE returns a number indicating the data type of a value.

1 == number

2 == text

4 == boolean

16 == error

64 == array

  • This function is Excel compatible.

Examples

TYPE(3) equals 1.

TYPE("text") equals 2.

See also

Logic

Name

AND

Synopsis

AND(b1, b2, ...)

Description

AND implements the logical AND function: the result is TRUE if all of the expressions evaluate to TRUE, otherwise it returns FALSE.

b1 trough bN are expressions that should evaluate to TRUE or FALSE. If an integer or floating point value is provided, zero is considered FALSE and anything else is TRUE.

  • If the values contain strings or empty cells those values are ignored.

  • If no logical values are provided, then the error #VALUE! is returned.

  • This function is Excel compatible.

Examples

AND(TRUE,TRUE) equals TRUE.

AND(TRUE,FALSE) equals FALSE.

Let us assume that A1 holds number five and A2 number one. Then

AND(A1>3,A2<2) equals TRUE.

See also

OR, NOT.


Name

FALSE

Synopsis

FALSE()

Description

FALSE returns boolean value false.

  • This function is Excel compatible.

Examples

FALSE() equals FALSE.

See also

TRUE.


Name

IF

Synopsis

IF(condition[,if-true,if-false])

Description

IF function can be used to evaluate conditionally other expressions. IF evaluates condition. If condition returns a non-zero value the result of the IF expression is the if-true expression, otherwise IF evaluates to the value of if-false.

  • If omitted if-true defaults to TRUE and if-false to FALSE.

  • This function is Excel compatible.

Examples

IF(FALSE,TRUE,FALSE) equals FALSE.

See also


Name

NOT

Synopsis

NOT(number)

Description

NOT implements the logical NOT function: the result is TRUE if the number is zero; otherwise the result is FALSE.

  • This function is Excel compatible.

Examples

NOT(0) equals TRUE.

NOT(TRUE) equals FALSE.

See also

AND, OR.


Name

OR

Synopsis

OR(b1, b2, ...)

Description

OR implements the logical OR function: the result is TRUE if any of the values evaluated to TRUE.

b1 trough bN are expressions that should evaluate to TRUE or FALSE. If an integer or floating point value is provided, zero is considered FALSE and anything else is TRUE.

  • If the values contain strings or empty cells those values are ignored.

  • If no logical values are provided, then the error #VALUE! is returned.

  • This function is Excel compatible.

Examples

OR(TRUE,FALSE) equals TRUE.

OR(3>4,4<3) equals FALSE.

See also

AND, NOT.


Name

TRUE

Synopsis

TRUE()

Description

TRUE returns boolean value true.

  • This function is Excel compatible.

Examples

TRUE() equals TRUE.

See also

FALSE.


Name

XOR

Synopsis

XOR(b1, b2, ...)

Description

XOR implements the logical exclusive OR function: the result is TRUE if an odd number of the values evaluated to TRUE.

b1 trough bN are expressions that should evaluate to TRUE or FALSE. If an integer or floating point value is provided, zero is considered FALSE and anything else is TRUE.

  • If the values contain strings or empty cells those values are ignored.

  • If no logical values are provided, then the error #VALUE! is returned.

Examples

XOR(TRUE,FALSE) equals TRUE.

XOR(3>4,4<3) equals FALSE.

See also

OR, AND, NOT.

Lookup

Name

ADDRESS

Synopsis

ADDRESS(row_num,col_num[,abs_num,a1,text])

Description

ADDRESS returns a cell address as text for specified row and column numbers.

a1 is a logical value that specifies the reference style. If a1 is TRUE or omitted, ADDRESS returns an A1-style reference, i.e. $D$4. Otherwise ADDRESS returns an R1C1-style reference, i.e. R4C4.

text specifies the name of the worksheet to be used as the external reference.

  • If abs_num is 1 or omitted, ADDRESS returns absolute reference.

  • If abs_num is 2 ADDRESS returns absolute row and relative column.

  • If abs_num is 3 ADDRESS returns relative row and absolute column.

  • If abs_num is 4 ADDRESS returns relative reference.

  • If abs_num is greater than 4 ADDRESS returns #VALUE! error.

  • If row_num or col_num is less than one, ADDRESS returns #VALUE! error.

Examples

ADDRESS(5,4) equals "$D$5".

ADDRESS(5,4,4) equals "D5".

ADDRESS(5,4,3,FALSE) equals "R[5]C4".

See also

COLUMNNUMBER.


Name

AREAS

Synopsis

AREAS(reference)

Description

AREAS returns the number of areas in reference.

Examples

AREAS((A1,B2,C3)) equals 3.


Name

CHOOSE

Synopsis

CHOOSE(index[,value1][,value2]...)

Description

CHOOSE returns the value of index index. index is rounded to an integer if it is not.

  • If index < 1 or index > number of values, CHOOSE returns #VALUE! error.

Examples

CHOOSE(3,"Apple","Orange","Grape","Perry") equals "Grape".

See also

IF.


Name

COLUMN

Synopsis

COLUMN([reference])

Description

COLUMN function returns the column number of the current cell unless reference is given. In that case, it returns an array of the column numbers of all cells in reference.

  • If reference is neither an array nor a reference nor a range, COLUMN returns #VALUE! error.

Examples

COLUMN() in E1 equals 5.

See also

COLUMNS, ROW, ROWS.


Name

COLUMNNUMBER

Synopsis

COLUMNNUMBER(name)

Description

COLUMNNUMBER function returns an integer corresponding to the column name supplied as a string.

  • If name is invalid, COLUMNNUMBER returns the #VALUE! error.

Examples

COLUMNNUMBER("E") equals 5.

See also

ADDRESS.


Name

COLUMNS

Synopsis

COLUMNS(reference)

Description

COLUMNS function returns the number of columns in area or array reference.

  • If reference is neither an array nor a reference nor a range, COLUMNS returns #VALUE! error.

Examples

COLUMNS(H2:J3) equals 3.

See also

COLUMN, ROW, ROWS.


Name

HLOOKUP

Synopsis

HLOOKUP(value,range,row[,approximate,as_index])

Description

HLOOKUP function finds the col in range that has a first row cell similar to value. If approximate is not true it finds the col with an exact equivalence. If approximate is true, then the values must be sorted in order of ascending value for correct function; in this case it finds the col with value less than value it returns the value in the col found at a 1-based offset in row rows into the range. as_index returns the 0-based offset that matched rather than the value.

  • HLOOKUP returns #NUM! if row < 0.

  • HLOOKUP returns #REF! if row falls outside range.

Examples

See also

VLOOKUP.


Name

HYPERLINK

Synopsis

HYPERLINK(link_location[,optional_label])

Description

HYPERLINK function currently returns its 2nd argument, or if that is omitted the 1st argument.

Examples

HYPERLINK("www.gnome.org","GNOME").

See also


Name

INDEX

Synopsis

INDEX(array[,row, col, area])

Description

INDEX gives a reference to a cell in the given array.The cell is pointed out by row and col, which count the rows and columns in the array.

  • If row and col are omited the are assumed to be 1.

  • If the reference falls outside the range of the array, INDEX returns a #REF! error.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then INDEX(A1:A5,4,1,1) equals 25.9

See also


Name

INDIRECT

Synopsis

INDIRECT(ref_text[,format])

Description

INDIRECT function returns the contents of the cell pointed to by the ref_text string. The string specifies a single cell reference the format of which is either A1 or R1C1 style. The style is set by the format boolean, which defaults to the A1 style.

  • If ref_text is not a valid reference returns #REF!

Examples

If A1 contains 3.14 and A2 contains A1, then

INDIRECT(A2) equals 3.14.

See also

AREAS, INDEX.


Name

LOOKUP

Synopsis

LOOKUP(value,vector1[,vector2])

Description

LOOKUP function finds the row index of value in vector1 and returns the contents of vector2 at that row index. Alternatively a single array can be used for vector1. If the area is longer than it is wide then the sense of the search is rotated.

  • If LOOKUP can't find value it uses the largest value less than value.

  • The data must be sorted.

  • If value is smaller than the first value it returns #N/A.

Examples

See also

VLOOKUP, HLOOKUP.


Name

MATCH

Synopsis

MATCH(seek,vector[,type])

Description

MATCH function finds the row index of seek in vector and returns it.

If the area is longer than it is wide then the sense of the search is rotated. Alternatively a single array can be used.

  • The type parameter, which defaults to +1, controls the search:

  • If type = 1, MATCH finds largest value <= seek.

  • If type = 0, MATCH finds first value == seek.

  • If type = -1, MATCH finds smallest value >= seek.

  • For type = 0, the data can be in any order. * For type = -1 and type = +1, the data must be sorted. (And in these cases, MATCH uses a binary search to locate the index.)

  • If seek could not be found, #N/A is returned.

Examples

See also

LOOKUP.


Name

OFFSET

Synopsis

OFFSET(range,row,col[,height[,width]])

Description

OFFSET function returns a cell range. The cell range starts at offset (row,col) from range, and is of height height and width width.

  • If range is neither a reference nor a range, OFFSET returns #VALUE!.

  • If either height or width is omitted, the height or width of the reference is used.

Examples


Name

ROW

Synopsis

ROW([reference])

Description

ROW function returns an array of the row numbers taking a default argument of the containing cell position.

  • If reference is neither an array nor a reference nor a range, ROW returns #VALUE! error.

Examples

ROW() in G13 equals 13.

See also

COLUMN, COLUMNS, ROWS.


Name

ROWS

Synopsis

ROWS(reference)

Description

ROWS function returns the number of rows in area or array reference.

  • If reference is neither an array nor a reference nor a range, ROWS returns #VALUE! error.

Examples

ROWS(H7:I13) equals 7.

See also

COLUMN, COLUMNS, ROW.


Name

TRANSPOSE

Synopsis

TRANSPOSE(matrix)

Description

TRANSPOSE function returns the transpose of the input matrix.

Examples

See also

MMULT.


Name

VLOOKUP

Synopsis

VLOOKUP(value,range,column[,approximate,as_index])

Description

VLOOKUP function finds the row in range that has a first column similar to value. If approximate is not true it finds the row with an exact equivalence. If approximate is true, then the values must be sorted in order of ascending value for correct function; in this case it finds the row with value less than value. It returns the value in the row found at a 1-based offset in column columns into the range. as_index returns the 0-based offset that matched rather than the value.

  • VLOOKUP returns #NUM! if column < 0.

  • VLOOKUP returns #REF! if column falls outside range.

Examples

See also

HLOOKUP.

Mathematics

Name

ABS

Synopsis

ABS(b1)

Description

ABS implements the Absolute Value function: the result is to drop the negative sign (if present). This can be done for integers and floating point numbers.

  • This function is Excel compatible.

Examples

ABS(7) equals 7.

ABS(-3.14) equals 3.14.

See also

CEIL, FLOOR.


Name

ACOS

Synopsis

ACOS(x)

Description

ACOS function calculates the arc cosine of x; that is the value whose cosine is x.

  • The value it returns is in radians.

  • If x falls outside the range -1 to 1, ACOS returns the #NUM! error.

  • This function is Excel compatible.

Examples

ACOS(0.1) equals 1.470629.

ACOS(-0.1) equals 1.670964.

See also

COS, SIN, DEGREES, RADIANS.


Name

ACOSH

Synopsis

ACOSH(x)

Description

ACOSH function calculates the inverse hyperbolic cosine of x; that is the value whose hyperbolic cosine is x.

  • If x is less than 1.0, ACOSH() returns the #NUM! error.

  • This function is Excel compatible.

Examples

ACOSH(2) equals 1.31696.

ACOSH(5.3) equals 2.35183.

See also

ACOS, ASINH, DEGREES, RADIANS.


Name

ASIN

Synopsis

ASIN(x)

Description

ASIN function calculates the arc sine of x; that is the value whose sine is x.

  • If x falls outside the range -1 to 1, ASIN returns the #NUM! error.

  • This function is Excel compatible.

Examples

ASIN(0.5) equals 0.523599.

ASIN(1) equals 1.570797.

See also

SIN, COS, ASINH, DEGREES, RADIANS.


Name

ASINH

Synopsis

ASINH(x)

Description

ASINH function calculates the inverse hyperbolic sine of x; that is the value whose hyperbolic sine is x.

  • This function is Excel compatible.

Examples

ASINH(0.5) equals 0.481212.

ASINH(1.0) equals 0.881374.

See also

ASIN, ACOSH, SIN, COS, DEGREES, RADIANS.


Name

ATAN

Synopsis

ATAN(x)

Description

ATAN function calculates the arc tangent of x; that is the value whose tangent is x.

  • Return value is in radians.

  • This function is Excel compatible.

Examples

ATAN(0.5) equals 0,463648.

ATAN(1) equals 0,785398.

See also

TAN, COS, SIN, DEGREES, RADIANS.


Name

ATAN2

Synopsis

ATAN2(b1,b2)

Description

ATAN2 function calculates the arc tangent of the two variables b1 and b2. It is similar to calculating the arc tangent of b2 / b1, except that the signs of both arguments are used to determine the quadrant of the result.

  • The result is in radians.

  • This function is Excel compatible.

Examples

ATAN2(0.5,1.0) equals 1.107149.

ATAN2(-0.5,2.0) equals 1.815775.

See also

ATAN, ATANH, COS, SIN, DEGREES, RADIANS.


Name

ATANH

Synopsis

ATANH(x)

Description

ATANH function calculates the inverse hyperbolic tangent of x; that is the value whose hyperbolic tangent is x.

  • If the absolute value of x is greater than 1.0, ATANH returns #NUM! error.

  • This function is Excel compatible.

Examples

ATANH(0.5) equals 0.549306.

ATANH(0.8) equals 1.098612.

See also

ATAN, TAN, SIN, COS, DEGREES, RADIANS.


Name

BETA

Synopsis

BETA(a,b)

Description

BETA function returns the value of the mathematic beta function extended to all real numbers except 0 and negative integers.

  • If a, b, or (a + b) are non-positive integers, BETA returns #NUM! error.

Examples

BETA(2,3) equals 0.083333.

BETA(-0.5,0.5) equals #NUM!.

See also

BETALN, GAMMALN.


Name

BETALN

Synopsis

BETALN(a,b)

Description

BETALN function returns the natural logarithm of the absolute value of the beta function.

  • If a, b, or (a + b) are non-positive integers, BETALN returns #NUM!

Examples

BETALN(2,3) equals -2.48.

BETALN(-0.5,0.5) equals #NUM!.

See also

BETA, GAMMALN.


Name

CEIL

Synopsis

CEIL(x)

Description

CEIL function rounds x up to the next nearest integer.

  • This function is Excel compatible.

Examples

CEIL(0.4) equals 1.

CEIL(-1.1) equals -1.

CEIL(-2.9) equals -2.

See also

ABS, FLOOR, INT.


Name

CEILING

Synopsis

CEILING(x,significance)

Description

CEILING function rounds x up to the nearest multiple of significance.

  • If x or significance is non-numeric CEILING returns #VALUE! error.

  • If x and significance have different signs CEILING returns #NUM! error.

  • This function is Excel compatible.

Examples

CEILING(2.43,1) equals 3.

CEILING(123.123,3) equals 126.

See also

CEIL.


Name

COMBIN

Synopsis

COMBIN(n,k)

Description

COMBIN computes the number of combinations.

  • Performing this function on a non-integer or a negative number returns #NUM! error.

  • If n is less than k COMBIN returns #NUM! error.

  • This function is Excel compatible.

Examples

COMBIN(8,6) equals 28.

COMBIN(6,2) equals 15.

See also


Name

COS

Synopsis

COS(x)

Description

COS function returns the cosine of x, where x is given in radians.

  • This function is Excel compatible.

Examples

COS(0.5) equals 0.877583.

COS(1) equals 0.540302.

See also

COSH, SIN, SINH, TAN, TANH, RADIANS, DEGREES.


Name

COSH

Synopsis

COSH(x)

Description

COSH function returns the hyperbolic cosine of x, which is defined mathematically as

(exp(x) + exp(-x)) / 2.

  • x is in radians.

  • This function is Excel compatible.

Examples

COSH(0.5) equals 1.127626.

COSH(1) equals 1.543081.

See also

COS, SIN, SINH, TAN, TANH, RADIANS, DEGREES, EXP.


Name

COUNTIF

Synopsis

COUNTIF(range,criteria)

Description

COUNTIF function counts the number of cells in the given range that meet the given criteria.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 23, 27, 28, 33, and 39. Then

COUNTIF(A1:A5,"<=28") equals 3.

COUNTIF(A1:A5,"<28") equals 2.

COUNTIF(A1:A5,"28") equals 1.

COUNTIF(A1:A5,">28") equals 2.

See also

COUNT, SUMIF.


Name

DEGREES

Synopsis

DEGREES(x)

Description

DEGREES computes the number of degrees equivalent to x radians.

  • This function is Excel compatible.

Examples

DEGREES(2.5) equals 143.2394.

See also

RADIANS, PI.


Name

EVEN

Synopsis

EVEN(number)

Description

EVEN function returns the number rounded up to the nearest even integer.

  • This function is Excel compatible.

Examples

EVEN(5.4) equals 6.

See also

ODD.


Name

EXP

Synopsis

EXP(x)

Description

EXP computes the value of e (the base of natural logarithms) raised to the power of x.

  • This function is Excel compatible.

Examples

EXP(2) equals 7.389056.

See also

LOG, LOG2, LOG10.


Name

FACT

Synopsis

FACT(x)

Description

FACT computes the factorial of x. ie, x!

  • This function is Excel compatible.

Examples

FACT(3) equals 6.

FACT(9) equals 362880.

See also


Name

FACTDOUBLE

Synopsis

FACTDOUBLE(number)

Description

FACTDOUBLE function returns the double factorial of a number, i.e., x!!.

  • If number is not an integer, it is truncated.

  • If number is negative FACTDOUBLE returns #NUM! error.

  • This function is Excel compatible.

Examples

FACTDOUBLE(5) equals 15.

See also

FACT.


Name

FIB

Synopsis

FIB(number)

Description

FIB function computes Fibonacci numbers.

  • If number is not an integer, it is truncated.

  • If number is negative or zero FIB returns #NUM! error.

Examples

FIB(12) equals 144.

See also


Name

FLOOR

Synopsis

FLOOR(x[,significance])

Description

FLOOR function rounds x down to the next nearest multiple of significance.

  • significance defaults to 1.

  • This function is Excel compatible.

Examples

FLOOR(0.5) equals 0.

FLOOR(5,2) equals 4.

FLOOR(-5,-2) equals -4.

FLOOR(-5,2) equals #NUM!.

See also

CEIL, ABS, INT.


Name

G_PRODUCT

Synopsis

G_PRODUCT(value1, value2, ...)

Description

G_PRODUCT returns the product of all the values and cells referenced in the argument list.

  • Empty cells are ignored and the empty product is 1.

Examples

G_PRODUCT(2,5,9) equals 90.

See also

SUM, COUNT.


Name

GCD

Synopsis

GCD(number1,number2,...)

Description

GCD returns the greatest common divisor of given numbers.

  • If any of the arguments is less than one, GCD returns #NUM! error.

  • If any of the arguments is non-integer, it is truncated.

  • This function is Excel compatible.

Examples

GCD(470,770) equals 10.

GCD(470,770,1495) equals 5.

See also

LCM.


Name

INT

Synopsis

INT(a)

Description

INT function returns the largest integer that is not bigger than its argument.

  • This function is Excel compatible.

Examples

INT(7.2) equals 7.

INT(-5.5) equals -6.

See also

FLOOR, CEIL, ABS.


Name

LCM

Synopsis

LCM(number1,number2,...)

Description

LCM returns the least common multiple of integers. The least common multiple is the smallest positive number that is a multiple of all integer arguments given.

  • If any of the arguments is less than one, LCM returns #NUM!.

  • If any of the arguments is non-integer, it is truncated.

  • This function is Excel compatible.

Examples

LCM(2,13) equals to 26.

LCM(4,7,5) equals to 140.

See also

GCD.


Name

LN

Synopsis

LN(x)

Description

LN returns the natural logarithm of x.

  • If x <= 0, LN returns #NUM! error.

  • This function is Excel compatible.

Examples

LN(7) equals 1.94591.

See also

EXP, LOG2, LOG10.


Name

LOG

Synopsis

LOG(x[,base])

Description

LOG computes the logarithm of x in the given base base. If no base is given LOG returns the logarithm in base 10. base must be > 0. and cannot equal 1.

  • This function is Excel compatible.

Examples

LOG(2) equals 0.30103.

LOG(8192,2) equals 13.

See also

LN, LOG2, LOG10.


Name

LOG10

Synopsis

LOG10(x)

Description

LOG10 computes the base-10 logarithm of x.

  • If x <= 0, LOG10 returns #NUM! error.

  • This function is Excel compatible.

Examples

LOG10(7) equals 0.845098.

See also

EXP, LOG2, LOG.


Name

LOG2

Synopsis

LOG2(x)

Description

LOG2 computes the base-2 logarithm of x.

  • If x <= 0, LOG2 returns #NUM! error.

Examples

LOG2(1024) equals 10.

See also

EXP, LOG10, LOG.


Name

MDETERM

Synopsis

MDETERM(matrix)

Description

MDETERM function returns the determinant of a given matrix.

  • If the matrix does not contain equal number of columns and rows, MDETERM returns #VALUE! error.

  • This function is Excel compatible.

Examples

Let us assume that A1, ..., A4 contain numbers 2, 3, 7, and 3, B1, ..., B4 4, 2, 4, and 1, C1, ..., C4 9, 4, 3, and 2, and D1, ..., D4 7, 3, 6, and 5. Then

MDETERM(A1:D4) equals 148.

See also

MMULT, MINVERSE.


Name

MINVERSE

Synopsis

MINVERSE(matrix)

Description

MINVERSE function returns the inverse matrix of matrix.

  • If matrix cannot be inverted, MINVERSE returns #NUM! error.

  • If matrix does not contain equal number of columns and rows, MINVERSE returns #VALUE! error.

  • This function is Excel compatible.

Examples

See also

MMULT, MDETERM.


Name

MMULT

Synopsis

MMULT(array1,array2)

Description

MMULT function returns the matrix product of two arrays. The result is an array with the same number of rows as array1 and the same number of columns as array2.

  • This function is Excel compatible.

Examples

See also

TRANSPOSE, MINVERSE.


Name

MOD

Synopsis

MOD(number,divisor)

Description

MOD function returns the remainder when divisor is divided into number.

  • MOD returns #DIV/0! if divisor is zero.

  • This function is Excel compatible.

Examples

MOD(23,7) equals 2.

See also

INT, FLOOR, CEIL.


Name

MROUND

Synopsis

MROUND(number,multiple)

Description

MROUND function rounds a given number to the desired multiple.

number is the number you want rounded and multiple is the the multiple to which you want to round the number.

  • If number and multiple have different sign, MROUND returns #NUM! error.

  • This function is Excel compatible.

Examples

MROUND(1.7,0.2) equals 1.8.

MROUND(321.123,0.12) equals 321.12.

See also

ROUNDDOWN, ROUND, ROUNDUP.


Name

MULTINOMIAL

Synopsis

MULTINOMIAL(value1, value2, ...)

Description

MULTINOMIAL returns the ratio of the factorial of a sum of values to the product of factorials.

  • This function is Excel compatible.

Examples

MULTINOMIAL(2,3,4) equals 1260.

See also

SUM.


Name

ODD

Synopsis

ODD(number)

Description

ODD function returns the number rounded up to the nearest odd integer.

  • This function is Excel compatible.

Examples

ODD(4.4) equals 5.

See also

EVEN.


Name

PI

Synopsis

PI()

Description

PI functions returns the value of pi.

  • This function is called with no arguments.

  • This function is Excel compatible, except that it returns pi with a better precision.

Examples

PI() equals about 3.141593.

See also

SQRTPI.


Name

POWER

Synopsis

POWER(x,y)

Description

POWER returns the value of x raised to the power y.

  • If both x and y equals to 0, POWER returns #NUM! error.

  • If x = 0 and y < 0, POWER returns #DIV/0! error.

  • If x < 0 and y is non-integer, POWER returns #NUM! error.

  • This function is Excel compatible.

Examples

POWER(2,7) equals 128.

POWER(3,3.141) equals 31.523749.

See also

EXP.


Name

PRODUCT

Synopsis

PRODUCT(value1, value2, ...)

Description

PRODUCT returns the product of all the values and cells referenced in the argument list.

  • This function is Excel compatible. In particular, this means that if all cells are empty, the result will be 0.

Examples

PRODUCT(2,5,9) equals 90.

See also

SUM, COUNT, G_PRODUCT.


Name

QUOTIENT

Synopsis

QUOTIENT(numerator,denominator)

Description

QUOTIENT function returns the integer portion of a division. numerator is the divided number and denominator is the divisor.

  • This function is Excel compatible.

Examples

QUOTIENT(23,5) equals 4.

See also

MOD.


Name

RADIANS

Synopsis

RADIANS(x)

Description

RADIANS computes the number of radians equivalent to x degrees.

  • This function is Excel compatible.

Examples

RADIANS(180) equals 3.14159.

See also

PI, DEGREES.


Name

ROMAN

Synopsis

ROMAN(number[,type])

Description

ROMAN function returns an arabic number in the roman numeral style, as text. number is the number you want to convert and type is the type of roman numeral you want.

  • If type is 0 or it is omitted, ROMAN returns classic roman numbers.

  • Type 1 is more concise than classic type, type 2 is more concise than type 1, and type 3 is more concise than type 2. Type 4 is simplified type.

  • If number is negative or greater than 3999, ROMAN returns #VALUE! error.

  • This function is Excel compatible.

Examples

ROMAN(999) equals CMXCIX.

ROMAN(999,1) equals LMVLIV.

ROMAN(999,2) equals XMIX.

ROMAN(999,3) equals VMIV.

ROMAN(999,4) equals IM.

See also


Name

ROUND

Synopsis

ROUND(number[,digits])

Description

ROUND function rounds a given number.

number is the number you want rounded and digits is the number of digits to which you want to round that number.

  • If digits is greater than zero, number is rounded to the given number of digits.

  • If digits is zero or omitted, number is rounded to the nearest integer.

  • If digits is less than zero, number is rounded to the left of the decimal point.

  • This function is Excel compatible.

Examples

ROUND(5.5) equals 6.

ROUND(-3.3) equals -3.

ROUND(1501.15,1) equals 1501.2.

ROUND(1501.15,-2) equals 1500.0.

See also

ROUNDDOWN, ROUNDUP.


Name

ROUNDDOWN

Synopsis

ROUNDDOWN(number[,digits])

Description

ROUNDDOWN function rounds a given number down. number is the number you want rounded down and digits is the number of digits to which you want to round that number.

  • If digits is greater than zero, number is rounded down to the given number of digits.

  • If digits is zero or omitted, number is rounded down to the nearest integer.

  • If digits is less than zero, number is rounded down to the left of the decimal point.

  • This function is Excel compatible.

Examples

ROUNDDOWN(5.5) equals 5.

ROUNDDOWN(-3.3) equals -4.

ROUNDDOWN(1501.15,1) equals 1501.1.

ROUNDDOWN(1501.15,-2) equals 1500.0.

See also

ROUND, ROUNDUP.


Name

ROUNDUP

Synopsis

ROUNDUP(number[,digits])

Description

ROUNDUP function rounds a given number up.

number is the number you want rounded up and digits is the number of digits to which you want to round that number.

  • If digits is greater than zero, number is rounded up to the given number of digits.

  • If digits is zero or omitted, number is rounded up to the nearest integer.

  • If digits is less than zero, number is rounded up to the left of the decimal point.

  • This function is Excel compatible.

Examples

ROUNDUP(5.5) equals 6.

ROUNDUP(-3.3) equals -3.

ROUNDUP(1501.15,1) equals 1501.2.

ROUNDUP(1501.15,-2) equals 1600.0.

See also

ROUND, ROUNDDOWN.


Name

SERIESSUM

Synopsis

SERIESSUM(x,n,m,coefficients)

Description

SERIESSUM function returns the sum of a power series. x is the base of the power series, n is the initial power to raise x, m is the increment to the power for each term in the series, and coefficients are the coefficients by which each successive power of x is multiplied.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 1.23, 2.32, 2.98, 3.42, and 4.33. Then

SERIESSUM(3,1,2.23,A1:A5) equals 251416.43018.

See also

COUNT, SUM.


Name

SIGN

Synopsis

SIGN(number)

Description

SIGN function returns 1 if the number is positive, zero if the number is 0, and -1 if the number is negative.

  • This function is Excel compatible.

Examples

SIGN(3) equals 1.

SIGN(-3) equals -1.

SIGN(0) equals 0.

See also


Name

SIN

Synopsis

SIN(x)

Description

SIN function returns the sine of x, where x is given in radians.

  • This function is Excel compatible.

Examples

SIN(0.5) equals 0.479426.

See also

COS, COSH, SINH, TAN, TANH, RADIANS, DEGREES.


Name

SINH

Synopsis

SINH(x)

Description

SINH function returns the hyperbolic sine of x, which is defined mathematically as

(exp(x) - exp(-x)) / 2.

  • This function is Excel compatible.

Examples

SINH(0.5) equals 0.521095.

See also

SIN, COS, COSH, TAN, TANH, DEGREES, RADIANS, EXP.


Name

SQRT

Synopsis

SQRT(x)

Description

SQRT function returns the square root of x.

  • If x is negative, SQRT returns #NUM! error.

  • This function is Excel compatible.

Examples

SQRT(2) equals 1.4142136.

See also

POWER.


Name

SQRTPI

Synopsis

SQRTPI(number)

Description

SQRTPI function returns the square root of a number multiplied by pi.

  • This function is Excel compatible.

Examples

SQRTPI(2) equals 2.506628275.

See also

PI.


Name

SUM

Synopsis

SUM(value1, value2, ...)

Description

SUM computes the sum of all the values and cells referenced in the argument list.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11, 15, 17, 21, and 43. Then

SUM(A1:A5) equals 107.

See also

AVERAGE, COUNT.


Name

SUMA

Synopsis

SUMA(value1, value2, ...)

Description

SUMA computes the sum of all the values and cells referenced in the argument list. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1).

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11, 15, 17, 21, and 43. Then

SUMA(A1:A5) equals 107.

See also

AVERAGE, SUM, COUNT.


Name

SUMIF

Synopsis

SUMIF(range,criteria[,actual_range])

Description

SUMIF function sums the values in the given range that meet the given criteria. If actual_range is given, SUMIF sums the values in the actual_range whose corresponding components in range meet the given criteria.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 23, 27, 28, 33, and 39. Then

SUMIF(A1:A5,"<=28") equals 78.

SUMIF(A1:A5,"<28") equals 50.

In addition, if the cells B1, B2, ..., B5 hold numbers 5, 3, 2, 6, and 7 then:

SUMIF(A1:A5,"<=27",B1:B5) equals 8.

See also

COUNTIF, SUM.


Name

SUMPRODUCT

Synopsis

SUMPRODUCT(range1,range2,...)

Description

SUMPRODUCT function multiplies corresponding data entries in the given arrays or ranges, and then returns the sum of those products. If an array entry is not numeric, the value zero is used instead.

  • If arrays or range arguments do not have the same dimensions, SUMPRODUCT returns #VALUE! error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11, 15, 17, 21, and 43 and the cells B1, B2, ..., B5 hold numbers 13, 22, 31, 33, and 39. Then

SUMPRODUCT(A1:A5,B1:B5) equals 3370.

See also

SUM, PRODUCT.


Name

SUMSQ

Synopsis

SUMSQ(value1, value2, ...)

Description

SUMSQ returns the sum of the squares of all the values and cells referenced in the argument list.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11, 15, 17, 21, and 43. Then

SUMSQ(A1:A5) equals 2925.

See also

SUM, COUNT.


Name

SUMX2MY2

Synopsis

SUMX2MY2(array1,array2)

Description

SUMX2MY2 function returns the sum of the difference of squares of corresponding values in two arrays. array1 is the first array or range of data points and array2 is the second array or range of data points. The equation of SUMX2MY2 is SUM (x^2-y^2).

  • Strings and empty cells are simply ignored.

  • If array1 and array2 have different number of data points, SUMX2MY2 returns #N/A error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11, 15, 17, 21, and 43 and the cells B1, B2, ..., B5 hold numbers 13, 22, 31, 33, and 39. Then

SUMX2MY2(A1:A5,B1:B5) equals -1299.

See also

SUMSQ, SUMX2PY2.


Name

SUMX2PY2

Synopsis

SUMX2PY2(array1,array2)

Description

SUMX2PY2 function returns the sum of the sum of squares of corresponding values in two arrays. array1 is the first array or range of data points and array2 is the second array or range of data points. The equation of SUMX2PY2 is SUM (x^2+y^2).

  • Strings and empty cells are simply ignored.

  • If array1 and array2 have different number of data points, SUMX2PY2 returns #N/A error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11, 15, 17, 21, and 43 and the cells B1, B2, ..., B5 hold numbers 13, 22, 31, 33, and 39. Then

SUMX2PY2(A1:A5,B1:B5) equals 7149.

See also

SUMSQ, SUMX2MY2.


Name

SUMXMY2

Synopsis

SUMXMY2(array1,array2)

Description

SUMXMY2 function returns the sum of squares of differences of corresponding values in two arrays. array1 is the first array or range of data points and array2 is the second array or range of data points. The equation of SUMXMY2 is SUM (x-y)^2.

  • Strings and empty cells are simply ignored.

  • If array1 and array2 have different number of data points, SUMXMY2 returns #N/A error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11, 15, 17, 21, and 43 and the cells B1, B2, ..., B5 hold numbers 13, 22, 31, 33, and 39. Then

SUMXMY2(A1:A5,B1:B5) equals 409.

See also

SUMSQ, SUMX2MY2, SUMX2PY2.


Name

TAN

Synopsis

TAN(x)

Description

TAN function returns the tangent of x, where x is given in radians.

  • This function is Excel compatible.

Examples

TAN(3) equals -0.1425465.

See also

TANH, COS, COSH, SIN, SINH, DEGREES, RADIANS.


Name

TANH

Synopsis

TANH(x)

Description

TANH function returns the hyperbolic tangent of x, which is defined mathematically as

sinh(x) / cosh(x).

  • This function is Excel compatible.

Examples

TANH(2) equals 0.96402758.

See also

TAN, SIN, SINH, COS, COSH, DEGREES, RADIANS.


Name

TRUNC

Synopsis

TRUNC(number[,digits])

Description

TRUNC function returns the value of number truncated to the number of digits specified.

  • If digits is omitted or negative then digits defaults to zero.

  • If digits is not an integer, it is truncated.

  • This function is Excel compatible.

Examples

TRUNC(3.12) equals 3.

TRUNC(4.15,1) equals 4.1.

See also

INT.

Number Theory

Name

ISPRIME

Synopsis

ISPRIME(i)

Description

ISPRIME function returns TRUE if i is prime and FALSE otherwise.

See also

ITHPRIME, NT_D, NT_SIGMA.


Name

ITHPRIME

Synopsis

ITHPRIME(i)

Description

ITHPRIME function returns the ith prime.

Examples

See also

NT_D, NT_SIGMA.


Name

NT_D

Synopsis

NT_D(n)

Description

NT_D function calculates the number of divisors of n.

Examples


Name

NT_MU

Synopsis

NT_MU(n)

Description

NT_MU function (Möbius mu function) returns

0 if n is divisible by the square of a prime .

Otherwise it returns:

-1 if n has an odd number of different prime factors .

1 if n has an even number of different prime factors .

  • If n = 1 NT_MU returns 1.

Examples

See also

NT_D, ITHPRIME, NT_PHI.


Name

NT_PHI

Synopsis

NT_PHI(n)

Description

NT_PHI function calculates the number of integers less than or equal to n that are relatively prime to n.

Examples

See also

NT_D, ITHPRIME, NT_SIGMA.


Name

NT_PI

Synopsis

NT_PI(n)

Description

NT_PI function returns the number of primes less than or equal to n.


Name

NT_SIGMA

Synopsis

NT_SIGMA(n)

Description

NT_SIGMA function calculates the sum of the divisors of n.

Examples

See also

NT_D, ITHPRIME, NT_PHI.

Random Numbers

Name

RAND

Synopsis

RAND()

Description

RAND returns a random number between zero and one.

  • This function is Excel compatible.

Examples

RAND() returns a random number greater than zero but less than one.

See also

RANDBETWEEN.


Name

RANDBERNOULLI

Synopsis

RANDBERNOULLI(p)

Description

RANDBERNOULLI returns a Bernoulli-distributed random number.

  • If p < 0 or p > 1 RANDBERNOULLI returns #NUM! error.

Examples

RANDBERNOULLI(0.5).

See also

RAND, RANDBETWEEN.


Name

RANDBETA

Synopsis

RANDBETA(a,b)

Description

RANDBETA returns a Beta-distributed random number.

Examples

RANDBETA(1,2).

See also

RAND, RANDGAMMA.


Name

RANDBETWEEN

Synopsis

RANDBETWEEN(bottom,top)

Description

RANDBETWEEN function returns a random integer number between and including bottom and top.

  • If bottom or top is non-integer, they are truncated.

  • If bottom > top, RANDBETWEEN returns #NUM! error.

  • This function is Excel compatible.

Examples

RANDBETWEEN(3,7).

See also

RAND, RANDUNIFORM.


Name

RANDBINOM

Synopsis

RANDBINOM(p,trials)

Description

RANDBINOM returns a binomially-distributed random number.

  • If p < 0 or p > 1 RANDBINOM returns #NUM! error.

  • If trials < 0 RANDBINOM returns #NUM! error.

Examples

RANDBINOM(0.5,2).

See also

RAND, RANDBETWEEN.


Name

RANDCAUCHY

Synopsis

RANDCAUCHY(a)

Description

RANDCAUCHY returns a Cauchy-distributed random number with scale parameter a. The Cauchy distribution is also known as the Lorentz distribution.

  • If a < 0 RANDCAUCHY returns #NUM! error.

Examples

RANDCAUCHY(1).

See also

RAND.


Name

RANDCHISQ

Synopsis

RANDCHISQ(nu)

Description

RANDCHISQ returns a Chi-Square-distributed random number.

Examples

RANDCHISQ(0.5).

See also

RAND, RANDGAMMA.


Name

RANDDISCRETE

Synopsis

RANDDISCRETE(val_range[,prob_range])

Description

RANDDISCRETE returns one of the values in the val_range. The probabilities for each value are given in the prob_range.

  • If prob_range is omitted, the uniform discrete distribution is assumed.

  • If the sum of all values in prob_range is other than one, RANDDISCRETE returns #NUM! error.

  • If val_range and prob_range are not the same size, RANDDISCRETE returns #NUM! error.

  • If val_range or prob_range is not a range, RANDDISCRETE returns #VALUE! error.

Examples

RANDDISCRETE(A1:A6) returns one of the values in the range A1:A6.

See also

RANDBETWEEN, RAND.


Name

RANDEXP

Synopsis

RANDEXP(b)

Description

RANDEXP returns a exponentially-distributed random number.

Examples

RANDEXP(0.5).

See also

RAND, RANDBETWEEN.


Name

RANDEXPPOW

Synopsis

RANDEXPPOW(a,b)

Description

RANDEXPPOW returns a random variate from the exponential power distribution with scale parameter a and exponent b. The distribution is,

p(x) dx = {1 over 2 a Gamma(1+1/b)} exp(-|x/a|^b) dx, for x >= 0.

  • For b = 1 this reduces to the Laplace distribution.

  • For b = 2 it has the same form as a normal distribution with sigma = a/sqrt(2).

Examples

RANDEXPPOW(0.5,0.1).

See also

RAND.


Name

RANDFDIST

Synopsis

RANDFDIST(nu1,nu2)

Description

RANDFDIST returns a F-distributed random number.

Examples

RANDFDIST(1,2).

See also

RAND, RANDGAMMA.


Name

RANDGAMMA

Synopsis

RANDGAMMA(a,b)

Description

RANDGAMMA returns a Gamma-distributed random number.

  • If a <= 0 RANDGAMMA returns #NUM! error.

Examples

RANDGAMMA(1,2).

See also

RAND.


Name

RANDGEOM

Synopsis

RANDGEOM(p)

Description

RANDGEOM returns a geometric-distributed random number. The number of independent trials with probability p until the first success. The probability distribution for geometric variates is,

p(k) = p (1-p)^(k-1), for k >= 1.

  • If p < 0 or p > 1 RANDGEOM returns #NUM! error.

Examples

RANDGEOM(0.4).

See also

RAND.


Name

RANDGUMBEL

Synopsis

RANDGUMBEL(a,b[,type])

Description

RANDGUMBEL returns a Type I or Type II Gumbel-distributed random number. type is either 1 or 2 and specifies the type of the distribution (Type I or Type II).

  • If type is neither 1 nor 2, RANDGUMBEL returns #NUM! error.

  • If type is omitted, Type I is assumed.

Examples

RANDGUMBEL(0.5,1,2).

See also

RAND.


Name

RANDHYPERG

Synopsis

RANDHYPERG(n1,n2,t)

Description

RANDHYPERG returns a hypergeometric-distributed random number. The probability distribution for hypergeometric random variates is,

p(k) = C(n_1,k) C(n_2, t-k) / C(n_1 + n_2,k),

where C(a,b) = a!/(b!(a-b)!).

The domain of k is max(0,t-n_2), ..., max(t,n_1).

Examples

RANDHYPERG(21,1,9).

See also

RAND.


Name

RANDLANDAU

Synopsis

RANDLANDAU()

Description

RANDLANDAU returns a random variate from the Landau distribution. The probability distribution for Landau random variates is defined analytically by the complex integral,

p(x) = (1/(2 pi i)) int_{c-i infty}^{c+i infty} ds exp(s log(s) + x s).

For numerical purposes it is more convenient to use the following equivalent form of the integral,

p(x) = (1/pi) int_0^ infty dt exp(-t log(t) - x t) sin(pi t).

Examples

RANDLANDAU().

See also

RAND.


Name

RANDLAPLACE

Synopsis

RANDLAPLACE(a)

Description

RANDLAPLACE returns a Laplace-distributed random number. Laplace distribution is also known as two-sided exponential probability distribution.

Examples

RANDLAPLACE(1).

See also

RAND.


Name

RANDLEVY

Synopsis

RANDLEVY(c,alpha[,beta])

Description

RANDLEVY returns a Levy-distributed random number. If beta is omitted, it is assumed to be 0.

  • For alpha = 1, beta=0, we get the Lorentz distribution.

  • For alpha = 2, beta=0, we get the normal distribution.

  • If alpha <= 0 or alpha > 2, RANDLEVY returns #NUM! error.

  • If beta < -1 or beta > 1, RANDLEVY returns #NUM! error.

Examples

RANDLEVY(0.5,0.1,1).

See also

RAND.


Name

RANDLOG

Synopsis

RANDLOG(p)

Description

RANDLOG returns a logarithmic-distributed random number.

  • If p < 0 or p > 1 RANDLOG returns #NUM! error.

Examples

RANDLOG(0.72).

See also

RAND.


Name

RANDLOGISTIC

Synopsis

RANDLOGISTIC(a)

Description

RANDLOGISTIC returns a logistic-distributed random number. The distribution function is,

p(x) dx = { exp(-x/a) over a (1 + exp(-x/a))^2 } dx for -infty < x < +infty.

Examples

RANDLOGISTIC(1).

See also

RAND.


Name

RANDLOGNORM

Synopsis

RANDLOGNORM(zeta,sigma)

Description

RANDLOGNORM returns a lognormal-distributed random number.

Examples

RANDLOGNORM(1,2).

See also

RAND.


Name

RANDNEGBINOM

Synopsis

RANDNEGBINOM(p,failures)

Description

RANDNEGBINOM returns a negative binomially-distributed random number.

  • If p < 0 or p > 1, RANDNEGBINOM returns #NUM! error.

  • If failures < 1, RANDNEGBINOM returns #NUM! error.

Examples

RANDNEGBINOM(0.5,2).

See also

RAND, RANDBETWEEN.


Name

RANDNORM

Synopsis

RANDNORM(mean,stdev)

Description

RANDNORM returns a normal-distributed random number.

  • If stdev < 0 RANDNORM returns #NUM! error.

Examples

RANDNORM(0,1).

See also

RAND.


Name

RANDNORMTAIL

Synopsis

RANDNORMTAIL(a,sigma)

Description

RANDNORMTAIL returns a random variates from the upper tail of a normal distribution with standard deviation sigma. The values returned are larger than the lower limit a, which must be positive. The method is based on Marsaglia's famous rectangle-wedge-tail algorithm (Ann Math Stat 32, 894-899 (1961)), with this aspect explained in Knuth, v2, 3rd ed, p139, 586 (exercise 11).

The probability distribution for normal tail random variates is,

p(x) dx = {1 over N(a;sigma)} exp (- x^2/(2 sigma^2)) dx,

for x > a where N(a;sigma) is the normalization constant, N(a;sigma) = (1/2) erfc(a / sqrt(2 sigma^2)).

Examples

RANDNORMTAIL(0.5,0.1).

See also

RAND.


Name

RANDPARETO

Synopsis

RANDPARETO(a,b)

Description

RANDPARETO returns a Pareto-distributed random number.

Examples

RANDPARETO(1,2).

See also

RAND.


Name

RANDPOISSON

Synopsis

RANDPOISSON(lambda)

Description

RANDPOISSON returns a Poisson-distributed random number.

  • If lambda < 0 RANDPOISSON returns #NUM! error.

Examples

RANDPOISSON(3).

See also

RAND, RANDBETWEEN.


Name

RANDRAYLEIGH

Synopsis

RANDRAYLEIGH(sigma)

Description

RANDRAYLEIGH returns a Rayleigh-distributed random number.

Examples

RANDRAYLEIGH(1).

See also

RAND.


Name

RANDRAYLEIGHTAIL

Synopsis

RANDRAYLEIGHTAIL(a,sigma)

Description

RANDRAYLEIGHTAIL returns a random variate from the tail of the Rayleigh distribution with scale parameter sigma and a lower limit of a. The distribution is,

p(x) dx = {x over sigma^2} exp ((a^2 - x^2) /(2 sigma^2)) dx,

for x > a.

Examples

RANDRAYLEIGHTAIL(0.3,1).

See also

RAND, RANDRAYLEIGH.


Name

RANDTDIST

Synopsis

RANDTDIST(nu)

Description

RANDTDIST returns a T-distributed random number.

Examples

RANDTDIST(0.5).

See also

RAND.


Name

RANDUNIFORM

Synopsis

RANDUNIFORM(a,b)

Description

RANDUNIFORM returns a random variate from the uniform (flat) distribution from a to b. The distribution is,

p(x) dx = {1 over (b-a)} dx : for a <= x < b.

p(x) dx = 0 : for x < a or b <= x.

  • If a > b RANDUNIFORM returns #NUM! error.

Examples

RANDUNIFORM(1.4,4.2) returns a random number greater than or equal to 1.4 but less than 4.2.

See also

RANDBETWEEN, RAND.


Name

RANDWEIBULL

Synopsis

RANDWEIBULL(a,b)

Description

RANDWEIBULL returns a Weibull-distributed random number.

Examples

RANDWEIBULL(1,2).

See also

RAND.


Name

SIMTABLE

Synopsis

SIMTABLE(d1, d2, ..., dN)

Description

SIMTABLE returns one of the values in the given argument list depending on the round number of the simulation tool. When the simulation tool is not activated, SIMTABLE returns d1.

With the simulation tool and the SIMTABLE function you can test given decision variables. Each SIMTABLE function contains the possible values of a simulation variable. In most valid simulation models you should have the same number of values dN for all decision variables. If the simulation is run more rounds than there are values defined, SIMTABLE returns #N/A! error (e.g. if A1 contains `=SIMTABLE(1)' and A2 `=SIMTABLE(1,2)', A1 yields #N/A! error on the second round).

The successive use of the simulation tool also requires that you give to the tool at least one input variable having RAND() or any other RAND<distribution name>() function in it. On each round, the simulation tool iterates for the given number of rounds over all the input variables to reevaluate them. On each iteration, the values of the output variables are stored, and when the round is completed, descriptive statistical information is created according to the values.

Examples

SIMTABLE(TRUE,FALSE) returns TRUE on the first simulation round and FALSE on the second round.

SIMTABLE(223,225,227,229) returns 227 on the simulation round #3.

See also

Statistics

Name

AVEDEV

Synopsis

AVEDEV(n1, n2, ...)

Description

AVEDEV returns the average of the absolute deviations of a data set from their mean.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

AVEDEV(A1:A5) equals 7.84.

See also

STDEV.


Name

AVERAGE

Synopsis

AVERAGE(value1, value2,...)

Description

AVERAGE computes the average of all the values and cells referenced in the argument list. This is equivalent to the sum of the arguments divided by the count of the arguments.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

AVERAGE(A1:A5) equals 23.2.

See also

SUM, COUNT.


Name

AVERAGEA

Synopsis

AVERAGEA(number1,number2,...)

Description

AVERAGEA returns the average of the given arguments. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers and strings 11.4, 17.3, "missing", 25.9, and 40.1. Then

AVERAGEA(A1:A5) equals 18.94.

See also

AVERAGE.


Name

BERNOULLI

Synopsis

BERNOULLI(k,p)

Description

BERNOULLI returns the probability p(k) of obtaining k from a Bernoulli distribution with probability parameter p.

  • If k != 0 and k != 1 BERNOULLI returns #NUM! error.

  • If p < 0 or p > 1 BERNOULLI returns #NUM! error.

Examples

BERNOULLI(0,0.5).

See also

RANDBERNOULLI.


Name

BETADIST

Synopsis

BETADIST(x,alpha,beta[,a,b])

Description

BETADIST function returns the cumulative beta distribution. a is the optional lower bound of x and b is the optional upper bound of x.

  • If a is not given, BETADIST uses 0.

  • If b is not given, BETADIST uses 1.

  • If x < a or x > b BETADIST returns #NUM! error.

  • If alpha <= 0 or beta <= 0, BETADIST returns #NUM! error.

  • If a >= b BETADIST returns #NUM! error.

  • This function is Excel compatible.

Examples

BETADIST(0.12,2,3) equals 0.07319808.

See also

BETAINV.


Name

BETAINV

Synopsis

BETAINV(p,alpha,beta[,a,b])

Description

BETAINV function returns the inverse of cumulative beta distribution. a is the optional lower bound of x and b is the optional upper bound of x.

  • If a is not given, BETAINV uses 0.

  • If b is not given, BETAINV uses 1.

  • If p < 0 or p > 1 BETAINV returns #NUM! error.

  • If alpha <= 0 or beta <= 0, BETAINV returns #NUM! error.

  • If a >= b BETAINV returns #NUM! error.

  • This function is Excel compatible.

Examples

BETAINV(0.45,1.6,1) equals 0.607096629.

See also

BETADIST.


Name

BINOMDIST

Synopsis

BINOMDIST(n,trials,p,cumulative)

Description

BINOMDIST function returns the binomial distribution. n is the number of successes, trials is the total number of independent trials, p is the probability of success in trials, and cumulative describes whether to return the sum of the binomial function from 0 to n.

  • If n or trials are non-integer they are truncated.

  • If n < 0 or trials < 0 BINOMDIST returns #NUM! error.

  • If n > trials BINOMDIST returns #NUM! error.

  • If p < 0 or p > 1 BINOMDIST returns #NUM! error.

  • This function is Excel compatible.

Examples

BINOMDIST(3,5,0.8,0) equals 0.2048.

See also

POISSON.


Name

CAUCHY

Synopsis

CAUCHY(x,a,cum)

Description

CAUCHY returns the Cauchy distribution with scale parameter a. If cum is TRUE, CAUCHY returns the cumulative distribution.

  • If a < 0 CAUCHY returns #NUM! error.

  • If cum != TRUE and cum != FALSE CAUCHY returns #VALUE! error.

Examples

CAUCHY(0.43,1,TRUE) returns 0.370735.

See also

RANDCAUCHY.


Name

CHIDIST

Synopsis

CHIDIST(x,dof)

Description

CHIDIST function returns the one-tailed probability of the chi-squared distribution. dof is the number of degrees of freedom.

  • If dof is non-integer it is truncated.

  • If dof < 1 CHIDIST returns #NUM! error.

  • This function is Excel compatible.

Examples

CHIDIST(5.3,2) equals 0.070651213.

See also

CHIINV, CHITEST.


Name

CHIINV

Synopsis

CHIINV(p,dof)

Description

CHIINV function returns the inverse of the one-tailed probability of the chi-squared distribution.

  • If p < 0 or p > 1 or dof < 1 CHIINV returns #NUM! error.

  • This function is Excel compatible.

Examples

CHIINV(0.98,7) equals 1.564293004.

See also

CHIDIST, CHITEST.


Name

CHITEST

Synopsis

CHITEST(actual_range,theoretical_range)

Description

CHITEST function returns the test for independence of chi-squared distribution.

actual_range is a range that contains the observed data points. theoretical_range is a range that contains the expected values of the data points.

  • This function is Excel compatible.

Examples

See also

CHIDIST, CHIINV.


Name

CONFIDENCE

Synopsis

CONFIDENCE(x,stddev,size)

Description

CONFIDENCE function returns the confidence interval for a mean. x is the significance level, stddev is the population standard deviation, and size is the size of the sample.

  • If size is non-integer it is truncated.

  • If size < 0 CONFIDENCE returns #NUM! error.

  • If size is 0 CONFIDENCE returns #DIV/0! error.

  • This function is Excel compatible.

Examples

CONFIDENCE(0.05,1,33) equals 0.341185936.

See also

AVERAGE.


Name

CORREL

Synopsis

CORREL(array1,array2)

Description

CORREL returns the correlation coefficient of two data sets.

  • Strings and empty cells are simply ignored.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... B5 23.2, 25.8, 29.9, 33.5, and 42.7. Then

CORREL(A1:A5,B1:B5) equals 0.996124788.

See also

COVAR, FISHER, FISHERINV.


Name

COUNT

Synopsis

COUNT(b1, b2, ...)

Description

COUNT returns the total number of integer or floating point arguments passed.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

COUNT(A1:A5) equals 5.

See also

AVERAGE.


Name

COUNTA

Synopsis

COUNTA(b1, b2, ...)

Description

COUNTA returns the number of arguments passed not including empty cells.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers and strings 11.4, "missing", "missing", 25.9, and 40.1. Then

COUNTA(A1:A5) equals 5.


Name

COVAR

Synopsis

COVAR(array1,array2)

Description

COVAR returns the covariance of two data sets.

  • Strings and empty cells are simply ignored.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... B5 23.2, 25.8, 29.9, 33.5, and 42.7. Then

COVAR(A1:A5,B1:B5) equals 65.858.

See also

CORREL, FISHER, FISHERINV.


Name

CRITBINOM

Synopsis

CRITBINOM(trials,p,alpha)

Description

CRITBINOM function returns the smallest value for which the cumulative is greater than or equal to a given value. n is the number of trials, p is the probability of success in trials, and alpha is the criterion value.

  • If trials is a non-integer it is truncated.

  • If trials < 0 CRITBINOM returns #NUM! error.

  • If p < 0 or p > 1 CRITBINOM returns #NUM! error.

  • If alpha < 0 or alpha > 1 CRITBINOM returns #NUM! error.

  • This function is Excel compatible.

Examples

CRITBINOM(10,0.5,0.75) equals 6.

See also

BINOMDIST.


Name

CRONBACH

Synopsis

CRONBACH(ref1,ref2,...)

Description

CRONBACH returns Cronbach's alpha for the given cases.

ref1 is a data set, ref2 the second data set, etc..

Examples

See also


Name

DEVSQ

Synopsis

DEVSQ(n1, n2, ...)

Description

DEVSQ returns the sum of squares of deviations of a data set from the sample mean.

  • Strings and empty cells are simply ignored.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

DEVSQ(A1:A5) equals 470.56.

See also

STDEV.


Name

EXPONDIST

Synopsis

EXPONDIST(x,y,cumulative)

Description

EXPONDIST function returns the exponential distribution. If the cumulative boolean is false it will return:

y * exp (-y*x),

otherwise it will return

1 - exp (-y*x).

  • If x < 0 or y <= 0 this will return an error.

  • This function is Excel compatible.

Examples

EXPONDIST(2,4,0) equals 0.001341851.

See also

POISSON.


Name

EXPPOWDIST

Synopsis

EXPPOWDIST(x,a,b)

Description

EXPPOWDIST returns the probability density p(x) at x for Exponential Power distribution with scale parameter a and exponent b.

Examples

EXPPOWDIST(0.4,1,2).

See also

RANDEXPPOW.


Name

FDIST

Synopsis

FDIST(x,dof1,dof2)

Description

FDIST function returns the F probability distribution. dof1 is the numerator degrees of freedom and dof2 is the denominator degrees of freedom.

  • If x < 0 FDIST returns #NUM! error.

  • If dof1 < 1 or dof2 < 1, FDIST returns #NUM! error.

  • This function is Excel compatible.

Examples

FDIST(2,5,5) equals 0.232511319.

See also

FINV.


Name

FINV

Synopsis

FINV(p,dof1,dof2)

Description

FINV function returns the inverse of the F probability distribution.

  • If p < 0 or p > 1 FINV returns #NUM! error.

  • If dof1 < 1 or dof2 < 1 FINV returns #NUM! error.

  • This function is Excel compatible.

Examples

FINV(0.2,2,4) equals 2.472135955.

See also

FDIST.


Name

FISHER

Synopsis

FISHER(x)

Description

FISHER function returns the Fisher transformation at x.

  • If x is not a number, FISHER returns #VALUE! error.

  • If x <= -1 or x >= 1, FISHER returns #NUM! error.

  • This function is Excel compatible.

Examples

FISHER(0.332) equals 0.345074339.

See also

SKEW.


Name

FISHERINV

Synopsis

FISHERINV(x)

Description

FISHERINV function returns the inverse of the Fisher transformation at x.

  • If x is non-number FISHERINV returns #VALUE! error.

  • This function is Excel compatible.

Examples

FISHERINV(2) equals 0.96402758.

See also

FISHER.


Name

FORECAST

Synopsis

FORECAST(x,known_y's,known_x's)

Description

FORECAST function estimates a future value according to existing values using simple linear regression. The estimated future value is a y-value for a given x-value (x).

  • If known_x or known_y contains no data entries or different number of data entries, FORECAST returns #N/A error.

  • If the variance of the known_x is zero, FORECAST returns #DIV/0 error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... B5 23.2, 25.8, 29.9, 33.5, and 42.7. Then

FORECAST(7,A1:A5,B1:B5) equals -10.859397661.

See also

INTERCEPT, TREND.


Name

FREQUENCY

Synopsis

FREQUENCY(data_array,bins_array)

Description

FREQUENCY function counts how often given values occur within a range of values. The results are given as an array.

data_array is a data array for which you want to count the frequencies. bin_array is an array containing the intervals into which you want to group the values in data_array. If the bin_array is empty, FREQUENCY returns the number of data points in data_array.

  • This function is Excel compatible.

Examples

See also


Name

FTEST

Synopsis

FTEST(array1,array2)

Description

FTEST function returns the two-tailed probability that the variances in the given two data sets are not significantly different.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... B5 23.2, 25.8, 29.9, 33.5, and 42.7. Then

FTEST(A1:A5,B1:B5) equals 0.510815017.

See also

FDIST, FINV.


Name

GAMMADIST

Synopsis

GAMMADIST(x,alpha,beta,cum)

Description

GAMMADIST function returns the gamma distribution. If cum is TRUE, GAMMADIST returns the incomplete gamma function, otherwise it returns the probability mass function.

  • If x < 0 GAMMADIST returns #NUM! error.

  • If alpha <= 0 or beta <= 0, GAMMADIST returns #NUM! error.

  • This function is Excel compatible.

Examples

GAMMADIST(1,2,3,0) equals 0.07961459.

See also

GAMMAINV.


Name

GAMMAINV

Synopsis

GAMMAINV(p,alpha,beta)

Description

GAMMAINV function returns the inverse of the cumulative gamma distribution.

  • If p < 0 or p > 1 GAMMAINV returns #NUM! error.

  • If alpha <= 0 or beta <= 0 GAMMAINV returns #NUM! error.

  • This function is Excel compatible.

Examples

GAMMAINV(0.34,2,4) equals 4.829093908.

See also

GAMMADIST.


Name

GAMMALN

Synopsis

GAMMALN(x)

Description

GAMMALN function returns the natural logarithm of the gamma function.

  • If x is non-number then GAMMALN returns #VALUE! error.

  • If x <= 0 then GAMMALN returns #NUM! error.

  • This function is Excel compatible.

Examples

GAMMALN(23) equals 48.471181352.

See also

POISSON.


Name

GEOMDIST

Synopsis

GEOMDIST(k,p,cum)

Description

GEOMDIST returns the probability p(k) of obtaining k from a geometric distribution with probability parameter p.

  • If k < 0 GEOMDIST returns #NUM! error.

  • If p < 0 or p > 1 GEOMDIST returns #NUM! error.

  • If cum != TRUE and cum != FALSE GEOMDIST returns #NUM! error.

Examples

GEOMDIST(2,10.4,TRUE).

See also

RANDGEOM.


Name

GEOMEAN

Synopsis

GEOMEAN(b1, b2, ...)

Description

GEOMEAN returns the geometric mean of the given arguments. This is equal to the Nth root of the product of the terms.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

GEOMEAN(A1:A5) equals 21.279182482.


Name

GROWTH

Synopsis

GROWTH(known_y's[,known_x's,new_x's,const])

Description

GROWTH function applies the ``least squares'' method to fit an exponential curve to your data and predicts the exponential growth by using this curve.

GROWTH returns an array having one column and a row for each data point in new_x.

  • If known_x's is omitted, an array {1, 2, 3, ...} is used.

  • If new_x's is omitted, it is assumed to be the same as known_x's.

  • If known_y's and known_x's have unequal number of data points, GROWTH returns #NUM! error.

  • If const is FALSE, the line will be forced to go through the origin, i.e., b will be zero. The default is TRUE.

Examples

See also

LOGEST, GROWTH, TREND.


Name

HARMEAN

Synopsis

HARMEAN(b1, b2, ...)

Description

HARMEAN returns the harmonic mean of the N data points (that is, N divided by the sum of the inverses of the data points).

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

HARMEAN(A1:A5) equals 19.529814427.


Name

HYPGEOMDIST

Synopsis

HYPGEOMDIST(x,n,M,N)

Description

HYPGEOMDIST function returns the hypergeometric distribution. x is the number of successes in the sample, n is the number of trials, M is the number of successes overall, and N is the population size.

  • If x,n,M or N is a non-integer it is truncated.

  • If x,n,M or N < 0 HYPGEOMDIST returns #NUM! error.

  • If x > M or n > N HYPGEOMDIST returns #NUM! error.

  • This function is Excel compatible.

Examples

HYPGEOMDIST(1,2,3,10) equals 0.4666667.

See also

BINOMDIST, POISSON.


Name

INTERCEPT

Synopsis

INTERCEPT(known_y's,known_x's)

Description

INTERCEPT function calculates the point where the linear regression line intersects the y-axis.

  • If known_x or known_y contains no data entries or different number of data entries, INTERCEPT returns #N/A error.

  • If the variance of the known_x is zero, INTERCEPT returns #DIV/0 error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... B5 23.2, 25.8, 29.9, 33.5, and 42.7. Then

INTERCEPT(A1:A5,B1:B5) equals -20.785117212.

See also

FORECAST, TREND.


Name

KURT

Synopsis

KURT(n1, n2, ...)

Description

KURT returns an unbiased estimate of the kurtosis of a data set.

Note, that this is only meaningful if the underlying distribution really has a fourth moment. The kurtosis is offset by three such that a normal distribution will have zero kurtosis.

  • Strings and empty cells are simply ignored.

  • If fewer than four numbers are given or all of them are equal KURT returns #DIV/0! error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

KURT(A1:A5) equals 1.234546305.

See also

AVERAGE, VAR, SKEW, KURTP.


Name

KURTP

Synopsis

KURTP(n1, n2, ...)

Description

KURTP returns the population kurtosis of a data set.

  • Strings and empty cells are simply ignored.

  • If fewer than two numbers are given or all of them are equal KURTP returns #DIV/0! error.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

KURTP(A1:A5) equals -0.691363424.

See also

AVERAGE, VARP, SKEWP, KURT.


Name

LANDAU

Synopsis

LANDAU(x)

Description

LANDAU returns the probability density p(x) at x for the Landau distribution using an approximation method.

Examples

LANDAU(0.34).

See also

RANDLANDAU.


Name

LAPLACE

Synopsis

LAPLACE(x,a)

Description

LAPLACE returns the probability density p(x) at x for Laplace distribution with mean a.

Examples

LAPLACE(0.4,1).

See also

RANDLAPLACE.


Name

LARGE

Synopsis

LARGE(n1, n2, ..., k)

Description

LARGE returns the k-th largest value in a data set.

  • If data set is empty LARGE returns #NUM! error.

  • If k <= 0 or k is greater than the number of data items given LARGE returns #NUM! error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

LARGE(A1:A5,2) equals 25.9.

LARGE(A1:A5,4) equals 17.3.


Name

LINEST

Synopsis

LINEST(known_y's[,known_x's[,const[,stat]]])

Description

LINEST function calculates the ``least squares'' line that best fit to your data in known_y's. known_x's contains the corresponding x's where y=mx+b.

LINEST returns an array having two columns and one row. The slope (m) of the regression line y=mx+b is given in the first column and the y-intercept (b) in the second.

If stat is TRUE, extra statistical information will be returned. Extra statistical information is written bellow the regression line coefficients in the result array. Extra statistical information consists of four rows of data. In the first row the standard error values for the coefficients m1, (m2, ...), b are represented. The second row contains the square of R and the standard error for the y estimate. The third row contains the F-observed value and the degrees of freedom. The last row contains the regression sum of squares and the residual sum of squares.

  • If known_x's is omitted, an array {1, 2, 3, ...} is used.

  • If known_y's and known_x's have unequal number of data points, LINEST returns #NUM! error.

  • If const is FALSE, the line will be forced to go through the origin, i.e., b will be zero. The default is TRUE.

  • The default of stat is FALSE.

Examples

See also

LOGEST, TREND.


Name

LOGEST

Synopsis

LOGEST(known_y's[,known_x's,const,stat])

Description

LOGEST function applies the ``least squares'' method to fit an exponential curve of the form

y = b * m{1}^x{1} * m{2}^x{2}... to your data.

If stat is TRUE, extra statistical information will be returned. Extra statistical information is written bellow the regression line coefficients in the result array. Extra statistical information consists of four rows of data. In the first row the standard error values for the coefficients m1, (m2, ...), b are represented. The second row contains the square of R and the standard error for the y estimate. The third row contains the F-observed value and the degrees of freedom. The last row contains the regression sum of squares and the residual sum of squares.

  • If known_x's is omitted, an array {1, 2, 3, ...} is used. LOGEST returns an array { m{n},m{n-1}, ...,m{1},b }.

  • If known_y's and known_x's have unequal number of data points, LOGEST returns #NUM! error.

  • If const is FALSE, the line will be forced to go through (0,1),i.e., b will be one. The default is TRUE.

  • The default of stat is FALSE.

Examples

See also

GROWTH, TREND.


Name

LOGFIT

Synopsis

LOGFIT(known_y's,known_x's)

Description

LOGFIT function applies the ``least squares'' method to fit the logarithmic equation

y = a + b * ln(sign * (x - c)) , sign = +1 or -1

to your data. The graph of the equation is a logarithmic curve moved horizontally by c and possibly mirrored across the y-axis (if sign = -1).

LOGFIT returns an array having five columns and one row. `Sign' is given in the first column, `a', `b', and `c' are given in columns 2 to 4. Column 5 holds the sum of squared residuals.

An error is returned when there are less than 3 different x's or y's, or when the shape of the point cloud is too different from a ``logarithmic'' one.

You can use the above formula

= a + b * ln(sign * (x - c))

or rearrange it to

= (exp((y - a) / b)) / sign + c

to compute unknown y's or x's, respectively.

Technically, this is non-linear fitting by trial-and-error. The accuracy of `c' is: width of x-range -> rounded to the next smaller (10^integer), times 0.000001. There might be cases in which the returned fit is not the best possible.

Examples

See also

LOGREG, LINEST, LOGEST.


Name

LOGINV

Synopsis

LOGINV(p,mean,stddev)

Description

LOGINV function returns the inverse of the lognormal cumulative distribution. p is the given probability corresponding to the normal distribution, mean is the arithmetic mean of the distribution, and stddev is the standard deviation of the distribution.

  • If p < 0 or p > 1 or stddev <= 0 LOGINV returns #NUM! error.

  • This function is Excel compatible.

Examples

LOGINV(0.5,2,3) equals 7.389056099.

See also

EXP, LN, LOG, LOG10, LOGNORMDIST.


Name

LOGISTIC

Synopsis

LOGISTIC(x,a)

Description

LOGISTIC returns the probability density p(x) at x for a logistic distribution with scale parameter a.

Examples

LOGISTIC(0.4,1).

See also

RANDLOGISTIC.


Name

LOGNORMDIST

Synopsis

LOGNORMDIST(x,mean,stddev)

Description

LOGNORMDIST function returns the lognormal distribution. x is the value for which you want the distribution, mean is the mean of the distribution, and stddev is the standard deviation of the distribution.

  • If stddev = 0 LOGNORMDIST returns #DIV/0! error.

  • If x <= 0, mean < 0 or stddev < 0 LOGNORMDIST returns #NUM! error.

  • This function is Excel compatible.

Examples

LOGNORMDIST(3,1,2) equals 0.519662338.

See also

NORMDIST.


Name

LOGREG

Synopsis

LOGREG(known_y's[,known_x's[,const[,stat]]])

Description

LOGREG function transforms your x's to z=ln(x) and applies the ``least squares'' method to fit the linear equation

y = m * z + b

to your y's and z's --- equivalent to fitting the equation

y = m * ln(x) + b

to y's and x's.

If known_x's is omitted, an array {1, 2, 3, ...} is used. LOGREG returns an array having two columns and one row. m is given in the first column and b in the second.

If known_y's and known_x's have unequal number of data points, LOGREG returns #NUM! error.

If const is FALSE, the curve will be forced to go through [1; 0], i.e., b will be zero. The default is TRUE.

If stat is TRUE, extra statistical information will be returned which applies to the state AFTER transformation to z. Extra statistical information is written below m and b in the result array. Extra statistical information consists of four rows of data. In the first row the standard error values for the coefficients m, b are represented. The second row contains the square of R and the standard error for the y estimate. The third row contains the F-observed value and the degrees of freedom. The last row contains the regression sum of squares and the residual sum of squares.The default of stat is FALSE.

Examples

See also

LOGFIT, LINEST, LOGEST.


Name

MAX

Synopsis

MAX(b1, b2, ...)

Description

MAX returns the value of the element of the values passed that has the largest value, with negative numbers considered smaller than positive numbers.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

MAX(A1:A5) equals 40.1.

See also

MIN, ABS.


Name

MAXA

Synopsis

MAXA(number1,number2,...)

Description

MAXA returns the largest value of the given arguments. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers and strings 11.4, 17.3, "missing", 25.9, and 40.1. Then

MAXA(A1:A5) equals 40.1.

See also

MAX, MINA.


Name

MEDIAN

Synopsis

MEDIAN(n1, n2, ...)

Description

MEDIAN returns the median of the given data set.

  • Strings and empty cells are simply ignored.

  • If even numbers are given MEDIAN returns the average of the two numbers in the middle.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

MEDIAN(A1:A5) equals 21.3.


Name

MIN

Synopsis

MIN(b1, b2, ...)

Description

MIN returns the value of the element of the values passed that has the smallest value, with negative numbers considered smaller than positive numbers.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

MIN(A1:A5) equals 11.4.

See also

MAX, ABS.


Name

MINA

Synopsis

MINA(number1,number2,...)

Description

MINA returns the smallest value of the given arguments. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers and strings 11.4, 17.3, "missing", 25.9, and 40.1. Then

MINA(A1:A5) equals 0.

See also

MIN, MAXA.


Name

MODE

Synopsis

MODE(n1, n2, ...)

Description

MODE returns the most common number of the data set. If the data set has many most common numbers MODE returns the first one of them.

  • Strings and empty cells are simply ignored.

  • If the data set does not contain any duplicates MODE returns #N/A error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 11.4, 25.9, and 40.1. Then

MODE(A1:A5) equals 11.4.

See also

AVERAGE, MEDIAN.


Name

NEGBINOMDIST

Synopsis

NEGBINOMDIST(f,t,p)

Description

NEGBINOMDIST function returns the negative binomial distribution. f is the number of failures, t is the threshold number of successes, and p is the probability of a success.

  • If f or t is a non-integer it is truncated.

  • If (f + t -1) <= 0 NEGBINOMDIST returns #NUM! error.

  • If p < 0 or p > 1 NEGBINOMDIST returns #NUM! error.

  • This function is Excel compatible.

Examples

NEGBINOMDIST(2,5,0.55) equals 0.152872629.


Name

NORMDIST

Synopsis

NORMDIST(x,mean,stddev,cumulative)

Description

NORMDIST function returns the normal cumulative distribution. x is the value for which you want the distribution, mean is the mean of the distribution, stddev is the standard deviation.

  • If stddev is 0 NORMDIST returns #DIV/0! error.

  • This function is Excel compatible.

Examples

NORMDIST(2,1,2,0) equals 0.176032663.

See also

POISSON.


Name

NORMINV

Synopsis

NORMINV(p,mean,stddev)

Description

NORMINV function returns the inverse of the normal cumulative distribution. p is the given probability corresponding to the normal distribution, mean is the arithmetic mean of the distribution, and stddev is the standard deviation of the distribution.

  • If p < 0 or p > 1 or stddev <= 0 NORMINV returns #NUM! error.

  • This function is Excel compatible.

Examples

NORMINV(0.76,2,3) equals 4.118907689.


Name

NORMSDIST

Synopsis

NORMSDIST(x)

Description

NORMSDIST function returns the standard normal cumulative distribution. x is the value for which you want the distribution.

  • This function is Excel compatible.

Examples

NORMSDIST(2) equals 0.977249868.

See also

NORMDIST.


Name

NORMSINV

Synopsis

NORMSINV(p)

Description

NORMSINV function returns the inverse of the standard normal cumulative distribution. p is the given probability corresponding to the normal distribution.

  • If p < 0 or p > 1 NORMSINV returns #NUM! error.

  • This function is Excel compatible.

Examples

NORMSINV(0.2) equals -0.841621234.


Name

PARETO

Synopsis

PARETO(x,a,b)

Description

PARETO returns the probability density p(x) at x for a Pareto distribution with exponent a and scale b.

Examples

PARETO(0.6,1,2).

See also

RANDPARETO.


Name

PEARSON

Synopsis

PEARSON(array1,array2)

Description

PEARSON returns the Pearson correlation coefficient of two data sets.

  • Strings and empty cells are simply ignored.

  • This function is Excel compatible.

Examples


Name

PERCENTILE

Synopsis

PERCENTILE(array,k)

Description

PERCENTILE function returns the 100*k-th percentile of the given data points (that is, a number x such that a fraction k of the data points are less than x).

  • If array is empty, PERCENTILE returns #NUM! error.

  • If k < 0 or k > 1, PERCENTILE returns #NUM! error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

PERCENTILE(A1:A5,0.42) equals 20.02.

See also

QUARTILE.


Name

PERCENTRANK

Synopsis

PERCENTRANK(array,x[,significance])

Description

PERCENTRANK function returns the rank of a data point in a data set. array is the range of numeric values, x is the data point which you want to rank, and the optional significance specifies the number of significant digits for the returned value, truncating the remainder. If significance is omitted, PERCENTRANK uses three digits.

  • If array contains no data points, PERCENTRANK returns #NUM! error.

  • If significance is less than one, PERCENTRANK returns #NUM! error.

  • If x exceeds the largest value or is less than the smallest value in array, PERCENTRANK returns #NUM! error.

  • If x does not match any of the values in array or x matches more than once, PERCENTRANK interpolates the returned value.

Examples


Name

PERMUT

Synopsis

PERMUT(n,k)

Description

PERMUT function returns the number of permutations. n is the number of objects, k is the number of objects in each permutation.

  • If n = 0 PERMUT returns #NUM! error.

  • If n < k PERMUT returns #NUM! error.

  • This function is Excel compatible.

Examples

PERMUT(7,3) equals 210.

See also

COMBIN.


Name

POISSON

Synopsis

POISSON(x,mean,cumulative)

Description

POISSON function returns the Poisson distribution. x is the number of events, mean is the expected numeric value cumulative describes whether to return the sum of the Poisson function from 0 to x.

  • If x is a non-integer it is truncated.

  • If x < 0 POISSON returns #NUM! error.

  • If mean <= 0 POISSON returns the #NUM! error.

  • This function is Excel compatible.

Examples

POISSON(3,6,0) equals 0.089235078.

See also

NORMDIST, WEIBULL.


Name

PROB

Synopsis

PROB(x_range,prob_range,lower_limit[,upper_limit])

Description

PROB function returns the probability that values in a range or an array are between two limits. If upper_limit is not given, PROB returns the probability that values in x_range are equal to lower_limit.

  • If the sum of the probabilities in prob_range is not equal to 1 PROB returns #NUM! error.

  • If any value in prob_range is <=0 or > 1, PROB returns #NUM! error.

  • If x_range and prob_range contain a different number of data entries, PROB returns #N/A error.

  • This function is Excel compatible.

Examples

See also

BINOMDIST, CRITBINOM.


Name

QUARTILE

Synopsis

QUARTILE(array,quart)

Description

QUARTILE function returns the quartile of the given data points.

If quart is equal to: QUARTILE returns:

0 the smallest value of array.

1 the first quartile

2 the second quartile

3 the third quartile

4 the largest value of array.

  • If array is empty, QUARTILE returns #NUM! error.

  • If quart < 0 or quart > 4, QUARTILE returns #NUM! error.

  • If quart is not an integer, it is truncated.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

QUARTILE(A1:A5,1) equals 17.3.


Name

RANK

Synopsis

RANK(x,ref[,order])

Description

RANK returns the rank of a number in a list of numbers. x is the number whose rank you want to find, ref is the list of numbers, and order specifies how to rank numbers. If order is 0, numbers are ranked in descending order, otherwise numbers are ranked in ascending order.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

RANK(17.3,A1:A5) equals 4.

See also

PERCENTRANK.


Name

RAYLEIGH

Synopsis

RAYLEIGH(x,sigma)

Description

RAYLEIGH returns the probability density p(x) at x for a Rayleigh distribution with scale parameter sigma.

Examples

RAYLEIGH(0.4,1).

See also

RANDRAYLEIGH.


Name

RAYLEIGHTAIL

Synopsis

RAYLEIGHTAIL(x,a,sigma)

Description

RAYLEIGHTAIL returns the probability density p(x) at x for a Rayleigh tail distribution with scale parameter sigma and lower limit a.

Examples

RAYLEIGHTAIL(0.6,0.3,1).


Name

RSQ

Synopsis

RSQ(array1,array2)

Description

RSQ returns the square of the Pearson correlation coefficient of two data sets.

  • Strings and empty cells are simply ignored.

  • This function is Excel compatible.

Examples


Name

SKEW

Synopsis

SKEW(n1, n2, ...)

Description

SKEW returns an unbiased estimate for skewness of a distribution.

Note, that this is only meaningful if the underlying distribution really has a third moment. The skewness of a symmetric (e.g., normal) distribution is zero.

  • Strings and empty cells are simply ignored.

  • If less than three numbers are given, SKEW returns #DIV/0! error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

SKEW(A1:A5) equals 0.976798268.

See also

AVERAGE, VAR, SKEWP, KURT.


Name

SKEWP

Synopsis

SKEWP(n1, n2, ...)

Description

SKEWP returns the population skewness of a data set.

  • Strings and empty cells are simply ignored.

  • If less than two numbers are given, SKEWP returns #DIV/0! error.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

SKEWP(A1:A5) equals 0.655256198.

See also

AVERAGE, VARP, SKEW, KURTP.


Name

SLOPE

Synopsis

SLOPE(known_y's,known_x's)

Description

SLOPE returns the slope of the linear regression line.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... B5 23.2, 25.8, 29.9, 33.5, and 42.7. Then

SLOPE(A1:A5,B1:B5) equals 1.417959936.

See also

STDEV, STDEVPA.


Name

SMALL

Synopsis

SMALL(n1, n2, ..., k)

Description

SMALL returns the k-th smallest value in a data set.

  • If data set is empty SMALL returns #NUM! error.

  • If k <= 0 or k is greater than the number of data items given SMALL returns #NUM! error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

SMALL(A1:A5,2) equals 17.3.

SMALL(A1:A5,4) equals 25.9.


Name

SSMEDIAN

Synopsis

SSMEDIAN(array[,interval)]

Description

The SSMEDIAN function returns the median for grouped data as commonly determined in the social sciences. The data points given in array are assumed to be the result of grouping data into intervals of length interval

  • If interval is not given, SSMEDIAN uses 1.

  • If array is empty, SSMEDIAN returns #NUM! error.

  • If interval <= 0, SSMEDIAN returns #NUM! error.

  • SSMEDIAN does not check whether the data points are at least interval apart.

Examples

Let us assume that the cells A1, A2, A3 contain numbers 7, 8, 8. Then

SSMEDIAN(A1:A3, 1) equals 7.75.

See also

MEDIAN.


Name

STANDARDIZE

Synopsis

STANDARDIZE(x,mean,stddev)

Description

STANDARDIZE function returns a normalized value. x is the number to be normalized, mean is the mean of the distribution, stddev is the standard deviation of the distribution.

  • If stddev is 0 STANDARDIZE returns #DIV/0! error.

  • This function is Excel compatible.

Examples

STANDARDIZE(3,2,4) equals 0.25.

See also

AVERAGE.


Name

STDEV

Synopsis

STDEV(b1, b2, ...)

Description

STDEV returns standard deviation of a set of numbers treating these numbers as members of a population.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

STDEV(A1:A5) equals 10.84619749.


Name

STDEVA

Synopsis

STDEVA(number1,number2,...)

Description

STDEVA returns the standard deviation based on a sample. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers and strings 11.4, 17.3, "missing", 25.9, and 40.1. Then

STDEVA(A1:A5) equals 15.119953704.

See also

STDEV, STDEVPA.


Name

STDEVP

Synopsis

STDEVP(b1, b2, ...)

Description

STDEVP returns standard deviation of a set of numbers treating these numbers as members of a complete population.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

STDEVP(A1:A5) equals 9.701133954.

See also

STDEV, STDEVA, STDEVPA.


Name

STDEVPA

Synopsis

STDEVPA(number1,number2,...)

Description

STDEVPA returns the standard deviation based on the entire population. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers and strings 11.4, 17.3, "missing", 25.9, and 40.1. Then

STDEVPA(A1:A5) equals 13.523697719.

See also

STDEVA, STDEVP.


Name

STEYX

Synopsis

STEYX(known_y's,known_x's)

Description

STEYX function returns the standard error of the predicted y-value for each x in the regression.

  • If known_y's and known_x's are empty or have a different number of arguments then STEYX returns #N/A error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... B5 23.2, 25.8, 29.9, 33.5, and 42.7. Then

STEYX(A1:A5,B1:B5) equals 1.101509979.

See also

PEARSON, RSQ, SLOPE.


Name

SUBTOTAL

Synopsis

SUBTOTAL(function_nbr,ref1,ref2,...)

Description

SUBTOTAL function returns a subtotal of given list of arguments. function_nbr is the number that specifies which function to use in calculating the subtotal.

The following functions are available:

1 AVERAGE

2 COUNT

3 COUNTA

4 MAX

5 MIN

6 PRODUCT

7 STDEV

8 STDEVP

9 SUM

10 VAR

11 VARP

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 23, 27, 28, 33, and 39. Then

SUBTOTAL(1,A1:A5) equals 30.

SUBTOTAL(6,A1:A5) equals 22378356.

SUBTOTAL(7,A1:A5) equals 6.164414003.

SUBTOTAL(9,A1:A5) equals 150.

SUBTOTAL(11,A1:A5) equals 30.4.

See also

COUNT, SUM.


Name

TDIST

Synopsis

TDIST(x,dof,tails)

Description

TDIST function returns the Student's t-distribution. dof is the degree of freedom and tails is 1 or 2 depending on whether you want one-tailed or two-tailed distribution.

  • If dof < 1 TDIST returns #NUM! error.

  • If tails is neither 1 or 2 TDIST returns #NUM! error.

  • This function is Excel compatible.

Examples

TDIST(2,5,1) equals 0.050969739.

See also

TINV, TTEST.


Name

TINV

Synopsis

TINV(p,dof)

Description

TINV function returns the inverse of the two-tailed Student's t-distribution.

  • If p < 0 or p > 1 or dof < 1 TINV returns #NUM! error.

  • This function is Excel compatible.

Examples

TINV(0.4,32) equals 0.852998454.

See also

TDIST, TTEST.


Name

TREND

Synopsis

TREND(known_y's[,known_x's[,new_x's[,const]]])

Description

TREND function estimates future values of a given data set using the ``least squares'' line that best fit to your data. known_y's is the y-values where y=mx+b and known_x's contains the corresponding x-values. new_x's contains the x-values for which you want to estimate the y-values. If const is FALSE, the line will be forced to go through the origin, i.e., b will be zero.

  • If known_x's is omitted, an array {1, 2, 3, ...} is used.

  • If new_x's is omitted, it is assumed to be the same as known_x's.

  • If const is omitted, it is assumed to be TRUE.

  • If known_y's and known_x's have unequal number of data points, TREND returns #NUM! error.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... B5 23.2, 25.8, 29.9, 33.5, and 42.7. Then

TREND(A1:A5,B1:B5) equals 156.52.

See also

LINEST.


Name

TRIMMEAN

Synopsis

TRIMMEAN(ref,fraction)

Description

TRIMMEAN returns the mean of the interior of a data set. ref is the list of numbers whose mean you want to calculate and fraction is the fraction of the data set excluded from the mean. For example, if fraction=0.2 and the data set contains 40 numbers, 8 numbers are trimmed from the data set (40 x 0.2), 4 from the top and 4 from the bottom of the set.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

TRIMMEAN(A1:A5,0.2) equals 23.2.


Name

TTEST

Synopsis

TTEST(array1,array2,tails,type)

Description

TTEST function returns the probability of a Student's t-Test.

array1 is the first data set and array2 is the second data set. If tails is one, TTEST uses the one-tailed distribution and if tails is two, TTEST uses the two-tailed distribution. type determines the kind of the test:

1 Paired test

2 Two-sample equal variance

3 Two-sample unequal variance

  • If the data sets contain a different number of data points and the test is paired (type one), TTEST returns the #N/A error.

  • tails and type are truncated to integers.

  • If tails is not one or two, TTEST returns #NUM! error.

  • If type is any other than one, two, or three, TTEST returns #NUM! error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1, and the cells B1, B2, ... B5 23.2, 25.8, 29.9, 33.5, and 42.7. Then

TTEST(A1:A5,B1:B5,1,1) equals 0.003127619.

TTEST(A1:A5,B1:B5,2,1) equals 0.006255239.

TTEST(A1:A5,B1:B5,1,2) equals 0.111804322.

TTEST(A1:A5,B1:B5,1,3) equals 0.113821797.

See also

FDIST, FINV.


Name

VAR

Synopsis

VAR(b1, b2, ...)

Description

VAR estimates the variance of a sample of a population. To get the true variance of a complete population use VARP.

  • VAR is also known as the N-1-variance. Under reasonable conditions, it is the maximum-likelihood estimator for the true variance.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

VAR(A1:A5) equals 117.64.

See also

VARP, STDEV.


Name

VARA

Synopsis

VARA(number1,number2,...)

Description

VARA returns the variance based on a sample. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers and strings 11.4, 17.3, "missing", 25.9, and 40.1. Then

VARA(A1:A5) equals 228.613.

See also

VAR, VARPA.


Name

VARP

Synopsis

VARP(b1, b2, ...)

Description

VARP calculates the variance of a set of numbers where each number is a member of a population and the set is the entire population.

  • VARP is also known as the N-variance.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

VARP(A1:A5) equals 94.112.

See also

AVERAGE, DVAR, DVARP, STDEV, VAR.


Name

VARPA

Synopsis

VARPA(number1,number2,...)

Description

VARPA returns the variance based on the entire population. Numbers, text and logical values are included in the calculation too. If the cell contains text or the argument evaluates to FALSE, it is counted as value zero (0). If the argument evaluates to TRUE, it is counted as one (1). Note that empty cells are not counted.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers and strings 11.4, 17.3, "missing", 25.9, and 40.1. Then

VARPA(A1:A5) equals 182.8904.

See also

VARA, VARP.


Name

WEIBULL

Synopsis

WEIBULL(x,alpha,beta,cumulative)

Description

WEIBULL function returns the Weibull distribution. If the cumulative boolean is true it will return:

1 - exp (-(x/beta)^alpha),

otherwise it will return

(alpha/beta^alpha) * x^(alpha-1) * exp(-(x/beta^alpha)).

  • If x < 0 WEIBULL returns #NUM! error.

  • If alpha <= 0 or beta <= 0 WEIBULL returns #NUM! error.

  • This function is Excel compatible.

Examples

WEIBULL(3,2,4,0) equals 0.213668559.

See also

POISSON.


Name

ZTEST

Synopsis

ZTEST(ref,x)

Description

ZTEST returns the two-tailed probability of a z-test.

ref is the data set and x is the value to be tested.

  • If ref contains less than two data items ZTEST returns #DIV/0! error.

  • This function is Excel compatible.

Examples

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3, 25.9, and 40.1. Then

ZTEST(A1:A5,20) equals 0.254717826.

String

Name

CHAR

Synopsis

CHAR(x)

Description

CHAR returns the ASCII character represented by the number x.

Examples

CHAR(65) equals A.

See also

CODE.


Name

CLEAN

Synopsis

CLEAN(string)

Description

CLEAN removes any non-printable characters from string.

  • This function is Excel compatible.

Examples

CLEAN("one"\&char(7)) equals "one".

See also


Name

CODE

Synopsis

CODE(char)

Description

CODE returns the ASCII number for the character char.

  • This function is Excel compatible.

Examples

CODE("A") equals 65.

See also

CHAR.


Name

CONCATENATE

Synopsis

CONCATENATE(string1[,string2...])

Description

CONCATENATE returns the string obtained by concatenation of the given strings.

  • This function is Excel compatible.

Examples

CONCATENATE("aa","bb") equals "aabb".

See also

LEFT, MID, RIGHT.


Name

DOLLAR

Synopsis

DOLLAR(num[,decimals])

Description

DOLLAR returns num formatted as currency.

  • This function is Excel compatible.

Examples

DOLLAR(12345) equals "$12,345.00".

See also

FIXED, TEXT, VALUE.


Name

EXACT

Synopsis

EXACT(string1, string2)

Description

EXACT returns true if string1 is exactly equal to string2 (this routine is case sensitive).

  • This function is Excel compatible.

Examples

EXACT("key","key") equals TRUE.

EXACT("key","Key") equals FALSE.

See also

LEN, SEARCH, DELTA.


Name

FIND

Synopsis

FIND(string1,string2[,start])

Description

FIND returns position of string1 in string2 (case-sensitive), searching only from character start onwards (assuming 1 if omitted).

  • This function is Excel compatible.

Examples

FIND("ac","Jack") equals 2.

See also

EXACT, LEN, MID, SEARCH.


Name

FIXED

Synopsis

FIXED(num,[decimals, no_commas])

Description

FIXED returns num as a formatted string with decimals numbers after the decimal point, omitting commas if requested by no_commas.

  • This function is Excel compatible.

Examples

FIXED(1234.567,2) equals "1,234.57".

See also


Name

LEFT

Synopsis

LEFT(text[,num_chars])

Description

LEFT returns the leftmost num_chars characters or the left character if num_chars is not specified.

  • This function is Excel compatible.

Examples

LEFT("Directory",3) equals "Dir".

See also

MID, RIGHT.


Name

LEN

Synopsis

LEN(string)

Description

LEN returns the length in characters of the string string.

  • This function is Excel compatible.

Examples

LEN("Helsinki") equals 8.

See also

CHAR, CODE.


Name

LOWER

Synopsis

LOWER(text)

Description

LOWER returns a lower-case version of the string in text.

  • This function is Excel compatible.

Examples

LOWER("J. F. Kennedy") equals "j. f. kennedy".

See also

UPPER.


Name

MID

Synopsis

MID(string, position, length)

Description

MID returns a substring from string starting at position for length characters.

  • This function is Excel compatible.

Examples

MID("testing",2,3) equals "est".

See also

LEFT, RIGHT.


Name

PROPER

Synopsis

PROPER(string)

Description

PROPER returns string with initial of each word capitalised.

  • This function is Excel compatible.

Examples

PROPER("j. f. kennedy") equals "J. F. Kennedy".

See also

LOWER, UPPER.


Name

REPLACE

Synopsis

REPLACE(old,start,num,new)

Description

REPLACE returns old with new replacing num characters from start.

  • This function is Excel compatible.

Examples

REPLACE("testing",2,3,"*****") equals "t*****ing".

See also

MID, SEARCH, SUBSTITUTE, TRIM.


Name

REPT

Synopsis

REPT(string,num)

Description

REPT returns num repetitions of string.

  • This function is Excel compatible.

Examples

REPT(".",3) equals "...".

See also

CONCATENATE.


Name

RIGHT

Synopsis

RIGHT(text[,num_chars])

Description

RIGHT returns the rightmost num_chars characters or the right character if num_chars is not specified.

  • This function is Excel compatible.

Examples

RIGHT("end") equals "d".

RIGHT("end",2) equals "nd".

See also

MID, LEFT.


Name

SEARCH

Synopsis

SEARCH(search_string,text[,start_num])

Description

SEARCH returns the location of the search_ string within text. The search starts with the start_num character of text text. If start_num is omitted, it is assumed to be one. The search is not case sensitive.

search_string can contain wildcard characters (*) and question marks (?). A question mark matches any character and a wildcard matches any string including the empty string. If you want the actual wildcard or question mark to be found, use tilde (~) before the character.

  • If search_string is not found, SEARCH returns #VALUE! error.

  • If start_num is less than one or it is greater than the length of text, SEARCH returns #VALUE! error.

  • This function is Excel compatible.

Examples

SEARCH("c","Cancel") equals 1.

SEARCH("c","Cancel",2) equals 4.

See also

FIND.


Name

SUBSTITUTE

Synopsis

SUBSTITUTE(text, old, new [,num])

Description

SUBSTITUTE replaces old with new in text. Substitutions are only applied to instance num of old in text, otherwise every one is changed.

  • This function is Excel compatible.

Examples

SUBSTITUTE("testing","test","wait") equals "waiting".

See also

REPLACE, TRIM.


Name

T

Synopsis

T(value)

Description

T returns value if and only if it is text, otherwise a blank string.

  • This function is Excel compatible.

Examples

T("text") equals "text".

T(64) returns an empty cell.

See also

CELL, N, VALUE.


Name

TEXT

Synopsis

TEXT(value,format_text)

Description

TEXT returns value as a string with the specified format.

  • This function is Excel compatible.

Examples

TEXT(3.223,"$0.00") equals "$3.22".

TEXT(date(1999,4,15),"mmmm, dd, yy") equals "April, 15, 99".

See also

DOLLAR.


Name

TRIM

Synopsis

TRIM(text)

Description

TRIM returns text with only single spaces between words.

  • This function is Excel compatible.

Examples

TRIM(" a bbb cc") equals "a bbb cc".


Name

UNICHAR

Synopsis

UNICHAR(x)

Description

UNICHAR returns the Unicode character represented by the number x.

Examples

UNICHAR(65) equals A.

UNICHAR(960) equals a small greek pi.

See also

CHAR, UNICODE, CODE.


Name

UNICODE

Synopsis

UNICODE(char)

Description

UNICODE returns the Unicode number for the character char.

Examples

UNICODE("A") equals 65.

See also

UNICHAR, CODE, CHAR.


Name

UPPER

Synopsis

UPPER(text)

Description

UPPER returns a upper-case version of the string in text.

  • This function is Excel compatible.

Examples

UPPER("cancelled") equals "CANCELLED".

See also

LOWER.


Name

VALUE

Synopsis

VALUE(text)

Description

VALUE returns numeric value of text.

  • This function is Excel compatible.

Examples

VALUE("$1,000") equals 1000.

See also

DOLLAR, FIXED, TEXT.


Previous
Function Reference
ContentsNext
Keybinding Reference
PreviousNext

Appendix B. Keybinding Reference

This appendix lists the keyboard shortcuts which are defined by default in Gnumeric.

Table of Contents

Gnumeric Keybindings

Previous
Alphabetical List of Gnumeric Functions
ContentsNext
Gnumeric Keybindings
Previous

Gnumeric Keybindings

Keybindings are combinations of keystrokes which tell an application to run a task. These can greatly speed-up the user's interactions with an application. Some of the most common ones are Ctrl+s to save a file or Ctrl+q to quit the application. Gnumeric also comes with keybindings to make your spreadsheet exprience faster.

Normally, keybindings are next to a command in a menu. For example, if Save has Ctrl+s next to it, that means that Ctrl+s can be typed at the same time to save your file. However, some keystrokes aren't listed in the menus. They are as follows:


Previous
Keybinding Reference
Contents