Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Count string IF.....

I am trying to count a 3 digit embeded data string IF....

NAME DATA_STRING
Joe WAPDATMM4RT1RRR
Susan WAPDATPLBMM5UDF
John DATPLBINSRBTMM6
Joe WAPUDARBTRRRMM4

I can count the strings with...
=SUM(COUNTIF(B2:B5,"*WAP*"),COUNTIF(B2:B5,"*RBT*") ,COUNTIF(B2:B5,"*MM4*"))
result (7)
I need the result IF A2:A5=Joe result (5)
I have stared at SUMPRODUCT long enough....H E L P !
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Count string IF.....

One way:
=SUMPRODUCT((ISNUMBER(FIND({"WAP","RBT","MM4"},B2: B5)))*(A2:A5="Joe"))

Replace FIND with SEARCH if you don't need it to be case sensitive
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Coley" wrote:
I am trying to count a 3 digit embeded data string IF....

NAME DATA_STRING
Joe WAPDATMM4RT1RRR
Susan WAPDATPLBMM5UDF
John DATPLBINSRBTMM6
Joe WAPUDARBTRRRMM4

I can count the strings with...
=SUM(COUNTIF(B2:B5,"*WAP*"),COUNTIF(B2:B5,"*RBT*") ,COUNTIF(B2:B5,"*MM4*"))
result (7)
I need the result IF A2:A5=Joe result (5)
I have stared at SUMPRODUCT long enough....H E L P !

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Count string IF.....

OUTSTANDING! Not sure why it works but it does. Thanks!

"Max" wrote:

One way:
=SUMPRODUCT((ISNUMBER(FIND({"WAP","RBT","MM4"},B2: B5)))*(A2:A5="Joe"))

Replace FIND with SEARCH if you don't need it to be case sensitive
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Coley" wrote:
I am trying to count a 3 digit embeded data string IF....

NAME DATA_STRING
Joe WAPDATMM4RT1RRR
Susan WAPDATPLBMM5UDF
John DATPLBINSRBTMM6
Joe WAPUDARBTRRRMM4

I can count the strings with...
=SUM(COUNTIF(B2:B5,"*WAP*"),COUNTIF(B2:B5,"*RBT*") ,COUNTIF(B2:B5,"*MM4*"))
result (7)
I need the result IF A2:A5=Joe result (5)
I have stared at SUMPRODUCT long enough....H E L P !

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Count string IF.....

welcome, Coley. glad it helped.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Coley" wrote in message
...
OUTSTANDING! Not sure why it works but it does. Thanks!



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Count string IF.....

"Max" wrote...
One way:
=SUMPRODUCT((ISNUMBER(FIND({"WAP","RBT","MM4"},B2 :B5)))*(A2:A5="Joe"))

....

Another way, shorter but an array formula,

=COUNT(FIND({"WAP","RBT","MM4"},B2:B5)/(A2:A5="Joe"))


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
Count characters within a string Francisco Excel Worksheet Functions 4 April 10th 07 05:28 PM
Count rows with a string in any cell andy62 Excel Worksheet Functions 5 August 8th 06 05:31 AM
count number of letters in a string Wiley Excel Worksheet Functions 3 May 11th 06 06:54 PM
Colomn of strings, how to count each string with "abc" OR "def" Tommy T Excel Worksheet Functions 8 September 5th 05 04:57 PM
count number of occurences within a string Gabriel Excel Worksheet Functions 2 November 25th 04 04:17 PM


All times are GMT +1. The time now is 06:58 AM.

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

About Us

"It's about Microsoft Excel"