# Comments in Cells

Each cell in a worksheet can have an associated comment. Comments are not ordinarily visible. Cells having associated comments are marked with a red triangle in the top right corner of the cell. If you move the mouse cursor over the red triangle, the cursor changes to the left-pointing arrow. If the cursor remains over the triangle long enough, a pop-up window appears, displaying the author's name and the text of the comment. The pop-up window is removed when the mouse cursor is moved off the red triangle.

To add a comment to a cell, first select the cell. Next choose Comment... from the to open the New Cell Comment dialog. If the cell already has an associated comment, &gnum; instead opens the Edit Cell Comment dialog, which is shown below. The only difference is that the Edit Cell Comment dialog is initialized with the existing comment and it includes a line identifying the author of the existing comment.

## The Insert Comment dialog.

An image of the Insert Comment dialog.

To change the appearance of the comment text, select the text to be formatted, then click on one of the character attribute selectors above the comment text box. You can select italics, strike-through, character weight, and underlining. The italics and strike-through selectors toggle the character attributes, based on the first character of the selected text. For example, if the first character is italic, clicking on the italics selector removes the italic attribute from all characters of the selected text.

The arrows next to the weight and underlining selectors open menus from which you can select a weight or underline style. Selecting a weight or underline style applies it to the selected text and makes it the meaning of the associated selector. For example, if you select Light from the weight menu, the selected text is made light. If you subsequently click on the weight selector, the text selected at that time is also made light. The weights may not all be visibly different, depending on the font in use.

"Wrap in properties window" controls word wrap in the comment editing box just above it. By default, lines are broken at spaces between words to prevent a line from exceeding the width of the text box. Click on the check-box to toggle word wrap. Line breaks occur in the comment pop-up only where you place them explicitly by pressing Enter. Turning off word wrap lets you see how the comment will be displayed in the pop-up.

# Hyperlinks

Each cell can have an associated hyperlink. A hyperlink permits the user of a spreadsheet to go directly to a particular cell or group of cells, to access another file on the local computer or on the web, or to send an email message to an address built into the link.

To add a hyperlink to one or more cells, first select the cells. Next choose Hyperlink... from the to open the HyperLink dialog.

## The HyperLink dialog.

An image of the HyperLink dialog.

If the selection includes a hyperlink, the dialog is initialized from the existing link. If there is more than one hyperlink in the selection, the cell in the first row that has a hyperlink, and the first such column of that row, is used to initialize the dialog.

When you click on OK, the information in the dialog is attached to each cell in the selection, replacing any previously defined links. For any empty cells in the selection, the text of the link is set as the contents of the cell. For all cells in the selection, the cell format is modified to give the contents a distinctive color, and the text is underlined.

If the link location text box is empty when you click on OK, no hyperlink is created. Instead, if any cells in the selection have existing hyperlinks, those hyperlinks are removed. The distinctive format applied to links is not removed. For that reason it might be preferrable to choose from the to remove existing hyperlinks.

&gnum; supports four types of hyperlink. The first element of the HyperLink dialog, the Type menu, selects the type of hyperlink to be created. The HyperLink dialog varies slightly, depending on the selected hyperlink type:

- Internal Link: The second element of the dialog is a text box labeled "Target Range". You can enter a single range, with or without a worksheet name. To select the range from the worksheet, click on the button at the end of the "Target Range" line. This collapses the dialog to a single line and makes it possible to interact with the cell grid. Select the desired sheet tab, if necessary, then select the desired cells. When the selection is complete, click on the button at the end of the Target Range input box to open the full HyperLink dialog again.

  When an internal link is activated by clicking on the cell, the range of cells given by the link address becomes the current selection. The cell closest to A1 in the new selection becomes the active cell.

- External Link: The second element of the dialog is a text box labeled "File". Enter the path to a file. You can also enter a Universal Resource Locator (URL) here; the URL is accessed as described for Web Link below.

  When an external link is activated by clicking on the cell, &gnum; launches an application to present the file, based on its apparent type. For example, "mypic.jpg" would be opened in an image viewer, while "myinfo.html" would be opened in a web browser.

- Email Link: The dialog provides text boxes where you can enter the destination address and subject line for an e-mail message.

  When an email link is activated by clicking on the cell, &gnum; launches an e-mail client to send a message. The message is initialized with the destination address and subject specified in the dialog.

- Web Link: Enter a Universal Resource Locator (URL) in the Web Address text box.

  When the link is activated by clicking on the cell, &gnum; launches an application to display the information at the specified URL, based on its apparent type. For a web address beginning with "http://" or "https://" the application is the default web browser.

When you move the mouse pointer to a hyperlink in the cell grid, a tool tip appears. The default tip shows the link address and instructions for activating the link or selecting the cell. To define a tip specific to the link, select the radio button next to "Tip", then enter the tip text in the text box. If the link-specific tip is selected and left blank, no tip is displayed when the mouse pointer is on the link.

# Defining Names

Names are labels with a meaning defined in the spreadsheet or by &gnum;. Names can be defined for a whole workbook or for just a single worksheet. A name can refer to a numeric value, a string, a range of cells, or a formula. A name can be used wherever its meaning could otherwise be used.

A name is a sequence of letters, digits, and underscore characters, beginning with a letter or underscore. A name cannot look like a cell identifier. For example, "D7" is not a permitted name, while "D_7" and "_D7" are permitted.

To define a name or modify the definition of an existing name:

- If you wish to define or modify a name for use within a single worksheet and it is not the current worksheet, click on the appropriate worksheet tab at the bottom of the &gnum; window.

- Open the Define Names dialog by choosing Modify ▶ Names from the .

- Use the dialog to modify the defined names as desired. When your changes are complete, click on Close to close the dialog.

## The Define Names dialog

An image of the Define Names dialog.

The Define Names dialog lists the names defined in the workbook, organized into two or more groups corresponding to the workbook, the active sheet, and the inactive sheets, if any. When the dialog is opened, only the names defined for the workbook and the active sheet are visible; the definitions for any inactive sheets are collapsed into a single line for each, identified by the sheet name. The definitions for the workbook or a sheet can be exposed or hidden by clicking on the arrow at the left end of the workbook or sheet line.

The second column of the Define Names dialog can show one of three icons. To define a new name, click on the plus sign in the row for the workbook or the active worksheet. Names defined under a worksheet name are visible only on that worksheet. Names defined for the workbook are visible to any worksheet that does not have its own definition of the name. Names are created as "<new-name>", which must be changed before the definition can be used. Click on the new line to select it, then click on the name field and type the new name, followed by the Enter key. When you press Enter, the name is fixed. Only its value can then be changed.

If the second column shows a minus sign, the line is for a user-defined name. Click on the minus sign to delete the definition of the name. If the second column shows a padlock icon, the definition is created automatically and cannot be modified from this dialog.

For user-defined names, the third column of the Define Names dialog contains a downward- or upward-pointing arrow. Click on the arrow to move the definition down to the worksheet or up to the workbook. This operation is not permitted if the moved definition would replace a name already defined for the destination. To do such a replacement, first delete the name in the destination, then move the definition.

The last column of the dialog shows the value defined for the name. When a new name is created, this field is initialized with an absolute reference to the currently selected cells. To modify a definition, click on the value field and edit it as desired, then press the Enter key. To define a string value, enclose it in quotation marks, for example, 'string one' or "string two". To specify a range of cells, use absolute references. Relative references change in meaning depending on the cell where they are used, which is unlikely to produce your intended result. You can define a name as a cell or range of cells by clearing its existing definition, if any, and then selecting the desired cell or cells on the cell grid. You can switch worksheets prior to selecting cells. The dialog continues to modify names defined for the workbook or the worksheet that was displayed when the dialog was opened. A reference created by selection in the Define Names dialog includes the worksheet name and uses absolute cell coordinates. That is, a selection would look like "Sheet1!$A$1:$B$24".

Below the display of defined names is a filter box. If the workbook or sheet contains many defined names, you can see a subset of the names by typing a partial name in the filter box and pressing Enter. All names that do not contain the entered string are omitted from the display. Differences of case are ignored. For example, if “real” were entered in the filter box, names such as "Real_Value" and "Surreal" would be displayed. When you press Enter in the filter box, contexts that contain no matching names are automatically collapsed. You may later need to manually expand the workbook line, for example, if the filter string is changed. If the line for the workbook or a worksheet begins with a right-pointing arrow, it contains names that pass the filter. Clicking on the arrow will change it to a downward-pointing arrow and make the names visible. To see all the defined names, clear the filter by clicking on the button at the right end of the filter box.

In addition to the names defined by the user, &gnum; has some pre-defined names for useful elements:

- Sheet_Title: The name of the current sheet.

- Print_Area: The range of cells set as the sheet's print area; undefined if print area is not set.