# Creating a Custom Name

Learn how you can define a custom name and then use the name in formulas using Spread for ASP.NET.

## Content

Custom, user-defined names are identifiers to represent information in the spreadsheet, used mostly in formulas. A custom name can refer to a cell, a range of cells, a computed value, or a formula. You can define a custom name and then use the name in formulas. When the formula is evaluated, the custom name's value is referenced and evaluated.
For more information about formulas, refer to the [Formula Reference](https://developer.mescius.com/spreadnet/docs/latest/online-formula/overview.html).

## Using Code

Define the custom name using the [AddCustomName](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Model.DefaultSheetDataModel.AddCustomName.html) method.
**Example**
To add a custom name, use the [AddCustomName](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Model.DefaultSheetDataModel.AddCustomName.html) method as shown in this code:

```csharp
FarPoint.Web.Spread.Model.DefaultSheetDataModel d = new FarPoint.Web.Spread.Model.DefaultSheetDataModel();
d.AddCustomName("test", "$B$1", 0, 0);
```

```vbnet
Dim d FarPoint.Web.Spread.Model.DefaultSheetDataModel = New FarPoint.Web.Spread.Model.DefaultSheetDataModel()
d.AddCustomName("test", "$B$1", 0, 0)
```

**Example**
To add a custom name for a value, use the [AddCustomName](/spreadnet/api/latest/online-asp/FarPoint.Web.Spread/FarPoint.Web.Spread.Model.DefaultSheetDataModel.AddCustomName.html) method as shown in this code:

```csharp
FarPoint.Web.Spread.Model.DefaultSheetDataModel d;
d = (FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.Sheets[0].DataModel;
d.AddCustomName("alpha", "101", 0, 0);
```

```vbnet
Dim d As New FarPoint.Web.Spread.Model.DefaultSheetDataModel
d = (FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.Sheets(0).DataModel
d.AddCustomName("alpha", "101", 0, 0)
```