count terms in a cell

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
Hi Zvika_1:

Do you mean how many items are in a range of cells? If you do mean within a cell, then do you mean how many characters are within a particular cell?

Please clarify.

Regards!

Yogi
 

zvika_1

New Member
Joined
Oct 9, 2002
Messages
12
Thanks Yogi
I mean how many words in 1 cell.
example: Cell A1 contain the words: Mr Excel Message Board (4 words).
 

Yogi Anand

MrExcel MVP
Joined
Mar 12, 2002
Messages
11,454
Hi Zvika_1:

Use ...

=Len(A1)-Len(Substitute(A1," ",""))+1

if A1 houses Mr Excel Message Board, the result will be 4.

Regards!

Yogi
 

Derek

Well-known Member
Joined
Feb 16, 2002
Messages
1,592

ADVERTISEMENT

Hi there

Just a thought, if you have extraneous spaces you might like to add Trim to Yogi's formula

=LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+1

regards
Derek
 

zvika_1

New Member
Joined
Oct 9, 2002
Messages
12

ADVERTISEMENT

Hi Yogi & Derek
Is it possible now to point to any ward in a cell and switch between words ?
Example: A1 houses "Mr Excel Message Board"
New order: "Mr Excel Board Message"
Regards
Zvika
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,008
Messages
5,834,848
Members
430,324
Latest member
bosphoruskid

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