# COMPLEX Function

> Create a complex number as x+yi text from real and imaginary coefficients with COMPLEX in TX Sheet Control: the i or j suffix and the #VALUE! error.

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

---

Convert a real and an imaginary coefficient into a complex number. `real_num` is the real coefficient, `i_num` the imaginary coefficient and `suffix` the imaginary unit, "i" (the default) or "j"; any other suffix, including an uppercase "I", returns `#VALUE!`, and so does a coefficient that is not a number. The result is text of the form x+yi, which the IM functions such as [IMSUM](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/imsum/llms-full.txt) and [IMABS](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/imabs/llms-full.txt) accept. A coefficient of 0 is left out, so `COMPLEX(2,0)` returns "2".

### Syntax

```text
COMPLEX(real_num, i_num, suffix)
```

Category: Engineering. Minimum arguments: 2. Maximum arguments: 3.

Available for supported offline calculation.

### Examples

```text
=COMPLEX(2,3)
```

The formula returns "2+3i".

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:** [COMBINA Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/combina/llms-full.txt)
- **Next:** [CONCAT Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/concat/llms-full.txt)
