# MIDB Function

> Extract characters from the middle of a text with MIDB in TX Sheet Control, which counts every character as one byte and so returns the same as MID.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > MIDB Function
- **220 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/midb/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/midb/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/midb/llms-full.txt

---

Extract characters from the middle of a text, counted in bytes. `text` is the text, `argument1` the start position and `argument2` the number of bytes to extract. TX Sheet Control counts every character as one byte, also Chinese, Japanese and Korean characters, so MIDB returns the same result as [MID](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/mid/llms-full.txt). A start position less than 1 returns `#VALUE!`.

### Syntax

```text
MIDB(text, argument1, argument2)
```

Category: Text. Minimum arguments: 3. Maximum arguments: 3.

Available for supported offline calculation.

### Examples

```text
=MIDB("abc",2,1)
```

The formula returns `b`.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [MID Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/mid/llms-full.txt)
- **Next:** [MIN Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/min/llms-full.txt)
