Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tommy T
 
Posts: n/a
Default Colomn of strings, how to count each string with "abc" OR "def"

I have a colomn of alpha-numeric strings and need to count cells which
contain phrase A or phrase B buried within them. This is driving me crazy,
please help!
  #2   Report Post  
Paul Sheppard
 
Posts: n/a
Default


Tommy T Wrote:
I have a colomn of alpha-numeric strings and need to count cells which
contain phrase A or phrase B buried within them. This is driving me
crazy,
please help!


Hi Tommy

Try this =COUNTIF(A1:A2,"*abc*") change the range A1:A2 to suit your
data, change abc to def to count the other option


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=401899

  #4   Report Post  
Tommy T
 
Posts: n/a
Default

Thanks Ron,

I'd managed to get that far but the trouble is that I need the cell to be
counted if there is "abc" OR "def" within it. It's the OR bit which is
causing me trouble.

Any ideas?

Tom

"Ron Rosenfeld" wrote:

On Mon, 5 Sep 2005 04:01:02 -0700, "Tommy T" <Tommy
wrote:

I have a colomn of alpha-numeric strings and need to count cells which
contain phrase A or phrase B buried within them. This is driving me crazy,
please help!



=COUNTIF(A:A,"*abc*")

or, if your string to search for is in a cell:

=COUNTIF(A:A,"*"&D2&"*")


--ron

  #5   Report Post  
Tommy T
 
Posts: n/a
Default

Thanks Paul,

Trouble is that some of the cells contain both phrases, if I have two
different countif functions then they get double counted which I'm trying to
avoid.

Tom

"Paul Sheppard" wrote:


Tommy T Wrote:
I have a colomn of alpha-numeric strings and need to count cells which
contain phrase A or phrase B buried within them. This is driving me
crazy,
please help!


Hi Tommy

Try this =COUNTIF(A1:A2,"*abc*") change the range A1:A2 to suit your
data, change abc to def to count the other option


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=401899




  #6   Report Post  
Paul Sheppard
 
Posts: n/a
Default


Tommy T Wrote:
Thanks Ron,

I'd managed to get that far but the trouble is that I need the cell to
be
counted if there is "abc" OR "def" within it. It's the OR bit which is
causing me trouble.

Any ideas?

Hi Tommy

Try this =SUM((COUNTIF(A:A,"*abc*")+(COUNTIF(A:A,"*def*"))) )



--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=401899

  #7   Report Post  
Domenic
 
Posts: n/a
Default

Try...

=SUMPRODUCT(--(ISNUMBER(SEARCH("abc",A1:A100))+ISNUMBER(SEARCH(" def",A1:A
100))0))

or

=SUMPRODUCT(--(ISNUMBER(SEARCH(B1,A1:A100))+ISNUMBER(SEARCH(C1,A 1:A100))
0))

....where B1 contains your first criterion, such as abc, and C1 contains
your second criterion, such as def.

Hope this helps!

In article ,
"Tommy T" <Tommy wrote:

I have a colomn of alpha-numeric strings and need to count cells which
contain phrase A or phrase B buried within them. This is driving me crazy,
please help!

  #8   Report Post  
Paul Sheppard
 
Posts: n/a
Default


Tommy T Wrote:
Thanks Paul,

Trouble is that some of the cells contain both phrases, if I have two
different countif functions then they get double counted which I'm
trying to
avoid.

Tom

"Paul Sheppard" wrote:


Tommy T Wrote:
I have a colomn of alpha-numeric strings and need to count cells

which
contain phrase A or phrase B buried within them. This is driving

me
crazy,
please help!


Hi Tommy

Try this =COUNTIF(A1:A2,"*abc*") change the range A1:A2 to suit

your
data, change abc to def to count the other option


--
Paul Sheppard



------------------------------------------------------------------------
Paul Sheppard's Profile:

http://www.excelforum.com/member.php...o&userid=24783
View this thread:

http://www.excelforum.com/showthread...hreadid=401899



Hi Tommy

Try Data Filter Autofilter Custom filter contains abc or
contains def


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=401899

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
How can I count strings within strings Paul W Excel Worksheet Functions 4 June 14th 05 12:39 PM
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 8 May 18th 05 04:23 AM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
count number of occurences within a string Gabriel Excel Worksheet Functions 2 November 25th 04 04:17 PM
how to count the nr of occurrences of a text string in a cell rang eagerbuyer Excel Worksheet Functions 1 November 4th 04 12:27 PM


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