Chapter 4: Spreadsheets in Calc
4. On the Criteria tab page, enter the conditions for new values entered into cells. Values
already entered will not be affected.
5. In the field Allow, All Values is selected by default. This means that there are no
restrictions. As needed, choose one of the other options: Whole Number, Decimal,
Date, Time, and Text Length.
6. This choice sets the first condition. By choosing, for example, Whole Numbers,
values such as 12.5 are not allowed, even if they satisfy the other conditions.
Choosing Date allows date information both in the form1/1/97 as well as in the form
of a serial date. Similarly, the Time condition permits time values as 12:00 or serial
time numbers. Text Length stipulates that cells are allowed to contain text only.
7. After setting the first condition under Allow, select the next condition under Data.
According to what is chosen, additional text fields (Source, Minimum and Entries)
may appear to further specify the condition.
8. A few possible conditions resulting from this register could be as follows:
Integer greater than 1, Decimal between 10 and 12.5, Date earlier than or equal to
1/1/2000 ,Time not equal to 00:00, Textwith a length of more than 2 characters.
After the conditions for cell validity have been determined, if any values are
subsequently entered which do not meet the conditions, Calc displays a warning message.
Fill out the other two tabs in the dialog to specify more detailed messagesto aid a user
working with a spreadsheet.
On the Input Help tab page, enter the title and the text of the tip, which will then be
displayed if the cell is selected.
On the Error Alert tab page, select the action to be carried out in the event of an
If Stop is selected as the action, invalid inputs are not accepted, and the previous cell
contents will be retained.
Select Warning or Information to display a dialog in which the entry can either be
cancelled (the cell value will be retained) or accepted (even if the new value violates
the validity rule).
If Macro is selected, then specify the macro to be carried out in the event of an error
via the Browse button.
Function Example Validity(CellValue as String, TableCell as String)
Dim msg as string
msg =Invalid value: &'” & CellValue&'"
msg = msg & in table: &'” & TableCell &'"
MsgBox msg ,16,"Error message"
Note: After changing the action for a cell on the Error Alert tab page and closing the dialog with OK,
another cell must be selected before the change takes effect.
NeoOffice User Guide for 2.x