PC Review


Reply
Thread Tools Rate Thread

Calculate text strings

 
 
ibo4lyf
Guest
Posts: n/a
 
      5th Feb 2008
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!
 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      5th Feb 2008

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!
 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      5th Feb 2008
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
 
Reply With Quote
 
ibo4lyf
Guest
Posts: n/a
 
      11th Feb 2008
Thank you very much Jim and Dave. Lifesavers!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for Text strings Scats Microsoft Excel Worksheet Functions 3 24th Mar 2010 11:38 PM
Inserting predefined text strings in a text box =?Utf-8?B?Q2FwdCBKaW0gQ29vaw==?= Microsoft Access Form Coding 2 4th Nov 2005 11:25 PM
Make Word displays strings of text, not strings of code =?Utf-8?B?WGVybw==?= Microsoft Word Document Management 2 9th Dec 2004 10:35 AM
Text Strings =?Utf-8?B?S2Vu?= Microsoft Access 1 29th Oct 2004 02:59 PM
Is there a way to calculate BIG numbers expressed as strings? Sam Kong Microsoft C# .NET 4 21st Sep 2004 12:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:40 PM.