Counting CHARACTERS in a Cell

Adgurl

New Member
Joined
Jun 4, 2007
Messages
16
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.

Thanks in advance for your help!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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," ",""))
 
Upvote 0
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...
 
Upvote 0
Err. . . . LEN does count characters.

For example,
Code:
=LEN(F1)

If you want to count characters excluding spaces, try
Code:
=LEN(SUBSTITUTE(f1," ",""))
 
Upvote 0
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.

:biggrin:
 
Upvote 0

Forum statistics

Threads
1,214,935
Messages
6,122,337
Members
449,078
Latest member
skydd

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top