#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 117
Default counting formula

i'm using the following formula to count the number of times a certain value
appears in column A when the value in column B=Dave. I want to adjust this
formula so that it counts the number of times a certain value appears in
column A when the value in column B 'contains' the string Dave. Cells in
column B may contain something like Dave Smith (not just Dave).

=SUMPRODUCT(--(A1:A100=C5),--(B1:B100="Dave"))

Thanks in advance.
Excel 2003.
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default counting formula

You can use a helper column. In Z1, enter:

=--(LEN(B1)<LEN(SUBSTITUTE(B1,"Dave",""))) and copy down and then use:

=SUMPRODUCT(--(A1:A100=C5),--(Z1:Z100))

--
Gary''s Student - gsnu200773


"Tendresse" wrote:

i'm using the following formula to count the number of times a certain value
appears in column A when the value in column B=Dave. I want to adjust this
formula so that it counts the number of times a certain value appears in
column A when the value in column B 'contains' the string Dave. Cells in
column B may contain something like Dave Smith (not just Dave).

=SUMPRODUCT(--(A1:A100=C5),--(B1:B100="Dave"))

Thanks in advance.
Excel 2003.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default counting formula

Say you put the first name in a particular cell, say D5, then try this:

=SUMPRODUCT((A1:A100=C5)*(ISNUMBER(FIND(D5,B1:B100 ))))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"Tendresse" wrote in message
...
i'm using the following formula to count the number of times a certain value
appears in column A when the value in column B=Dave. I want to adjust this
formula so that it counts the number of times a certain value appears in
column A when the value in column B 'contains' the string Dave. Cells in
column B may contain something like Dave Smith (not just Dave).

=SUMPRODUCT(--(A1:A100=C5),--(B1:B100="Dave"))

Thanks in advance.
Excel 2003.


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default counting formula

To make the formula more robust, since the Find() function is case
sensitive, you can use the Search() function instead:

=SUMPRODUCT((A1:A100=C5)*(ISNUMBER(SEARCH(D5,B1:B1 00))))

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"RagDyeR" wrote in message
...
Say you put the first name in a particular cell, say D5, then try this:

=SUMPRODUCT((A1:A100=C5)*(ISNUMBER(FIND(D5,B1:B100 ))))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"Tendresse" wrote in message
...
i'm using the following formula to count the number of times a certain value
appears in column A when the value in column B=Dave. I want to adjust this
formula so that it counts the number of times a certain value appears in
column A when the value in column B 'contains' the string Dave. Cells in
column B may contain something like Dave Smith (not just Dave).

=SUMPRODUCT(--(A1:A100=C5),--(B1:B100="Dave"))

Thanks in advance.
Excel 2003.



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 117
Default counting formula

Thank you guys for all your help ... muchly appreciated.
I used the formula below and it worked brilliantly.

Don, your formula assumes the word Dave is always at the beginning of the
cell. That's my mistake, i didn't mention in my question that there could be
entries like 'From Dave'. But thank you very much, i'm sure it will come a
situation where i'll need to apply the LEFT function. Now i have the answer
in advance.

Thanks again ... Tendresse

"RagDyeR" wrote:

To make the formula more robust, since the Find() function is case
sensitive, you can use the Search() function instead:

=SUMPRODUCT((A1:A100=C5)*(ISNUMBER(SEARCH(D5,B1:B1 00))))

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"RagDyeR" wrote in message
...
Say you put the first name in a particular cell, say D5, then try this:

=SUMPRODUCT((A1:A100=C5)*(ISNUMBER(FIND(D5,B1:B100 ))))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"Tendresse" wrote in message
...
i'm using the following formula to count the number of times a certain value
appears in column A when the value in column B=Dave. I want to adjust this
formula so that it counts the number of times a certain value appears in
column A when the value in column B 'contains' the string Dave. Cells in
column B may contain something like Dave Smith (not just Dave).

=SUMPRODUCT(--(A1:A100=C5),--(B1:B100="Dave"))

Thanks in advance.
Excel 2003.




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default counting formula

And we all appreciate your feed-back.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Tendresse" wrote in message
...
Thank you guys for all your help ... muchly appreciated.
I used the formula below and it worked brilliantly.

Don, your formula assumes the word Dave is always at the beginning of the
cell. That's my mistake, i didn't mention in my question that there could

be
entries like 'From Dave'. But thank you very much, i'm sure it will come a
situation where i'll need to apply the LEFT function. Now i have the

answer
in advance.

Thanks again ... Tendresse

"RagDyeR" wrote:

To make the formula more robust, since the Find() function is case
sensitive, you can use the Search() function instead:

=SUMPRODUCT((A1:A100=C5)*(ISNUMBER(SEARCH(D5,B1:B1 00))))

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"RagDyeR" wrote in message
...
Say you put the first name in a particular cell, say D5, then try this:

=SUMPRODUCT((A1:A100=C5)*(ISNUMBER(FIND(D5,B1:B100 ))))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"Tendresse" wrote in message
...
i'm using the following formula to count the number of times a certain

value
appears in column A when the value in column B=Dave. I want to adjust

this
formula so that it counts the number of times a certain value appears in
column A when the value in column B 'contains' the string Dave. Cells in
column B may contain something like Dave Smith (not just Dave).

=SUMPRODUCT(--(A1:A100=C5),--(B1:B100="Dave"))

Thanks in advance.
Excel 2003.





  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default counting formula

Glad to help. For future reference it's always nice to fully state your
problem to begin with.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Tendresse" wrote in message
...
Thank you guys for all your help ... muchly appreciated.
I used the formula below and it worked brilliantly.

Don, your formula assumes the word Dave is always at the beginning of the
cell. That's my mistake, i didn't mention in my question that there could
be
entries like 'From Dave'. But thank you very much, i'm sure it will come a
situation where i'll need to apply the LEFT function. Now i have the
answer
in advance.

Thanks again ... Tendresse

"RagDyeR" wrote:

To make the formula more robust, since the Find() function is case
sensitive, you can use the Search() function instead:

=SUMPRODUCT((A1:A100=C5)*(ISNUMBER(SEARCH(D5,B1:B1 00))))

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"RagDyeR" wrote in message
...
Say you put the first name in a particular cell, say D5, then try this:

=SUMPRODUCT((A1:A100=C5)*(ISNUMBER(FIND(D5,B1:B100 ))))
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"Tendresse" wrote in message
...
i'm using the following formula to count the number of times a certain
value
appears in column A when the value in column B=Dave. I want to adjust
this
formula so that it counts the number of times a certain value appears in
column A when the value in column B 'contains' the string Dave. Cells in
column B may contain something like Dave Smith (not just Dave).

=SUMPRODUCT(--(A1:A100=C5),--(B1:B100="Dave"))

Thanks in advance.
Excel 2003.





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
Formula / Counting Anna Excel Worksheet Functions 5 July 12th 07 02:38 PM
Counting formula awakening2lite Excel Discussion (Misc queries) 6 June 4th 07 06:26 PM
Counting formula TMF in MN Excel Worksheet Functions 2 January 8th 07 06:50 PM
Counting Formula santaviga Excel Worksheet Functions 3 May 9th 06 12:16 PM
Help with counting formula Ian Excel Discussion (Misc queries) 1 January 7th 05 10:25 AM


All times are GMT +1. The time now is 11:08 PM.

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"