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

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
Joined
Oct 12, 2006
Messages
44,061
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

dcardno

Well-known Member
Joined
Nov 20, 2002
Messages
558
Office Version
  1. 2013
Platform
  1. Windows
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

Gerald Higgins

Well-known Member
Joined
Mar 26, 2007
Messages
9,258
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

Adgurl

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