ExcelFlux

LEN function

the number of characters in a text string.

Text

Where can you use it?

Data preparation and reporting teams. Use this group to clean, split or reformat IDs, names and descriptions before using them in reports.

Scenario in the workbook

Check imported code lengths. A space or hyphen also counts as a character.

A worked example from the workbook

RowA
6Invoice code
7INV-042
8inv-125
9AB-0007
Trial 1
=LEN(A7)

Expected result7

See the inputs and instructions for all 3 examples

Syntax

LEN(text)

Copyable formulas

English Excel · en-US
=LEN("INV-042")
Turkish Excel · tr-TR
=UZUNLUK("INV-042")

Expected result

7

Worked examples

Check imported code lengths. A space or hyphen also counts as a character.

Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.

Row A
6 Invoice code
7 INV-042
8 inv-125
9 AB-0007
Case Formula Expected result
Trial 1 =LEN(A7) 7
Trial 2 =LEN(A9) 7
Trial 3 =LEN(A7&" ") 8
Microsoft Excel reference