LBS DCA (S) OpenOffice - Org Calc Notes
LBS DCA (S) OpenOffice - Org Calc Notes
LBS DCA (S) OpenOffice - Org Calc Notes
Calc
NIJEESH RAJ/9447925968
2/50
24/05/2011
Calc
DCA(S)
DIPLOMA IN COMPUTER APPLICATIONS (SOFTWARE)
For the benefit of Govt. job seekers, Govt. employees and others
NIJEESH RAJ/9447925968
3/50
24/05/2011
Calc
NIJEESH RAJ/9447925968
4/50
24/05/2011
Calc
What is Calc?
Calc is the spreadsheet component of OpenOffice.org (OOo). You can enter data (usually numerical) in a spreadsheet and then manipulate this data to produce certain results. Alternatively, you can enter data and then use Calc in a What if... manner by changing some of the data and observing the results without having to retype the entire spreadsheet or sheet. Other features provided by Calc include: Functions, which can be used to create formulas to perform complex calculations on data Database functions, to arrange, store, and filter data Dynamic charts; two new types of chartsBubble Charts and Filled Net Chartshave been introduced in OOo 3.2 Macros, for recording and executing repetitive tasks; scripting languages supported include OpenOffice.org Basic, Python, BeanShell, and JavaScript Ability to open, edit, and save Microsoft Excel spreadsheets Import and export of spreadsheets in multiple formats, including HTML, CSV, PDF, and PostScript
Formula Bar
On the left hand side of the Formula Bar is a small text box, called the Name Box, with a letter and number combination in it, such as D7. This combination, called the cell reference, is the column letter and row number of the selected cell. To the right of the Name Box are the the Function Wizard, Sum, and Function buttons. Clicking the Function Wizard button opens a dialog from which you can search through a list of available functions. This can be very useful because it also shows how the functions are formatted. In a spreadsheet the term function covers much more than just mathematical functions. See Chapter 7 for more details. Clicking the Sum button inserts a formula into the current cell that totals the numbers in the cells above the current cell. If there are no numbers above the current cell, then the cells to the left are placed in the Sum formula. Clicking the Function button inserts an equals (=) sign into the selected cell and the Input line, thereby enabling the cell to accept a formula. NIJEESH RAJ/9447925968 5/50 24/05/2011
Calc
When you enter new data into a cell, the Sum and Equals buttons change to Cancel and Accept buttons . The contents of the current cell (data, formula, or function) are displayed in the Input line, which is the remainder of the Formula Bar. You can either edit the cell contents of the current cell there, or you can do that in the current cell. To edit inside the Input line area, click in the area, then type your changes. To edit within the current cell, just double-click the cell.
Sheet tabs
At the bottom of the grid of cells are the sheet tabs. These tabs enable access to each individual sheet, with the visible (active) sheet having a white tab. Clicking on another sheet tab displays that sheet, and its tab turns white. You can also select multiple sheet tabs at once by holding down the Control key while you click the names.
NIJEESH RAJ/9447925968
6/50
24/05/2011
Calc
Single cell
Left-click in the cell. You can verify your selection by looking in the Name Box.
LibreOffice 3.3/OpenOffice.org 3.3 To select a range of cells by dragging the mouse: 1) Click in a cell. 2) Press and hold down the left mouse button. 3) Move the mouse around the screen. 4) Once the desired block of cells is highlighted, release the left mouse button. To select a range of cells without dragging the mouse: 1) Click in the cell which is to be one corner of the range of cells. 2) Move the mouse to the opposite corner of the range of cells. 3) Hold down the Shift key and click. To select a range of cells without using the mouse: 1) Select the cell that will be one of the corners in the range of cells. 2) While holding down the Shift key, use the cursor arrows to select the rest of the range.
Calc
LibreOffice 3.3/OpenOffice.org 3.3 3) Click on all of the subsequent columns or rows while holding down the Control key.
Calc
Entire sheet
To select the entire sheet, click on the small box between the A column header and the 1 row header.
Selecting sheets
You can select either one or multiple sheets. It can be advantageous to select multiple sheets at times when you want to make changes to many sheets at once.
Single sheet
Click on the sheet tab for the sheet you want to select. The active sheet becomes white .
All sheets
Right-click any one of the sheet tabs and choose Select All Sheets from the pop-up menu.
NIJEESH RAJ/9447925968
9/50
24/05/2011
Calc
Calc
Deleting sheets
Sheets can be deleted individually or in groups.
Single sheet
Right-click on the tab of the sheet you want to delete and choose Delete Sheet from the pop-up menu, or choose Edit > Sheet > Delete from the Menu bar. Either way, an alert will ask if you want to delete the sheet permanently. Click Yes.
Multiple sheets
To delete multiple sheets, select them as described earlier, then either right-click over one of the tabs and choose Delete Sheet from the pop-up menu, or choose Edit > Sheet > Delete from the Menu bar.
Renaming sheets
The default name for the a new sheet is SheetX, where X is a number. While this works for a small spreadsheet with only a few sheets, it becomes awkward when there are many sheets. To give a sheet a more meaningful name, you can: Enter the name in the Name box when you create the sheet, or Right-click on a sheet tab and choose Rename Sheet from the pop-up menu; replace the existing name with a different one. (New in OOo3.1) Double-click on a sheet tab to pop up the Rename Sheet dialog.
LibreOffice 3.3/OpenOffice.org 3.3 remained because they are frozen into place.
Calc
Figure 1. Frozen rows and columns You can set the freeze point at one row, one column, or both a row and a column as in Figure 1.
NIJEESH RAJ/9447925968
12/50
24/05/2011
Calc
Unfreezing
To unfreeze rows or columns, choose Window > Freeze. The check mark by Freeze will vanish.
Entering numbers
Click in the cell and type in the number using the number keys on either the main keyboard or the numeric keypad. To enter a negative number, either type a minus () sign in front of it or enclose it in parentheses (brackets), like this: (1234). By default, numbers are right-aligned and negative numbers have a leading minus symbol.
Entering text
Click in the cell and type the text. Text is left-aligned by default.
Tip
Numbers can have leading zeros and still be regarded as numbers (as opposed to text) if the cell is formatted appropriately. Right-click on the cell and chose Format Cells > Numbers. Adjust the leading zeros setting to add leading zeros to numbers. When a plain apostrophe is used to allow a leading 0 to be displayed, it is not visible in the cell after the Enter key is pressed. If smart quotes are used for apostrophes, the apostrophe remains visible in the cell. To choose the type of apostrophe, use Tools > AutoCorrect Options > Custom Quotes. The selection of the apostrophe type affects both Calc and Writer. When a number is formatted as text, take care that the cell containing the number is not used in a formula because Calc will ignore the value.
Note
Caution
LibreOffice 3.3/OpenOffice.org 3.3 separate time elements with colons such as 10:43:45.
Calc
Note
Different fonts include different special characters. If you do not find a particular special character you want, try changing the Font selection.
Tip
A shortcut way to fill cells is to grab the handle in the lower right-hand corner of the cell and drag it in the direction you want to fill. If the cell contains a number, the number will fill in series. If the cell contains text, the same text will fill in the direction you chose.
LibreOffice 3.3/OpenOffice.org 3.3 dialog shows the previously- defined series in the Lists box on the left, and the contents of the highlighted list in the Entries box.
Calc
Click New. The Entries box is cleared. Type the series for the new list in the Entries box (one entry per line), and then click Add.
Caution
This technique overwrites any information that is already in the cells on the other sheetswithout any warning. For this reason, when you are finished, be sure to deselect all the sheets except the one you want to edit. (Ctrl+click on a sheet tab to select or deselect the sheet.)
Sorting records
Sorting rearranges the visible cells on the sheet. In Calc, you can sort by up to three criteria, which are applied one after another. Sorts are handy when you are searching for a particular item, and become even more powerful after you have filtered data. In addition, sorting is often useful when NIJEESH RAJ/9447925968 15/50 24/05/2011
Calc
you add new information. When a list is long, it is usually easier to add new information at the bottom of the sheet, rather than inserting rows in the proper places. After you have added the information, you can sort it to update the sheet. Highlight the cells to be sorted, then select Data > Sort to open the Sort dialog or click the Sort Ascending or Sort Descending toolbar buttons. Using the dialog, you can sort the selected cells using up to three columns, in either ascending (A-Z, 1-9) or descending (Z-A, 9-1) order.
Filters
Use filters to limit the visible rows in a spreadsheet. Generic filters, common to all sorts of data manipulations, are automatically provided by the auto filter capability. You can also define your own filters.
Auto filters
Use auto filters to quickly create easily accessible filters found to be commonly used in many different types of applications. After creating an auto filter for a specific column, a combo box is added to the column. The combo box provides quick access to each of the auto filter types. The All auto filter causes all rows to be visible. The Standard auto filter opens the Standard Filter dialog and is the same as the standard filter. The Top 10 auto filter displays the ten rows with the largest value. If the value 70 is in the top ten values, then all rows containing the value 70 in the filtered column are displayed. In other words, more than ten rows may be displayed. An auto filter entry is created for each unique entry in the column. To create an auto filter, first select the columns to filter. For example, using the data in Table 12, select data in columns B and C. If you do not select the title rows, Calc asks if the title row or the current row should be used. Although you can place the auto filter in any row, only the rows below the auto filter are filtered. Use Data > Filter > AutoFilter to insert the auto filter combo box in the appropriate cell. Finally, use the drop-down arrow to choose an appropriate auto filter . Remove an auto filter by repeating the steps to create the auto filter in other words, the menu option acts as a toggle to turn the auto filter on and off. When an auto filter is removed, the combo box is removed from the cell. The macro in Listing 13 demonstrates creating an auto filter for a range.
Standard filters
Use Data > Filter > Standard Filter to open Standard Filter dialog and limit the view based on 1 to 3 filter conditions. Use Data > Filter > Remove Filter to turn off the filter.
Advanced filters
An advanced filter supports up to eight filter conditions, as opposed to the three supported by the NIJEESH RAJ/9447925968 16/50 24/05/2011
Calc
simple filter. The criteria for an advanced filter is stored in a sheet. The first step in creating an advanced filter is entering the filter criteria into the spreadsheet. 1) Select an empty space in the Calc document. The empty space may reside in any sheet in any location in the Calc document. 2) Duplicate the column headings from the area to be filtered into the area that will contain the filter criteria. 3) Enter the filter criteria underneath the column headings. The criterion in each column of a row is connected with AND. The criteria from each row are connected with OR. After creating one or more sets of filter criteria, apply an advanced filter as follows: 1) Select the sheet ranges that contain the data to filter. 2) Use Data > Filter > Advanced Filter to open the Advanced Filter dialog. 3) Select the range containing the filter criteria and any other relevant options. 4) Click OK.
Formatting data
The data in Calc can be formatted in several ways. It can either be edited as part of a cell style so that it is automatically applied, or it can be applied manually to the cell. Some manual formatting can be applied using toolbar icons. For more control and extra options, select the appropriate cell or cells range, right-click on it, and select Format Cells. All of the format options are discussed below.
Formatting numbers
Several different number formats can be applied to cells by using icons on the Formatting toolbar. Select the cell, then click the relevant icon. Some icons may not be visible in a default setup; click the down-arrow at the end of the Formatting bar and select other icons to display. For more control or to select other number formats, use the Numbers tab of the Format Cells dialog. Apply any of the data types in the Category list to the data. Control the number of decimal places and leading zeros. NIJEESH RAJ/9447925968 17/50 24/05/2011
Calc
The Language setting controls the local settings for the different formats such as the date order and the currency marker.
Note
If the selected cell range does not have column and row headers, AutoFormat is not available. 3) To select which properties (number format, font, alignment, borders, pattern, autofit width and height) to include in an AutoFormat, click More. Select or deselect the required options. 4) Click OK.
If you do not see any change in color of the cell contents, choose View > Value Highlighting from the menu bar.
Parameter field
Enter a reference, value, or formula in the parameter field, or in both parameter fields if you have selected a condition that requires two parameters. You can also enter formulas containing relative references.
Calc
select columns A and C. When you need a hidden element again, you can reverse the process, and show the element. To hide or show sheets, rows, and columns, use the options on the Format menu or the right-click (context) menu. For example, to hide a row, first select the row, and then choose Format > Row > Hide (or right-click and choose Hide). To hide or show selected cells, choose Format > Cells from the menu bar (or right-click and choose Format Cells). On the Format Cells dialog, go to the Cell Protection tab.
Creating subtotals
SUBTOTAL is a function listed under the Mathematical category when you use the Function Wizard (Insert > Function). Because of its usefulness, the function has a graphical interface accessible from Data > Subtotals. As the name suggests, SUBTOTAL totals data arranged in an array that is, a group of cells with labels for columns. Using the Subtotals dialog, you can select up to three arrays, then choose a statistical function to apply to them. When you click OK, Calc adds subtotal and grand total rows to the selected arrays, using the Result and Result2 cell styles to differentiate those entries. By default, matching items throughout your array will be gathered together as a single group above a subtotal.
Calc
entered and provide help messages that explain the content rules you have set up for the cell and what users should do when they enter invalid content. You can also set the cell to refuse invalid content, accept it with a warning, orif you are especially well-organizedstart a macro when an error is entered. Validation is most useful for cells containing functions. If cells are set to accept invalid content with a warning, rather than refusing it, you can use Tools > Detective > Mark Invalid Data to find the cells with invalid data. The Detective marks with a circle any cells containing invalid data. Note that a validity rule is considered part of a cells format. If you select Format or Delete All from the Delete Contents window, then it is removed. (Repeating the Detectives Mark Invalid Data command then removes the invalid data circle, because the data is no longer invalid.) If you want to copy a validity rule with the rest of the cell, use Edit > Paste Special > Paste Formats or Paste All.
Creating formulas
You can enter formulas in two ways, either directly into the cell itself, or at the input line. Either way, you need to start a formula with one of the following symbols: =, + or . Starting with anything else causes the formula to be treated as if it were text. NIJEESH RAJ/9447925968 20/50 24/05/2011
Calc
Operators in formulas
Each cell on the worksheet can be used as a data holder or a place for data calculations. Entering data is accomplished simply by typing in the cell and moving to the next cell or pressing Enter. With formulas, the equals sign indicates that the cell will be used for a calculation. While the calculation on the left was accomplished in only one cell, the real power is shown on the right where the data is placed in cells and the calculation is performed using references back to the cells. In this case, cells B3 and B4 were the data holders, with B5 the cell where the calculation was performed. Notice that the formula was shown as =B3+B4. The plus sign indicates that the contents of cells B3 and B4 are to be added together and then have the result in the cell holding the formula. All formulas build upon this concept. Other ways of entering formulas are shown in Table 2. These cell references allow formulas to use data from anywhere in the worksheet being worked on or from any other worksheet in the workbook that is opened. If the data needed was in different worksheets, they would be referenced by referring to the name of the worksheet, for example =SUM(Sheet2.B12+Sheet3.A11).
Note
To enter the = symbol for a purpose other than creating a formula as described in this chapter, type an apostrophe or single quotation mark before the =. For example, in the entry '= means different things to different people, Calc treats everything after the single quotation markincluding the = signas text.
Formula
=A1+10 =A1*16% =A1*A2 =ROUND(A1;1) =EFFECTIVE(5%;12) =B8-SUM(B10:B14)
Description
Displays the contents of cell A1 plus 10. Displays 16% of the contents of A1. Displays the result of the multiplication of A1 and A2. Displays the contents of cell A1 rounded to one decimal place. Calculates the effective interest for 5% annual nominal interest with 12 payments a year. Calculates B8 minus the sum of the cells B10 to B14.
=SUM(B8;SUM(B10:B14)) Calculates the sum of cells B10 to B14 and adds the value to B8. =SUM(B1:B65536) =AVERAGE(BloodSugar) Sums all numbers in column B. Displays the average of a named range defined under the name BloodSugar.
NIJEESH RAJ/9447925968
21/50
24/05/2011
Calc
Displays the results of a conditional analysis of data from two sources. If the contents of C31 is greater than 140, then HIGH is displayed otherwise, OK is displayed.
Functions can be identified in Table 7 with a word, for example ROUND, followed by parentheses enclosing references or numbers. It is also possible to establish ranges for inclusion by naming them using Insert > Names, for example BloodSugar representing a range such as B3:B10. Logical functions can also be performed as represented by the IF statement which results in a conditional response based upon the data in the identified cell, for example =IF(A2>=0;"Positive";"Negative") A value of 3 in cell A2 would return the result Positive, 9 the result Negative.
Operator types
You can use the following operators in OpenOffice.org Calc: arithmetic, comparative, descriptive, text, and reference.
Arithmetic operators
The addition, subtraction, multiplication and division operators return numerical results. The Negation and Percent operators identify a characteristic of the number found in the cell, for example -37. The example for Exponentiation illustrates how to enter a number that is being multiplied by itself a certain number of times, for example 23 = 2*2*2. Table 3: Arithmetical operators Operator + (Plus) (Minus) (Minus) * (asterisk) / (Slash) % (Percent) ^ (Caret) Name Addition Subtraction Negation Multiplication Division Percent Exponentiation Example =1+1 =21 5 =2*2 =10/5 15% 2^3
Comparative operators
Comparative operators are found in formulas that use the IF function and return either a true or false answer; for example, =IF(B6>G12; 127; 0) which, loosely translated, means if the contents of cell B6 are greater than the contents of cell G12, then return the number 127, otherwise return the number 0. A direct answer of TRUE or FALSE can be obtained by entering a formula such as =B6>B12. If the numbers found in the referenced cells are accurately represented, the answer TRUE is returned, otherwise FALSE is returned.
NIJEESH RAJ/9447925968
22/50
24/05/2011
LibreOffice 3.3/OpenOffice.org 3.3 Table 4: Comparative operators Operator = (equal sign) > (Greater than) < (Less than) >= (Greater than or equal to) <= (Less than or equal to) <> (Inequality) Name Equal Greater than Less than Greater than or equal to Less than or equal to Inequality Example A1=B1 A1>B1 A1<B1 A1>=B1 A1<=B1 A1<>B1
Calc
If cell A1 contains the numerical value 4 and cell B1 the numerical value 5, the above examples would yield results of FALSE, FALSE, TRUE, FALSE, TRUE, and TRUE.
Text operators
It is common for users to place text in spreadsheets. To provide for variability in what and how this type of data is displayed, text can be joined together in pieces coming from different places on the spreadsheet. In this example, specific pieces of the text were found in three different cells. To join these segments together, the formula also adds required spaces and punctuation enclosed within quotation marks, resulting in a formula of =B2 & " " & C2 & ", " & D2. The result is the concatenation into a date formatted in a particular sequence. Taking this example further, if the result cell is defined as a name, then text concatenation is performed using this defined name. Calc has a CONCATENATE function which performs the same operation.
Reference operators
In its simplest form a reference refers to a single cell, but references can also refer to a rectangle or cuboid range or a reference in a list of references. To build such references you need reference operators. An individual cell is identified by the column identifier (letter) located along the top of the columns and a row identifier (number) found along the left-hand side of the spreadsheet. On spreadsheets read from left to right, the upper left cell is A1.
Range operator
The range operator is written as colon. An expression using the range operator has the following syntax: reference left : reference right The range operator builds a reference to the smallest range including both the cells referenced with the left reference and the cells referenced with the right reference. In the upper left corner of Figure 130 the reference A1:D12 is shown, corresponding to the cells included in the drag operation with the mouse to highlight the range.
NIJEESH RAJ/9447925968
23/50
24/05/2011
Calc
Reference to a rectangle range with 6 cells, 2 column width 3 row height. When you click on the reference in the formula in the input line, a border indicates the rectangle. Reference to a rectangle range with cell A2 top left and cell C9 bottom right. So the range contains 24 cells, 3 column width 8 row height. Reference to a cuboid range with 24 cells, 4 column width 2 row height 3 sheets depth.
(A2:B4):C9 Sheet1.A3:Sheet3.D4
When you enter B4:A2 or A4:B2 directly, then Calc will turn it to A2:B4. So the left top cell of the range is left of the colon and the bottom right cell is right of the colon. But if you name the cell B4 for example with '_start' and A2 with '_end', you can use _start:_end without any error. Calc can not reference a whole column of unspecified length via A:A or a whole row via 1:1 yet as you might know from other spreadsheet programs.
Intersection operator
The intersection operator is written as an exclamation mark. An expression using the intersection operator has the following syntax: reference left ! reference right If the references refer to single ranges, the result is a reference to a single range, containing all cells, which are both in the left reference and in the right reference. If the references are reference lists, then each list item from the left is intersected with each one from the right and these results are concatenated to a reference list. The order is to first intersect the first item from the left with all items from the right, then intersect the second item from the left with all items from the right, and so on.
NIJEESH RAJ/9447925968
24/50
24/05/2011
Calc
This results in a reference to the range B3:B4, because these cells are inside A2:B4 and inside B3:D4. (A2:B4~B1:C2) ! (B2:C6~C1:D3) First the intersections A2:B4!B2:C6, A2:B4!C1:D3, B1:C2!B2:C6 and B1:C2!C1:D3 are calculated. This results in B2:B4, empty, B2:C2, and C1:C2. Then these results are concatenated, dropping empty parts. So the final result is the reference list B2:B4 ~ B2:C2 ~ C1:C2. You can use the intersection operator to refer a cell in a cross tabulation in an understandable way. If you have columns labeled 'Temperature' and 'Precipitation' and the rows labeled 'January', 'February', 'March', and so on, then the following expression 'February' ! !Temperature' will reference to the cell containing the temperature in February. The intersection operator (!) should have a higher precedence than the concatenation operator (~), but do not rely on precedence.
Relative referencing
An example of a relative reference will illustrate the difference between a relative reference and absolute reference using the spreadsheet from Figure 131. 1) Type the numbers 4 and 11 into cells C3 and C4 respectively of that spreadsheet. 2) Copy the formula in cell B5 to cell C5. You can do this by using a simple copy and paste or click and drag B5 to C5 as shown below. The formula in B5 calculates the sum of values in the two cells B3 and B4. 3) Click in cell C5. The formula bar shows =C3+C4 rather than =B3+B4 and the value in C5 is 15, the sum of 4 and 11 which are the values in C3 and C4. In cell B5 the references to cells B3 and B4 are relative references. This means that Calc interprets the formula in B5 and applie it to the cells in the B column and puts the result in the in the cell holding the formula. When you copied the formula to another cell, the same procedure was used to calculate the value to put in that cell. This time the formula in cell C5 referred to cells C3 and C4.
NIJEESH RAJ/9447925968
25/50
24/05/2011
Calc
Figure 2: Relative references You can think of a relative address as a pair of offsets to the current cell. Cell B1 is 1 column to the left of Cell C5 and 4 rows above. The address could be written as R[-1]C[-4]. In fact earlier spreadsheets allowed this notation method to be used in formulas. Whenever you copy this formula from cell B5 to another cell the result will always be the sum of the two numbers taken from the two cells one and two rows above the cell containing the formula. Relative addressing is the default method of referring to addresses in Calc.
Absolute referencing
You may want to multiply a column of numbers by a fixed amount. A column of figures might show amounts in US Dollars. To convert these amounts to Euros it is necessary to multiply each dollar amount by the exchange rate. $US10.00 would be multiplied by 0.75 to convert to Euros, in this case Eur7.50. The following example shows how to input an exchange rate and use that rate to convert amounts in a column form USD to Euros. 1) Input the exchange rate Eur:USD (0.75) in cell D1. Enter amounts (in USD) into cells D2, D3 and D4, for example 10, 20, and 30. 2) In cell E2 type the formula =D2*D1. The result is 7.5, correctly shown. 3) Copy the formula in cell E2 to cell E3. The result is 200, clearly wrong! Calc has copied the formula using relative addressing - the formula in E3 is =D3*D2 and not what we want which is =D3*D1. 4) In cell E2 edit the formula to be =D2*$D$1. Copy it to cells E3 and E4. The results are now 15 and 22.5 which are correct.
NIJEESH RAJ/9447925968
26/50
24/05/2011
Calc
Copying formula from E2 to E3 & changing the formula to read absolute reference
Applying the correct formula from E2 to E3 Figure 3: Absolute References The $ signs before the D and the 1 convert the reference to cell D1 from relative to absolute or fixed. If the formula is copied to another cell the second part will always show $D$1. The interpretation of this formula is take the value in the cell one column to the left in the same row and multiply it by the value in cell D1. Cell references can be shown in four ways: Reference D1 $D$1 $D1 D$1 Explanation Relative, from cell E3: the cell one column to the left and two rows above Absolute, from cell E3: the cell D1 Partially absolute, from cell E3: the cell in column D and two rows above Partially absolute, from cell E3: the cell one column to the left and row 1
Order of calculation
Order of calculation refers to the sequence in which numerical operations are performed. Division and multiplication are performed before addition or subtraction. There is a common tendency to expect calculations to be made from left to right as the equation would be read in English. Calc evaluates the entire formula, then based upon programming precedence breaks the formula down executing multiplication and division operations before other operations. Therefore, when creating formulas you should test your formula to make sure that the correct result is being obtained. NIJEESH RAJ/9447925968 27/50 24/05/2011
LibreOffice 3.3/OpenOffice.org 3.3 Following is an example of the order of calculation in operation. Table 5 Order of Calculation Left To Right Calculation Ordered Calculation 1+3*2+3 = 11 =1+3*2+3 result 10 1+3=4, then 4 X 2 = 8, then 8 + 3 = 11 3*2=6, then 1 + 6 + 3 = 10
Calc
Another possible intention could be: The program resolves the multiplication of 3 X 2 before 1+3*2+3 = 20 dealing with the numbers being added. If you intend for the result to be either of the two possible solutions on the left, the way to achieve these results would be to order the formula as: ((1+3) * 2)+3 = 11 (1+3) * (2+3) = 20
Understanding functions
Calc includes over 350 functions to help you analyze and reference data. Many of these functions are for use with numbers, but many others are used with dates and times, or even text. A function may be as simple as adding two numbers together, or finding the average of a list of numbers. Alternatively, it may be as complex as calculating the standard deviation of a sample, or a hyperbolic tangent of a number. Typically, the name of a function is an abbreviated description of what the function does. For instance, the FV function gives the future value of an investment, while BIN2HEX converts a binary number to a hexadecimal number. By tradition, functions are entered entirely in upper case letters, although Calc will read them correctly if they are in lower or mixed case, too. + * This operator adds two numbers together for a result. SUM() on the other hand adds groups of contiguous ranges of numbers together. This operator multiplies two numbers together for a result. PRODUCT() does the same for multiplying that SUM() does for adding.
Each function has a number of arguments used in the calculations. These arguments may or may not have their own name. Your task is to enter the arguments needed to run the function. In some cases, the arguments have predefined choices, and you may need to refer to the online help or Appendix B (Description of Functions) in this book to understand them. More often, however, an argument is a value that you enter manually, or one already entered in a cell or range of cells on the spreadsheet. In Calc, you can enter values from other cells by typing in their name or range, orunlike the case in some spreadsheetsby selecting cells with the mouse. If the values in the cells change, then the result of the function is automatically updated. For compatibility, functions and their arguments in Calc have almost identical names to their counterparts in Microsoft Excel. However, both Excel and Calc have functions that the other lacks. Occasionally, functions with the same names in Calc and Excel have different arguments, or slightly different names for the same argumentneither of which can be imported to the other. However, the majority of functions can be used in both Calc and Excel without any change.
NIJEESH RAJ/9447925968
28/50
24/05/2011
Calc
Note
OOo uses the semicolon as an argument list separator, unlike Excel which uses a comma. This is a common mistake made by users accustomed to entering Excel formulas.
Many arguments are a number. A Calc function can take up to thirty numbers as an argument. That may not sound like much at first. However, when you realize that the number can be not only a number or a single cell, but also an array or range of cells that contain several or even hundreds of cells, then the apparent limitation vanishes. Depending on the nature of the function, arguments may be entered as follows: "text data" 9 "9" A1 The quotes indicate text or string data is being entered. The number nine is being entered as a number. The number nine is being entered as text The address for whatever is in Cell A1 is being entered
Nested functions
Functions can also be used as arguments within other functions. These are called nested functions. =SUM(2;PRODUCT(5;7)) To get an idea of what nested functions can do, imagine that you are designing a self-directed learning module. During the module, students do three quizzes, and enter the results in cells A1, A2, and A3. In A4, you can create a nested formula that begins by averaging the results of the quizzes with the formula =AVERAGE(A1:A3). The formula then uses the IF function to give the student feedback that depends upon the average grade on the quizzes. The entire formula would read: =IF(AVERAGE(A1:A3) >85; "Congratulations! You are ready to advance to the next module"; "Failed. Please review the material again. If necessary, contact your instructor for help") Depending on the average, the student would receive the message for either congratulations or failure. NIJEESH RAJ/9447925968 29/50 24/05/2011
Calc
Notice that the nested formula for the average does not require its own equal sign. The one at the start of the equation is enough for both formulas. If you are new to spreadsheets, the best way to think of functions is as a scripting language. We've used simple examples to explain the concept more clearly, but, through nesting of functions, a Calc formula can quickly become complex. A more reliable method is to use the Function List . Available from the Insert menu, the Function List automatically docks as a pane on the right side of the Calc editing window. If you wish, you can Control+double-click on a blank space at the top of the pane to undock this pane and make it a floating window. The Function List includes a brief description of each function and its arguments; highlight the function and look at the bottom of the pane to see the description. If necessary, hover the cursor over the division between the list and the description; when the cursor becomes a two- headed arrow, drag it upwards to increase the space for the description. Double-click on a functions name to add it to the current cell, together with placeholders for each of the functions arguments. Using the Function List is almost as fast as manual entry, and has the advantage of not requiring that you memorize a formula that you want to use. In theory, it should also be less error-prone. In practice, though, some users may fumble when replacing the placeholders with values. Another feature is the ability to display the last formulas used.
Function Wizard
The most commonly used input method is the Function Wizard. To open the Function Wizard, choose Insert > Function, or click the fx button on the Function tool bar, or press Ctrl+F2. Once open, the Function Wizard provides the same help features as the Function List, but adds fields in which you can see the result of a completed function, as well as the result of any larger formula of which it is part. Select a category of functions to shorten the list, then scroll down through the named functions and select the required one. When you select a function its description appears on the right-hand side of the dialog. Double-click on the required function. The Wizard now displays an area to the right where you can enter data manually in text boxes or click the Shrink button wizard so you can select cells from the worksheet. To select cells, either click directly upon the cell or hold down the left mouse button and drag to select the required area. When the area has been selected, click the Shrink button again to return to the wizard. If multiple arguments are needed select the next text box below the first and repeat the selection process for the next cell or range of cells. Repeat this process as often as required. The Wizard will accept up to 30 ranges or arguments in the SUM function. Click OK to accept the function and add it to the cell and get the result. You can also select the Structure tab (Figure 141) to see a tree view of the parts of the formula. The main advantage over the Function List is that each argument is entered in its own field, making it easier to manage. The price of this reliability is slower input, but this is often a small price to pay, since precision is generally more important than speed when creating a spreadsheet. After you enter a function on the Input line, press the Enter key or click the Accept button on the NIJEESH RAJ/9447925968 30/50 24/05/2011
LibreOffice 3.3/OpenOffice.org 3.3 Function toolbar to add the function to the cell and get its result.
Calc
1. 2. 3. 4. 5.
Name Box showing list of common functions Function Wizard Cancel Accept Input Line Figure 4: The Function toolbar
If you see the formula in the cell instead of the result, then Formulas are selected for display in Tools > Options > OpenOffice.org Calc > View > Display. Deselect Formulas, and the result will display. However, you can still see the formula in the Input line.
Examples of functions
For novices, functions are one of the most intimidating features of OpenOffice.org's Calc. New users quickly learn that functions are an important feature of spreadsheets, but there are almost four hundred, and many require input that assumes specialized knowledge. Fortunately, Calc includes dozens of functions that anyone can use.
Basic arithmetic
The simple arithmetic functions are addition, subtraction, multiplication, and division. Except for subtraction, each of these operations has its own function: SUM for addition PRODUCT for multiplication QUOTIENT for division. Traditionally, subtraction does not have a function. SUM, PRODUCT and QUOTIENT are useful for entering ranges of cells in the same way as any other function, with arguments in brackets after the function name. However, for basic equations, many users prefer the time-honored computer symbols for these operations, using the plus sign (+) for addition, the hyphen () for subtraction, the asterisk (*) for multiplication and the forward slash (/) for division. These symbols are quick to enter without requiring your hands to stray from the keyboard. A similar choice is also available if you want to raise a number by the power of another. Instead of NIJEESH RAJ/9447925968 31/50 24/05/2011
Calc
Moreover, they have the advantage that you enter formulas with them in an order that more closely approximates human readable format than the spreadsheet-readable format used by the equivalent function. For instance, instead of entering =SUM (A1:A2), or possibly =SUM (A1;A2), you enter =A1+A2. This almost-human readable format is especially useful for compound operations, where writing =A1*(A2+A3) is briefer and easier to read than =PRODUCT(A1;SUM(A2:A3)). The main disadvantage of using arithmetical operators is that you cannot directly use a range of cells. In other words, to enter the equivalent of =SUM (A1:A3), you would need to type =A1+A2+A3. Otherwise, whether you use a function or an operator is largely up to youexcept, of course, when you are subtracting. However, if you use spreadsheets regularly in a group setting such as a class or an office, you might want to standardize on an entry format so that everyone who handles a spreadsheet becomes accustomed to a standard input.
Simple statistics
Another common use for spreadsheet functions is to pull useful information out of a list, such as a series of test scores in a class, or a summary of earnings per quarter for a company. You can, of course, scan a list of figures if you want basic information such as the highest or lowest entry or the average. The only trouble is, the longer the list, the more time you waste and the more likely you are to miss what youre looking for. Instead, it is usually quicker and more efficient to enter a function. Such reasons explain the existence of a function like COUNT, which does no more than give the total number of entries in the designated cell range. Similarly, to find the highest or lowest entry, you can use MIN or MAX. For each of these formulas, all arguments are either a range of cells, or a series of cells entered individually. Each also has a related function, MINA or MAXA, which performs the same function, but treats a cell formatted for text as having a value of 0 (The same treatment of text occurs in any variation of another function that adds an "A" to the end). Either function gives the same result, and could be useful if you used a text notation to indicate, for example, if any student were absent when a test was written, and you wanted to check whether you needed to schedule a makeup exam. For more flexibility in similar operations, you could use LARGE or SMALL, both of which add a specialized argument of rank. If the rank is 1 used with LARGE, you get the same result as you would with MAX. However, if the rank is 2, then the result is the second largest result. Similarly, a rank of 2 used with SMALL gives you the second smallest number. Both LARGE and SMALL are handy as a permanent control, since, by changing the rank argument, you can quickly scan multiple results. You would need to be an expert to want to find the Poisson Distribution of a sample, or to find the skew or negative binomial of a distribution (and, if you are, you will find functions in Calc for such things). However, for the rest of us, there are simpler statistical functions that you can quickly learn to use. In particular, if you need an average, you have a number to choose from. You can find the arithmetical meansthat is, the result when you add all entries in a list then divided by the number NIJEESH RAJ/9447925968 32/50 24/05/2011
Calc
of entries by enter a range of numbers when using AVERAGE, or AVERAGE A to include text entries and to give them a value of zero. In addition, you can get other information about the data set: MEDIAN: The entry that is exactly half way between the highest and lowest number in a list. MODE: The most common entry in a list of numbers. QUARTILE:The entry at a set position in the array of numbers. Besides the cell range, you enter the type of Quartile: 0 for the lowest entry, 1 for the value of 25%, 2 for the value of 50%, 3 for 75%, and 4 for the highest entry. Note that the result for types 1 through 3 may not represent an actual item entered. RANK: The position of a given entry in the entire list, measured either from top to bottom or bottom to top. You need to enter the cell address for the entry, the range of entries, and the type of rank (0 for the rank from the highest, or 1 for the rank from the bottom. Some of these functions overlap; for example, MIN and MAX are both covered by QUARTILE. In other cases, a custom sort or filter might give much the same result. Which you use depends on your temperament and your needs. Some might prefer to use MIN and MAX because they are easy to remember, while others might prefer QUARTILE because it is more versatile.
Calc
=ROUND((SUM(A1;A2)) adds the figures in cells A1 and A2, then rounds them off to the nearest whole number. However, even though you dont need to work with exact figures every day, you may still want to refer to them occasionally. If that is the case, then you are probably better off separating the two functions, placing =SUM(A1;A2) in cell A3, and =ROUND (A3) in A4, and clearly labelling each function.
Rounding methods
The most basic function for rounding numbers in Calc is ROUND. This function will round off a number according to the usual rules of symmetric arithmetic rounding: a decimal place of .4 or less gets rounded down, while one of .5 or more gets rounded up. However, at times, you may not want to follow these rules. For instance, if you are one of those contractors who bills a full hour for any fraction of an hour you work, you would want to always round up so you didnt lose any money. Conversely, you might choose to round down to give a slight discount to a long-established customer. In these cases, you might prefer to use ROUNDUP or ROUNDDOWN, which, as their names suggest, round a number to the nearest integer above or below it. All three of these functions require the single argument of number the cell or number to be rounded. Used with only this argument, all three functions round to the nearest whole number, so that 46.5 would round to 47 with ROUND or ROUNDUP and 46 with ROUNDDOWN. However, if you use the optional count argument, you can specify the number of decimal places to include. For instance, if number was set to 1, then 48.65 would round to 48.7 with ROUND or ROUNDUP and to 48.6 with ROUNDDOWN. As an alternative to ROUNDDOWN when working with decimals, you can use TRUNC (short for truncate). It takes exactly the same arguments as ROUNDDOWN, so which function you use is a matter of choice. If you aren't working with decimals, you might choose to use INT (short for integer), which takes only the number argument. Another option is the ODD and EVEN pair of functions. ODD rounds up to the nearest odd number if what is entered in the number argument is a positive number, and rounds down if it is a negative number, while EVEN does the same for an even number. Options are the CEILING and FLOOR functions. As you can guess from the names, CEILING rounds up and FLOOR rounds down. For both functions, the number that they round to is determined by the closest multiple of the number that you enter as the significance argument. For instance, if your business insurance is billed by the work week, the fact that you were only open three days one week would be irrelevant to your costs; you would still be charged for an entire week, and therefore might want to use CEILING in your monthly expenses. Conversely, if you are building customized computers and completed 4.5 in a day, your client would only be interested in the number ready to ship, so you might use FLOOR in a report of your progress. If cell E1 contains the value 46.7, =CEILING(E1;7) will return the value 49. Besides number and significance, both CEILING and FLOOR include an optional argument called mode, which takes a value of 0 or 1. If mode is set to 0, and both the number and the significance are negative numbers, then the result of either function is rounded up; if it is set to 1, and both the number and the significance are negative numbers, then the results are rounded down. In other words, if the number is -11 and the significance is -5, then the result is -10 when the mode is set to 0, but -15 when set to 1. However, if you are exchanging spreadsheets between Calc and MS Excel, remember that the mode NIJEESH RAJ/9447925968 34/50 24/05/2011
Calc
argument is not supported by Excel. If you want the answers to be consistent between the two spreadsheets, set the mode in Calc to -1. A function somewhat similar to CEILING and FLOOR is MROUND. Like CEILING AND FLOOR, MROUND requires two arguments, although, somewhat confusingly, the second one is called multiple rather than significance, even though the two are identical. The difference between MROUND and CEILING and FLOOR is that MROUND rounds up or down using symmetric arithmetic rounding. For example, if the number is 77 and the multiple is 5, then MROUND gives a result of 75. However, if the multiple is changed to 7, then MROUND's result becomes 77. Once you become familiar with Calcs long, undifferentiated list of functions, you can start to decide which is most useful for your purposes. However, one last point is worth mentioning: If you are working with more than two decimal places, don't be surprised if you dont see the same number of decimal places on the spreadsheet as you do on the function wizard. If you dont, the reason is that Tools > Options > OpenOffice.org Calc > Calculate > Decimal Places defaults to 2. Change the number of decimal places, and, if necessary, uncheck the Precision as shown box on the same page, and the spreadsheet will display as expected.
Mathematical functions
Syntax ABS(number) ACOS(number) ACOSH(number) ACOT(number) ACOTH(number) ASIN(number) ASINH(number) ATAN(number) ATAN2(number_x; number_y) Description Returns the absolute value of the given number. Returns the inverse cosine of the given number in radians. Returns the inverse hyperbolic cosine of the given number in radians. Returns the inverse cotangent of the given number in radians. Returns the inverse hyperbolic cotangent of the given number in radians. Returns the inverse sine of the given number in radians. Returns the inverse hyperbolic sine of the given number in radians. Returns the inverse tangent of the given number in radians. Returns the inverse tangent of the specified x and y coordinates. Number_x is the value for the x coordinate. Number_y is the value for the y coordinate. Returns the inverse hyperbolic tangent of the given number. (Angle is returned in radians.) Rounds the given number to the nearest integer or multiple of significance. Significance is the value to whose multiple of ten the value is to be rounded up (.01, .1, 1, 10, etc.). Mode is an optional value. If it is indicated and non-zero and if the number and significance are negative, rounding up is carried out based on that value. 35/50 24/05/2011
NIJEESH RAJ/9447925968
Calc Returns the number of combinations for a given number of objects. Count_1 is the total number of elements. Count_2 is the selected count from the elements. This is the same as the nCr function on a calculator. Returns the number of combinations for a given number of objects (repetition included). Count_1 is the total number of elements. Count_2 is the selected count from the elements. Returns the cosine of the given number (angle in radians). Returns the cotangent of the given number (angle in radians). Returns the number of empty cells. Range is the cell range in which the empty cells are counted. Returns the number of elements that meet certain criteria within a cell range. Range is the range to which the criteria are to be applied. Criteria indicates the criteria in the form of a number, a regular expression, or a character string by which the cells are counted. Rounds the given number down to the nearest multiple of significance. Significance is the value to whose multiple of ten the number is to be rounded down (.01, .1, 1, 10, etc.). Mode is an optional value. If it is indicated and non-zero and if the number and significance are negative, rounding up is carried out based on that value. Rounds the given number down to the nearest integer. Returns TRUE if the given value is an even integer, or FALSE if the value is odd. If the value is not an integer, the function evaluates only the integer part of the value. Returns TRUE if the given value is an odd integer, or FALSE if the value is even. If the value is not an integer, the function evaluates only the integer part of the value. Returns the logarithm of the given number to the specified base. Base is the base for the logarithm calculation. Returns the remainder after a number is divided by a divisor. Dividend is the number which will be divided by the divisor. Divisor is the number by which to divide the dividend. Multiplies all the numbers given as arguments and returns the product. Number 1 to number 30 are up to 30 arguments whose product is to be calculated, separated by semi-colons. Rounds the given number to a certain number of decimal places according to valid mathematical criteria. Count (optional) is the number of the places to which the value is to be rounded. If the count parameter is negative, only the whole number portion is rounded. It is rounded to the place indicated by the count. 36/50 24/05/2011
COMBINA(count_1; count_2)
INT(number) ISEVEN(value)
ISODD(value)
PRODUCT(number 1 to 30)
ROUND(number; count)
NIJEESH RAJ/9447925968
Calc Rounds the given number. Count (optional) is the number of digits to be rounded down to. If the count parameter is negative, only the whole number portion is rounded. It is rounded to the place indicated by the count. Rounds the given number up. Count (optional) is the number of digits to which rounding up is to be done. If the count parameter is negative, only the whole number portion is rounded. It is rounded to the place indicated by the count. Returns the sine of the given number (angle in radians). Returns the positive square root of the given number. The value of the number must be positive. Calculates subtotals. If a range already contains subtotals, these are not used for further calculations. Function is a value that stands for another function such as Average, Count, Min, Sum, Var. Range is the range whose cells are included. Adds all the numbers in a range of cells. Number_1; number_2;... number_30 are up to 30 arguments whose sum is to be calculated. You can also enter a range using cell references. Adds the cells specified by a given criteria. The search supports regular expressions. Range is the range to which the criteria are to be applied. Criteria is the cell in which the search criterion is shown, or the search criterion itself. Sum_range is the range from which values are summed; if it has not been indicated, the values found in the Range are summed. Returns the tangent of the given number (angle in radians).
ROUNDUP(number; count)
TAN(number)
Calc Returns the most common value in a data set. Number_1; number_2; ... number_30 are numerical values or ranges. If several values have the same frequency, it returns the smallest value. An error occurs when a value does not appear twice.
NOW()
TODAY()
Logical functions
Syntax AND(logical_value_1; logical_value_2; ...logical_value_30) Description Returns TRUE if all arguments are TRUE. If any element is FALSE, this function returns the FALSE value. Logical_value_1; logical_value_2; ...logical_value_30 are conditions to be checked. All conditions can be either TRUE or FALSE. If a range is entered as a parameter, the function uses the value from the range that is in the current column or row. The result is TRUE if the logical value in all cells within the cell range is TRUE Specifies a logical test to be performed. Test is any value or expression that can be TRUE or FALSE. Then_value (optional) is the value that is returned if the logical test is TRUE. Otherwise_value (optional) is the value that is returned if the logical test is FALSE. Returns TRUE if at least one argument is TRUE. Returns the value FALSE if all the arguments have the logical value FALSE.. Logical_value_1; logical_value_2; ...logical_value_30 are conditions to be checked. All conditions can be either TRUE or FALSE. If a range is entered as a parameter, the function uses the value from the range that is in the current column or row.
NIJEESH RAJ/9447925968
38/50
24/05/2011
Calc
Informational functions
Syntax ISTEXT(value) Description Returns TRUE if the cell contents refer to text. If an error occurs, the function returns a logical or numerical value. Value is a value, number, Boolean value, or error value to be tested.
Database functions
Syntax DAVERAGE(database; database_field; search_criteria) DCOUNT(database; database_field; search_criteria) Description Returns the average of the values of all cells (fields) in all rows (database records) that match the specified search_criteria. The search supports regular expressions. Counts the number of rows (records) in a database that match the specified search_criteria and contain numerical values. The search supports regular expressions. For the database_field parameter, enter a cell address to specify the column, or enter the number 0 for the entire database. The parameter cannot be empty. Returns the maximum content of a cell (field) in a database (all records) that matches the specified search_criteria. The search supports regular expressions. Returns the minimum content of a cell (field) in a database that matches the specified search_criteria. The search supports regular expressions. Multiplies all cells of a data range where the cell contents match the search_criteria. The search supports regular expressions. Returns the total of all cells in a database field in all rows (records) that match the specified search_criteria. The search supports regular expressions.
DMAX(database; database_field; search_criteria) DMIN(database; database_field; search_criteria) DPRODUCT(database; database_field; search_criteria) DSUM(database; database_field; search_criteria)
Text functions
Syntax LEFT(text; number) Description Returns the first character or characters in a text string. Text is the text where the initial partial words are to be determined. Number (optional) is the number of characters for the start text. If this parameter is not defined, one character is returned. Returns the length of a string including spaces. Text is the text whose length is to be determined. Converts all uppercase letters in a text string to lowercase. Text is the 39/50 24/05/2011
Calc
Returns a text segment of a character string. The parameters specify the starting position and the number of characters. Text is the text containing the characters to extract. Start is the position of the first character in the text to extract. Number is the number of characters in the part of the text. Capitalizes the first letter in all words of a text string. Text refers to the text to be converted. Defines the last character or characters in a text string. Text is the text of which the right part is to be determined. Number (optional) is the number of characters from the right part of the text. Converts a number into a Roman numeral. The value range must be between 0 and 3999; the modes can be integers from 0 to 4. Number is the number that is to be converted into a Roman numeral. Mode (optional) indicates the degree of simplification. The higher the value, the greater is the simplification of the Roman numeral. Converts the string specified in the text parameter to uppercase. Text refers to the lower case letters you want to convert to upper case.
ROMAN(number; mode)
UPPER(text)
Examples: 1. =SUM(A1,A4,A6,A8,A10) 2. =SUM(A1:A10) 3. =SUM(A1:A5,A8,A10) 4. =INT(E12) 5. =INT(5.124589) 6. =CEILING(E15,1) 7. =CEILING(5.65899,1) 8. =FLOOR(E14,1) 9. =FLOOR(4.96625,1) 10. =SQRT(B17) 11. =SQRT(64) 12. =MOD(A15,3) 13. =MOD(10,3) 14. =TODAY() 15. =ROUND(E15,3) 16. =ROUND(5.9645885,3) 17. =SQRT((MIN(A1:A11))) 18. =SQRT((SUM(A1:A11))) NIJEESH RAJ/9447925968 40/50 24/05/2011
LibreOffice 3.3/OpenOffice.org 3.3 19. =SUMIF(B2:B7,"LDC",C2:C7) 20. =COUNT(C2:C7) 21. =COUNTIF(B2:B7,"LDC") 22. =IF(B2>=210,"PASSED","FAILED")
Calc
23. =IF(B2>=360,"FIRST CLASS",IF(B2>=300,"SECOND CLASS",IF(B2>=210,"THIRD CLASS","FAILED"))) 24. =SUMIF(C2:C7,">=10000") 25. =IF(E2-(INT(E2))>=0.5,CEILING(E2,1),FLOOR(E2,1)) 26. =IF((B2/600*100)-(INT((B2/600*100)))>=0.5,CEILING((B2/600*100),1), FLOOR((B2/600*100),1)) 27. =YEAR(NOW())-YEAR(B2) 28. =IF(B2="LDC",C2*0.7,IF(B2="TYPIST",C2*0.42,IF(B2="PEON",C2*0.3,"WRONG ENTRY"))) 29. Calculated the highest. =MAX(D2:D7) 30. Calculated the lowest. =MIN(D2:D7) 31. Calculated the average. =AVERAGE(H2:H8) 32. Calculated the commission to salesman for each item, depending on the sales value of each item. <1000 = 0 1000 to 5000 = 32% Above 5000 = 43% of sales =IF(D2<1000,0,IF(D2<5000,C2*0.32,C2*0.43)) 33. Remarks =IF(D2<1000,"Poor",IF(D2<5000,"Good","Excellent")) 34. To see the formula: Ctrl + ~ 35. Count for grade =Excellent using 'COUNTIF'. =COUNTIF(H2:H7,"EXCELLENT") 36. =COUNTIF(H2:H7,K2) 37. Count the number of items having the rate other than 150. =COUNTIF(D2:D7,"<>150") 38. Sum the commission for grade=EXCELLENT using SUMIF. =SUMIF(H2:H7,"EXCELLENT",G2:G7) NIJEESH RAJ/9447925968 41/50 24/05/2011
LibreOffice 3.3/OpenOffice.org 3.3 39. Sum the sales other than 150 =SUMIF(D2:D7,"<>150",G2:G8) 40. Other examples =SUMIF(D2:D7,"<150",G2:G8) =SUMIF(D2:D7,">150",G2:G8) =COUNTIF(D2:D7,">1000") =COUNTIF(D2:D7,"<1000") 41. =G2*0.4 =G2*40% =G2*40/100 42. =LEFT(A13,7) =LEFT(NIJEESH RAJ,7) 43. =RIGHT(A13,3) =RIGHT(NIJEESH RAJ,3) 44. =UPPER(A14) =UPPER(aadhya) 45. =LOWER(A15) =LOWER(AADHYA) 46. =PROPER(A17) =PROPER(sonu cyriac) 47. =(D2+G2)/2 48. =D2*0.3+G2*0.7 =D2*30%+G2*70%
Calc
NIJEESH RAJ/9447925968
42/50
24/05/2011
Calc
Creating a chart
To demonstrate the process of making charts and graphs in Calc, we will use the small table of data in Figure 4.
Figure 5: Table of data for charting examples To create a chart, first highlight (select) the data to be included in the chart. The selection does not need to be in a single block, as shown in Figure 5; you can also choose individual cells or groups of cells (columns or rows). Next, open the Chart Wizard dialog using one of two methods. Choose Insert > Chart from the menu bar. Or, click the Chart icon on the main toolbar. Either method inserts a sample chart on the worksheet, opens the Formatting toolbar, and opens the Chart Wizard .
Calc
Data labels
Data labels put information about each data point on the chart. They can be very useful for presenting detailed information, but you need to be careful to not create a chart that is too cluttered to read. NIJEESH RAJ/9447925968 44/50 24/05/2011
LibreOffice 3.3/OpenOffice.org 3.3 Choose Insert > Data Labels. The options are as follows.
Calc
Number format...
Opens the Number Format dialog, where you can select the number format. This dialog is very similar to the one for formatting numbers in cells, described in Chapter 2 (Entering, Editing, and Formatting Data).
Percentage format...
Opens the Number Format dialog, where you can select the percentage format.
Show category
Shows the data point text labels.
Separator
Selects the separator between multiple text strings for the same object.
Placement
Selects the placement of data labels relative to the objects.
Printing
Quick printing
Click the Print File Directly icon to send the entire document to the default printer defined for your computer.
Controlling printing
For more control over printing, use File > Print. NIJEESH RAJ/9447925968 45/50 24/05/2011
Calc
Which printer to use (if more than one are installed on your system) and the properties of the printerfor example, page orientation (portrait or landscape), which paper tray to use, and what paper size to print on. The properties available depend on the selected printer; consult the printers documentation for details. What sheets and pages to print, how many copies to print, and in what order to print them. Use dashes to specify page ranges and commas or semicolons to separate ranges; for example: 1, 5, 11 14, 3440. Selection refers to the highlighted part of a page or pages. Whether to print to a printer or to a file.
Page Order
You can set the order in which pages print. This is especially useful in a large document; for example, controlling the print order can save time if you have to collate the document a certain way.
Print
You can specify which details to print. These details include: Row and column headers Sheet gridprints the borders of the cells as a grid Commentsprints the comments defined in your spreadsheet on a separate page, along with the corresponding cell reference
NIJEESH RAJ/9447925968
46/50
24/05/2011
LibreOffice 3.3/OpenOffice.org 3.3 Objects and graphics Charts Drawing objects Formulasprints the formulas contained in the cells, instead of the results Zero Valuesprints cells with a zero value
Calc
Scale
Use the scale features to control the number of pages the data will print on. This can be useful if a large amount of data needs to be printed compactly or, if the reader has poor eyesight, text can be enlarged when it prints. Reduce/Enlarge printoutscales the data in the printout either larger or smaller. For example, if a sheet would normally print out as four pages (two high and two wide), a scaling of 50% would print as one page (both width and height are halved). Fit print range(s) on number of pagesdefines exactly how many pages the printout will take up. This option will only reduce a printout, it will not enlarge it. To enlarge a printout, the reduce/enlarge option must be used. Fit print range(s) to width/heightdefines how high and wide the printout will be, in pages.
Tip
You can check the print range by using File > Page Preview. OOo will only display the cells in the print range.
LibreOffice 3.3/OpenOffice.org 3.3 automatically changes Rows to repeat from - none to - user defined -.
Calc
2) To repeat columns, type the columns in the text entry box under Columns to repeat. For example, to repeat column A, type $A. This automatically changes Columns to repeat from none to - user defined -. 3) Click OK.
Note
You do not need to select the entire range of the rows to be repeated; simply select one cell in each row.
Margin
Changing the size of the left or right margin adjusts how far the header or footer is from that side of the page.
Spacing
Spacing affects how far above or below the sheet the header or footer will print. So, if spacing is set to 1.00", then there will be 1 inch between the header or footer and the sheet.
Height
Height affects how big the header or footer will be.
LibreOffice 3.3/OpenOffice.org 3.3 From this dialog you can set the background and border style of the header or footer.
Calc
Areas
Each area in the header or footer is independent and can have different information in it.
Header
You can select from several preset choices in the Header drop-down list, or specify a custom header using the buttons below the area boxes. (To format a footer, the choices are the same.)
Exporting to PDF
Calc can export documents to PDF (Portable Document Format). This industry-standard file format is ideal for sending the file to someone else to view using Adobe Reader or other PDF viewers.
Range section
All: Exports the entire document. Pages: To export a range of pages, use the format 3-6 (pages 3 to 6). To export single pages, use the format 7;9;11 (pages 7, 9, and 11). You can also export a combination of page ranges and single pages, by using a format like 3-6;8;10;12. Selection: Exports whatever content is selected.
NIJEESH RAJ/9447925968
49/50
24/05/2011
Calc
NIJEESH RAJ/9447925968
50/50
24/05/2011