Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Calculate text strings

I am trying to calculate a series of text occurences within a spread
sheet. I cannot seem to figure out a formula to calculate this. I
found this:

=SUM(LEN(A8:A13)-LEN(SUBSTITUTE(A8:A13,"apple","")))/LEN("apple")

But this only works for mac. I would like the same result, but on a
PC.

I throw myself to the mercy of Google Groups!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Calculate text strings


It is an array formula.
Select the cell with the formula, click in the formula bar then press Ctrl + Shift + Enter
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"ibo4lyf"
wrote in message
I am trying to calculate a series of text occurences within a spread
sheet. I cannot seem to figure out a formula to calculate this. I
found this:

=SUM(LEN(A8:A13)-LEN(SUBSTITUTE(A8:A13,"apple","")))/LEN("apple")

But this only works for mac. I would like the same result, but on a
PC.
I throw myself to the mercy of Google Groups!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Calculate text strings

This formula will work on the PC, too.

Remember...

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

And you could use:

=SUMproduct(LEN(A8:A13)-LEN(SUBSTITUTE(A8:A13,"apple","")))/LEN("apple")
(and not have to enter it as an array formula)

Remember that =substitute() is case sensitive. APPLE, Apple, ApPlE won't be
found.

=SUMproduct(LEN(A8:A13)-LEN(SUBSTITUTE(lower(A8:A13),"apple","")))/LEN("apple")

If you don't care about case.

ibo4lyf wrote:

I am trying to calculate a series of text occurences within a spread
sheet. I cannot seem to figure out a formula to calculate this. I
found this:

=SUM(LEN(A8:A13)-LEN(SUBSTITUTE(A8:A13,"apple","")))/LEN("apple")

But this only works for mac. I would like the same result, but on a
PC.

I throw myself to the mercy of Google Groups!


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Calculate text strings

Thank you very much Jim and Dave. Lifesavers!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find and replace numeric strings in larger text strings Mr Molio Excel Worksheet Functions 8 November 9th 11 05:17 PM
Looking for Text strings Scats Excel Worksheet Functions 3 March 24th 10 11:38 PM
VLookup and text strings bmac Excel Discussion (Misc queries) 3 February 18th 10 10:25 PM
Counting Text Strings Kholm Excel Worksheet Functions 11 August 21st 07 05:56 PM
Text Strings Conversion billyccarver Excel Worksheet Functions 2 October 21st 05 05:47 PM


All times are GMT +1. The time now is 08:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"