PC Review


Reply
Thread Tools Rate Thread

Counting occurences of text string in a text file

 
 
Mike Archer
Guest
Posts: n/a
 
      10th Jul 2008
Hello. I know how to instr to find an occurence of a text string in a text
file, but I would like to count how many occurences of the string there are.

I am sure that I could create a routine that would do it, but is there a
built in function that I could use?

--
Thanks,
Mike
 
Reply With Quote
 
 
 
 
ryguy7272
Guest
Posts: n/a
 
      10th Jul 2008
A B C
1 Make Month Price
2 Ford June 7,500
3 Ford June 8,300
4 Ford May 6,873
5 Ford June 11,200
6 Renault June 13,200
7 Renault June 14,999
8 BMW June 17,500
9 BMW May 23,500
10 BMW June 18,000

The solution for the number of Fords sold in June using this function is
=SUMPRODUCT((A1:A10="Ford")*(B1:B10="June")).
The value is obtained with
=SUMPRODUCT((A1:A10="Ford")*(B1:B10="June")*(C1:C10))

Take a look at this; you will probably learn a thing or two:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html


Regards,
Ryan---

--
RyGuy


"Mike Archer" wrote:

> Hello. I know how to instr to find an occurence of a text string in a text
> file, but I would like to count how many occurences of the string there are.
>
> I am sure that I could create a routine that would do it, but is there a
> built in function that I could use?
>
> --
> Thanks,
> Mike

 
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
Counting occurences of text jc132568 Microsoft Excel Worksheet Functions 3 2nd Nov 2009 04:11 AM
Counting Unique occurences of text in a column Tan Microsoft Excel Worksheet Functions 12 26th Oct 2009 04:21 PM
Counting occurences of text DJ Microsoft Excel Misc 7 24th Sep 2009 11:07 AM
Counting occurences which includes text Tomac Microsoft Excel Programming 1 16th Feb 2006 05:46 PM
Counting occurences which includes text Tomac Microsoft Excel Programming 2 16th Feb 2006 04:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:14 PM.