# Counting CHARACTERS in a Cell

##### New Member
I know how to use the LEN formula to count WORDS in a cell...but is there a way to manipulate the formula to count CHARACTERS in a cell?

Here's the formula I'm using now:

=IF(LEN(TRIM(F1))=0,0,LEN(TRIM(F1))-LEN(SUBSTITUTE(F1," ",""))+1)

F1 is the cell that contains the text I'm working with.

### Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

#### Jonmo1

##### MrExcel MVP
Actually, LEN DOES count the characters in a cell, not words.

You're wanting to count how many spaces there are in a cell?

=LEN(A1)-LEN(SUBSTITUTE(A1," ",""))

#### dcardno

##### Well-known Member
LEN counts characters directly: try
LEN(F1)
All the other work is to count the number of spaces (plus one) to determine the number of words...

#### Gerald Higgins

##### Well-known Member
Err. . . . LEN does count characters.

For example,
Code:
``=LEN(F1)``

If you want to count characters excluding spaces, try
Code:
``=LEN(SUBSTITUTE(f1," ",""))``

##### New Member
Thank you guys. When I did a search in Excel help for counting Characters, all I got was this long formula for counting WORDS.

Using just the =LEN(f1) got me exactly what I wanted...counting characters INCLUDING the spaces.

Thank you for not making me feel too DUMB...but I knew you guys could help me.

Replies
5
Views
202
Replies
7
Views
316
Replies
4
Views
163
Replies
1
Views
227
Replies
14
Views
412

1,190,913
Messages
5,983,539
Members
439,848
Latest member
timmyo

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back