﻿ MinimumValue Property (NumberCellType)
Spread Windows Forms 12.0 Product Documentation
MinimumValue Property (NumberCellType)
Example

Gets or sets the minimum value allowed for user entry.
Syntax
```'Declaration

Public Property MinimumValue As Double```
```'Usage

Dim instance As NumberCellType
Dim value As Double

instance.MinimumValue = value

value = instance.MinimumValue```
`public double MinimumValue {get; set;}`

#### Property Value

Double-precision, floating-point number representing the minimum value allowed in the cell
Exceptions
ExceptionDescription
Specified value is beyond accepted limits
Remarks

The MinimumValue and MaximumValue properties limit the value that the user enters when editing the cell. It does not affect the data model and does not the limit the cell getting a value by other means, for example by means of a formula.

Use the MinimumValue and MaximumValue properties to place range restrictions on user entry. For example the following code limits user input to values between 0 and 100.

```   NumberCellType nct = new NumberCellType();  nct.MinimumValue = 0.0;     nct.MaximumValue = 100.0;   spread.Sheets.Cells[0,0].CellType = nct;
```

Use the MIN and MAX functions to place range restrictions on formula calculations. For example, the following code limits the summation calculation to values between 0 and 100.

```   spread.Sheets.Cells[4,0].Formula = "MAX(0, MIN(SUM(A1:A4), 100))";
```
Example
This example sets several properties of a numeric format cell.
```FarPoint.Win.Spread.CellType.NumberCellType num = new FarPoint.Win.Spread.CellType.NumberCellType();
num.DecimalPlaces = 3;
num.DecimalSeparator = ",";
num.FixedPoint = true;
num.MaximumValue = 50000.0;
num.MinimumValue = -1000.0;
num.NegativeRed = true;
num.Separator = "/";
num.ShowSeparator = true;
num.SpinButton = true;
num.SpinDecimalIncrement = 10;
num.SpinIntegerIncrement = 5;
num.SpinWrap = true;
```Dim num As New FarPoint.Win.Spread.CellType.NumberCellType()
num.DecimalPlaces = 3
num.DecimalSeparator = ","
num.FixedPoint = True
num.MaximumValue = 50000.0
num.MinimumValue = -1000.0