LENB function
the number of characters in a text string.
Text · Guided Excel example
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
Compare legacy byte counts for ASCII identifiers, where each character occupies one byte.
A worked example from the workbook
| Row | A |
|---|---|
| 6 | Code |
| 7 | ABC |
| 8 | AB-42 |
| 9 | SKU |
Record 1
=LENB(A7)Illustrative output3
See the inputs and instructions for all 3 examplesWorked examples
Compare legacy byte counts for ASCII identifiers, where each character occupies one byte.
Column F provides expressions as text. Satisfy the stated requirements, then paste into an empty Excel cell and compare with column G. The result was not verified in desktop Excel here.
| Row | A |
|---|---|
| 6 | Code |
| 7 | ABC |
| 8 | AB-42 |
| 9 | SKU |
| Trial | Expression | Sample output |
|---|---|---|
| Record 1 | =LENB(A7) |
3 |
| Record 2 | =LENB(A8) |
5 |
| Record 3 | =LENB(A9) |
3 |