BEGIN Options Automatic When active, this option causes the worksheet to be calculated whenever a cell value changes or may have changed. This includes entering new data, moving and copying ranges, filling a range, etc. Sorting does not force a calculation; instead the "Calc" indicator appears at the lower right corner of the screen. This indicator also appears when the auto- matic option is off, and the worksheet has changed. Press F9 if you wish to recalculate after a sort. Options Natural Order Natural order means to recalculate the less dependent cells before the more dependent ones. That is, if a cell references and thus depends on the value of another cell, it is usually best to compute the value of the referenced cell before using its value in a formula. Natural order calculation works this way, allowing you you to construct your worksheet without worrying about how the position of cells affects the order of calculation. Calculation proceeds row-by-row when natural order has been turned off. Circular References One complication of natural order is the circular cell reference, which occurs when one cell refers to another cell that in turn refers back to the first. This can occur directly or indirectly (through a chain of cells), and it makes reconciliation of the worksheet impossible, since the values of the cells involved are constantly changing. When PC encounters a circular reference, it uses the current value of the cell, so that cells are calculated only once. Generally, circular references are errors in worksheet construction, unless intentional. Circular References (Continued) For example, some models require multiple calculations of the worksheet in order for the cell values to converge; other models fail to converge no matter how many times the worksheet is calculated. Whenever a circular reference exists, PC will display the "Circ" indicator in the lower right corner of the screen. The address of a cell involved in the circular reference is found in the Statistics dialog box. The "Circ" indicator will not appear unless Natural Order is in effect, because circularity isn't an issue in a fixed order calculation mode. END BEGIN Edit Cut Edit Cut allows you to move a range. First, select the range and press Ctrl-X or use the Cut menu item. Next, position the cell pointer in the cell to be the upper left corner of the destination range. Then press Enter or Edit Paste to complete the cut and paste operation. Edit Copy Edit Copy operates similarly to Edit Cut. Edit Copy allows you to make multiple copies of the source range. You may also copy to a range larger than the source range; however, the size of the destination range must be an integral multiple of the size of the source range. You can easily tell the sizes of the two ranges by observing the range indicators in the active cell display area. Edit Paste Edit Paste completes a Cut or Copy command. Pressing Enter has the same effect. Edit Clear Edit Clear deletes the current range. Edit Insert Edit Insert allows you to insert rows and columns into the worksheet. With row insertion, for example, if the range contains multiple rows, then Edit Insert inserts as many rows as are selected, shifting the involved cells downwards. The insertion is confined to the columns in the highlighted range, allowing insertion of rows in selected columns only. To insert whole rows, extend the range with Shift-Space. Insertion of columns is similar; use Ctrl-Space when inserting whole columns. Edit Delete Edit Delete removes the highlighted rows and columns, shifting the remaining cells to fill the deleted area. Like Edit Insert, this function operates on partial or whole rows and columns. END BEGIN File New Erases the current worksheet and restores worksheet defaults. File Open Loads a worksheet (.PCW) file from disk, erasing the current worksheet. File Save Saves the current worksheet to a disk file. If the worksheet has not been previously saved, Save functions like Save As. Otherwise, PC saves the file under its current name, but allows overwriting the existing file or renaming the existing file with the extension .BAK. File Save As Unlike Save, Save As always invokes the file selector, so that you may save a file under a new name. File Merge Merge allows you to retrieve a range of cells stored on disk. PC will load the range at the cell pointer position, erasing any existing cells within the range area. Cell references within formulas are adjusted as if the range had been cut and pasted. File Save Range Saves a range to disk. Unlike Save and Save As, Save Range only stores the cell information, omitting print settings, calculation mode, etc. File Import/Export This command loads and save worksheet files in Lotus 123 format. PC supports both 123 Release 1 (WKS) and 2 (WK1) files. PC's cell grid is smaller than 123's, so cells from a 123 worksheet outside the PC grid will not be retrieved. File Print Prints the worksheet. Described in more detail under the Help Print topic. File Save as Text Prints the worksheet to an ASCII file using the formatting options of the Print dialog box. File DOS Shell Allows use of DOS commands; return to PC by entering EXIT at the DOS command line. END BEGIN Moving around the Worksheet Cursor keys Move one cell in indicated direction PageUp/PageDown Move one screen up or down Ctrl-PageUp/PageDown Move one screen right or left Tab/Shift-Tab Move one screen right or left Home Move to column A of current row End Move to last filled cell, current row Ctrl-Home Move to top left of active area Ctrl-End Move to bottom right of active area Range/Goto Jump to cell/named range in worksheet Data Entry The PC formula bar operates in two modes: Enter and Edit. Enter mode is convenient for fast data entry, while Edit mode provides enhanced capability for changing text. In Enter mode, the cursor keys, PageUp/PageDown, and Tab/ Shift-Tab all serve to lock in the entry and move the cell pointer. In Edit mode, however, these keys move the cursor in the formula bar. You may alternate between these modes by pressing the F2 key. The editing keys are: Editing Key Action ----------- ------ Enter Lock in entry Cursor keys Lock in entry and Move cursor in PageUp/PageDown move cell pointer formula bar in Tab/Shift Tab in Enter mode Edit mode Backspace Backspace Delete Delete character/block Shift-Cursor Select block Home Move cursor to column 1 in formula bar End Move cursor to last occupied column in current line Ctrl-Home Move cursor to first character Ctrl-End Move cursor to last character Esc Clear formula bar/cancel entry Ctrl-Z Cancel entry Range Selection Select cell ranges by pressing Shift plus one of the cursor keys or PageUp/PageDown or other key combinations discussed below. You may then release the Shift key and extend the range area with the cursor keys, PageUp/PageDown, Tab/Shift-Tab, Home/End, Shift-Space, Ctrl-Space or Ctrl-Shift-Space. These keys work as they do for moving around the worksheet. Shift-Space, when used to begin a selection, selects the entire row containing the cell pointer. Similarly, Ctrl-Space selects the entire column containing the cell pointer. When used to extend a range, Shift-Space selects all rows involved in the range, and Ctrl-Space selects all columns. Finally, Shift-Ctrl-Space selects the entire worksheet. You use this latter function to make global changes to the worksheet cell format. To complete the range selection, you may press Enter; however, the following keys both complete the selection and invoke a function (the menu bar is inactive while selecting ranges): Ctrl-C begins the Copy function Ctrl-X begins the Cut function Ctrl-V/Enter pastes the cut/copied area Ctrl-I begins the Insert function Ctrl-D begins the Delete function Ctrl-B begins the Clear function END BEGIN The Print dialog box allows you to specify two title lines, header and footer lines, toggle draft vs. final quality, condensed vs. normal pitch, display of formulas, and display of row/column titles. If Print is selected and a range is not, the default print range will be the active worksheet area. If you have a printer other than an Epson-compatible or DeskJet, you will need to use the Options/Printer dialog box to create a new PRINTER.INF file, so that PC will know the proper printer control codes. Header and Footer control codes &l left justify what follows &c center justify what follows &r right justify what follows &d display time &f display filename &p display page number &t display time && display & All other characters are taken literally, so you could have a header line such as "&l&d, p. &p&c&f&r&t". This would expand to something like: 9/15/89, p. 2 D:\FILENAME.PCW 15:16 END BEGIN Ranges are rectangular groups of cells defining an area within which some action is to have effect. Selecting a range is described under the Keyboard Help topic. If no range is selected, then the active cell is the range. Data Fill Fills a range with numbers, starting with an initial value to which the increment is added for each subsequent cell. You may fill a range with serial date values equally-spaced by day, month, week, or year. Sort You may sort a range by rows or columns, where cells within one row or column (the key) are used for comparison. Cell references within formulas are not adjusted. Named Ranges and Cells PC supports up to 100 named range and cell references, which are created through the Define Name dialog box. If a range is selected prior to invoking this function, the range will appear in the "Refers to" line in the dialog box. Otherwise, the active cell address appears. You may specify the references as absolute or relative, and named references within formulas behave exactly like explicit cell references. Many PC dialog boxes require a range or cell to be entered into a text field. You may enter a name into these fields, or the explicit cell notation. Create Name List This functions creates a two-column list, beginning at the active cell, of all defined names and their references. Goto This dialog box allows you to jump to any cell or range in the worksheet; if the destination is a range, it is selected in the process. END BEGIN END BEGIN Date is represented by integer serial values where the base date is Dec. 30, 1899 (which equals 0). Time is represented as a fraction of a 24 hour period, such that 12 Midnight = 0 and 12 Noon equals 0.5. Date and time may be represented in a single real number, where the integer portion equals the date and the fractional part the time of day. DATE(year,month,day): Returns a serial number representing the indicated date. Year should be year after 1900 (1989 would be entered as 89, 1900 as 0). YEAR(expr): Returns the year of the serial date value. MONTH(expr): Returns the month of the serial date value. DAY(expr): Returns the day of the month of the serial date. WEEKDAY(expr): Returns the day of the week of the serial date value. The range is 1-7, where Sunday = 1. DAYSMONTH(month,year): Returns the number of days in the calendar month. Year is years A.D. ISLEAP(year): Returns TRUE (1) if the year is a leap year and FALSE (0) if it isn't. Year is years A.D. TIME(hour,minute,second): Returns a fraction representing indicated time. TIME follows the military convention, where hours range from 0-23. HOUR(expr): Returns the hour, which falls in the range 0-23. MINUTE(expr): Returns the minute (0-59). SECOND(expr): Returns the seconds (0-59). NOW(): Returns a value representing the current date and time, as given by the PC's clock. END BEGIN PC uses the convention in which cash inflows are represented by positive numbers, while cash outflows are represented by negative numbers. Type = 1 means ordinary annuity. Type = 0 means annuity due. Number of periods (NPER) is synonymous with "term." All arguments are required. PV(rate,nper,pmt,fv,type) computes present value. FV(rate,nper,pmt,pv,type) computes future value. PMT(rate,nper,pv,fv,type) computes payment. NPER(rate,pmt,pv,fv,type) compute number of periods. RATE(nper,pmt,pv,fv,type,guess) computes interest rate. END BEGIN General: ABS(expr) returns absolute value DIV(expr1,expr2) returns expr1 DIV expr2 MOD(expr1,expr2) returns expr1 MOD expr2 ROUND(expr,place) rounds expr at place digit TRUNC(expr,place) truncates expr at place digit INT(expr) returns integer portion FRAC(expr) returns fractional portion ROW(cell) returns row number COLUMN(cell) returns column number ROWS(range) returns number of rows COLUMNS(range) returns number of columns ERROR() returns ERR NA() returns NA DIV and MOD satisfy x = DIV(x,y)*y+MOD(x,y), for both integer and real-valued arguments. INT and FRAC satisfy x = INT(x)+FRAC(x); negative values are handled as in: INT(-3.4) = -3, FRAC(-3.4) = -0.4. The place argument for ROUND and TRUNC should evaluate to a positive or negative integer. When place is positive, the functions operate to the right of the decimal point, and when negative, to the left. When rounding or truncating a number displayed in scientific notation, remember that ROUND and TRUNC operate on the number x 10^0 (this may influence the choice of the place argument). END BEGIN The logical functions use 0 to indicate a FALSE condition, while non-zero values indicate TRUE. Functions return 1 to indicate TRUE and 0 for FALSE. Operators: =, <>, <, >, <=, >= IF(expr1,expr2,expr3): These expressions may be anything, including nested IFs. If expr1 evaluates to non-zero, then IF returns the result of expr2, but if expr1 generates 0, IF returns the result of expr3. AND(expr list): Returns TRUE if all expressions evaluate to non-zero, and FALSE if any evaluate to 0. OR(expr list): Returns TRUE if any of the expressions evaluate to non-zero, and FALSE only if all evaluate to zero. AND and OR require at least two arguments, and the upper limit is 20. NOT(expr): Returns TRUE if expr evaluates to zero, and FALSE only if expr generates a non-zero value. ISEMPTY(cell/range list): Returns TRUE if any cells con- tained within the list are empty, and FALSE only if all possess a value. ISERR(expr/range list): Returns TRUE if any expressions or cells within ranges evaluate to an error condition, excluding the NA error status. ISNA(expr/range list): Similar to ISERR, but this function checks specifically for the NA error status. TRUE(): Returns 1. FALSE(): Returns 0. END BEGIN The index or offset arguments for all of the lookup functions start at 1 (Lotus 123 functions start at 0). CHOOSE(index,expr1,expr2 ... expr): Selects an item from the list of expressions at position given by index. INDEX(row offset,column offset,range): Returns the value of the cell located by the row and column offsets within the indicated range. MATCH(compare value,range,type): Returns the position within the range of a cell matching the compare value. Type = 1: Greatest number <= compare value Type = 0: Exact match Type = -1: Smallest number >= compare value LOOKUP(compare value,lookup range,results range): Searches the lookup range for the greatest value <= the compare value and returns the value of the cell at the same relative position within the results range. HLOOKUP(compare value,row index,range): Horizontal lookup. VLOOKUP(compare value,column index,range): Vertical lookup. Both HLOOKUP and VLOOKUP search for the greatest value <= the compare value and use index as an offset into the range. For example, if cell A2 contains 2, VLOOKUP(1.5,2,A1:B3) could match this cell, and it would return the value of cell B2, since the column index was 2. END BEGIN Simple Statistics: All of the following functions accept a list of expressions or ranges as arguments, and except where noted, empty cells and labels are ignored in the calculation. SUM PROD.......empty cells = 1, unless all are empty MEAN MEDIAN VAR........VAR and SDEV are sample statistics SDEV VARP.......VARP and SDEVP are population statistics SDEVP SERR.......standard error MAX MIN COUNT......counts number of values RAND(lower bound,upper bound) returns a random number falling between the two bounds. END BEGIN Power: LOG(expr)..........log base 10 LN(expr)...........log base e EXP(expr)..........exponential function e^expr POW(expr1,expr2)...expr1 raised to expr2 power SQR(expr)..........square SQRT(expr).........square root Trigonometric: SIN(expr)..........PC uses radians for all angles COS(expr) TAN(expr) ASIN(expr) ACOS(expr) ATAN(expr) ATAN2(x,y).........4 quadrant arctangent RAD(expr)..........converts degrees to radians DEG(expr)..........converts radians to degrees PI() END