Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Counting occurences of text string in a text file

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Counting occurences of text string in a text file

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:C1 0))

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
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
Counting occurences of text jc132568 Excel Worksheet Functions 3 November 2nd 09 04:11 AM
Counting Unique occurences of text in a column Tan Excel Worksheet Functions 12 October 26th 09 04:21 PM
Counting occurences of text DJ Excel Discussion (Misc queries) 7 September 24th 09 11:07 AM
Counting occurences which includes text Tomac[_4_] Excel Programming 1 February 16th 06 05:46 PM
Counting occurences which includes text Tomac[_3_] Excel Programming 2 February 16th 06 04:29 PM


All times are GMT +1. The time now is 07:33 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"