XL.Sheet.CellWriteFormulaNumber
-------------------------------

Writes a formula and value in a cell.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XL](component_XL.md) | [6.5](newinversion65.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XL.Sheet.CellWriteFormulaNumber"; BookRef; SheetIndex; Row; Column; Formula; Value { ; Format } ) 

**MBS**( **"XL.Sheet.CellWriteFormulaNumber";** /\* Writes a formula and value in a cell. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$SheetIndex**; /\* The index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1.e.g. 0 \*/   
**$Row**; /\* The row for the cell. First row has index 0. \*/   
**$Column**; /\* The column for the cell. First column has index 0. \*/   
**$Formula**; /\* The new formula to write.e.g. "1+2" \*/   
**$Value**; /\* The number value to put in cell.e.g. 3 \*/   
**$Format**) /\* Optional; The format for the cell. This is index from 0 to XL.GetFormatCount-1 in the book's list of formats.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| BookRef | The reference number for the workbook. | $ref |  |
| SheetIndex | The index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1. | 0 |  |
| Row | The row for the cell. First row has index 0. | $row |  |
| Column | The column for the cell. First column has index 0. | $column |  |
| Formula | The new formula to write. | "1+2" |  |
| Value | The number value to put in cell. | 3 |  |
| Format | The format for the cell. This is index from 0 to XL.GetFormatCount-1 in the book's list of formats. | 0 | Optional |

### Result

Returns OK or error.

### Description

Writes a formula and value in a cell.  
The value should be the current result, so there is something to display without calculating.  
### See also

- [XL.Book.SheetCount](XLBookSheetCount.md)
- [XL.Sheet.CellWriteFormula](XLSheetCellWriteFormula.md)
- [XL.Sheet.CellWriteFormulaBoolean](XLSheetCellWriteFormulaBoolean.md)
- [XL.Sheet.CellWriteFormulas](XLSheetCellWriteFormulas.md)
- [XL.Sheet.CellWriteFormulaText](XLSheetCellWriteFormulaText.md)
- [XL.Sheet.CellWriteNumber](XLSheetCellWriteNumber.md)
- [XL.Sheet.CellWriteTextAsNumber](XLSheetCellWriteTextAsNumber.md)

### Blog Entries

- [MBS FileMaker Plugin, version 6.5pr2](https://www.mbsplugins.de/archive/2016-10-10/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 7th October 2016 , last changed 22nd April 2017

  
[XL.Sheet.CellWriteFormulaBoolean](XLSheetCellWriteFormulaBoolean.md) - [XL.Sheet.CellWriteFormulaText](XLSheetCellWriteFormulaText.md)

[HTML Version](XLSheetCellWriteFormulaNumber.shtml)