Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default How to combine SUMPRODUCT with COUNTIF?

Greetings,

I need to count up the number of occurrences of the letter "Q" in Column A,
only if the string in Column B = "Claims."

That is, how do I combine . . .

=SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"Q","")))
AND
=COUNTIF(B1:B100,"Claims")

I have tried various approaches and different formulas, but nothing seems to
work. Any help at all would be appreciated. Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default How to combine SUMPRODUCT with COUNTIF?

this will count where the cell in a is Q and the cell in b is claims

=SUMPRODUCT((A1:A100,"q")*(b1:b100="claims"))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mckzach" wrote in message
...
Greetings,

I need to count up the number of occurrences of the letter "Q" in Column
A,
only if the string in Column B = "Claims."

That is, how do I combine . . .

=SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"Q","")))
AND
=COUNTIF(B1:B100,"Claims")

I have tried various approaches and different formulas, but nothing seems
to
work. Any help at all would be appreciated. Thanks in advance.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default How to combine SUMPRODUCT with COUNTIF?

Thanks, but that doesn't work either.
Incidentally, Column A cells may contain from 1 to 15 different letters. My
dilemma is that I'm only looking for those including "Q" (and "Claims" in
Column B).


"Don Guillett" wrote:

this will count where the cell in a is Q and the cell in b is claims

=SUMPRODUCT((A1:A100,"q")*(b1:b100="claims"))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mckzach" wrote in message
...
Greetings,

I need to count up the number of occurrences of the letter "Q" in Column
A,
only if the string in Column B = "Claims."

That is, how do I combine . . .

=SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"Q","")))
AND
=COUNTIF(B1:B100,"Claims")

I have tried various approaches and different formulas, but nothing seems
to
work. Any help at all would be appreciated. Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default How to combine SUMPRODUCT with COUNTIF?

Don had a small typo.

Try this:

=SUMPRODUCT((A1:A100="q")*(b1:b100="claims"))

mckzach wrote:

Thanks, but that doesn't work either.
Incidentally, Column A cells may contain from 1 to 15 different letters. My
dilemma is that I'm only looking for those including "Q" (and "Claims" in
Column B).

"Don Guillett" wrote:

this will count where the cell in a is Q and the cell in b is claims

=SUMPRODUCT((A1:A100,"q")*(b1:b100="claims"))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mckzach" wrote in message
...
Greetings,

I need to count up the number of occurrences of the letter "Q" in Column
A,
only if the string in Column B = "Claims."

That is, how do I combine . . .

=SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"Q","")))
AND
=COUNTIF(B1:B100,"Claims")

I have tried various approaches and different formulas, but nothing seems
to
work. Any help at all would be appreciated. Thanks in advance.




--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default How to combine SUMPRODUCT with COUNTIF?

If by:

dilemma is that I'm only looking for those including "Q"


Your mean that there could be other letters in the cell then use your own
formula:

=SUMPRODUCT((LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"Q",""))),--(B1:B100="Claims"))

Note however that it is case ensitive and it will return wrong results if
there are more than one *Q* in the cell. To avaid there errors try:

=SUMPRODUCT(--(LEN(SUBSTITUTE(UPPER(A1:A100),"Q",""))<LEN(A1:A1 00)),--(B1:B100="Claims"))

This assumes that *Claims* is the only entry in the matching cells in Column
B

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"mckzach" wrote in message
...
Thanks, but that doesn't work either.
Incidentally, Column A cells may contain from 1 to 15 different letters.
My
dilemma is that I'm only looking for those including "Q" (and "Claims" in
Column B).


"Don Guillett" wrote:

this will count where the cell in a is Q and the cell in b is claims

=SUMPRODUCT((A1:A100,"q")*(b1:b100="claims"))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mckzach" wrote in message
...
Greetings,

I need to count up the number of occurrences of the letter "Q" in
Column
A,
only if the string in Column B = "Claims."

That is, how do I combine . . .

=SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"Q","")))
AND
=COUNTIF(B1:B100,"Claims")

I have tried various approaches and different formulas, but nothing
seems
to
work. Any help at all would be appreciated. Thanks in advance.








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default How to combine SUMPRODUCT with COUNTIF?

Sandy, that worked! Thanks very much for the response.


"Sandy Mann" wrote:

If by:

dilemma is that I'm only looking for those including "Q"


Your mean that there could be other letters in the cell then use your own
formula:

=SUMPRODUCT((LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"Q",""))),--(B1:B100="Claims"))

Note however that it is case ensitive and it will return wrong results if
there are more than one *Q* in the cell. To avaid there errors try:

=SUMPRODUCT(--(LEN(SUBSTITUTE(UPPER(A1:A100),"Q",""))<LEN(A1:A1 00)),--(B1:B100="Claims"))

This assumes that *Claims* is the only entry in the matching cells in Column
B

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"mckzach" wrote in message
...
Thanks, but that doesn't work either.
Incidentally, Column A cells may contain from 1 to 15 different letters.
My
dilemma is that I'm only looking for those including "Q" (and "Claims" in
Column B).


"Don Guillett" wrote:

this will count where the cell in a is Q and the cell in b is claims

=SUMPRODUCT((A1:A100,"q")*(b1:b100="claims"))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mckzach" wrote in message
...
Greetings,

I need to count up the number of occurrences of the letter "Q" in
Column
A,
only if the string in Column B = "Claims."

That is, how do I combine . . .

=SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"Q","")))
AND
=COUNTIF(B1:B100,"Claims")

I have tried various approaches and different formulas, but nothing
seems
to
work. Any help at all would be appreciated. Thanks in advance.






  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default How to combine SUMPRODUCT with COUNTIF?

Glad that it worked for you. Thanks for the feedback.

--

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"mckzach" wrote in message
...
Sandy, that worked! Thanks very much for the response.


"Sandy Mann" wrote:

If by:

dilemma is that I'm only looking for those including "Q"


Your mean that there could be other letters in the cell then use your own
formula:

=SUMPRODUCT((LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"Q",""))),--(B1:B100="Claims"))

Note however that it is case ensitive and it will return wrong results if
there are more than one *Q* in the cell. To avaid there errors try:

=SUMPRODUCT(--(LEN(SUBSTITUTE(UPPER(A1:A100),"Q",""))<LEN(A1:A1 00)),--(B1:B100="Claims"))

This assumes that *Claims* is the only entry in the matching cells in
Column
B

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"mckzach" wrote in message
...
Thanks, but that doesn't work either.
Incidentally, Column A cells may contain from 1 to 15 different
letters.
My
dilemma is that I'm only looking for those including "Q" (and "Claims"
in
Column B).


"Don Guillett" wrote:

this will count where the cell in a is Q and the cell in b is claims

=SUMPRODUCT((A1:A100,"q")*(b1:b100="claims"))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mckzach" wrote in message
...
Greetings,

I need to count up the number of occurrences of the letter "Q" in
Column
A,
only if the string in Column B = "Claims."

That is, how do I combine . . .

=SUMPRODUCT(LEN(A1:A100)-LEN(SUBSTITUTE(A1:A100,"Q","")))
AND
=COUNTIF(B1:B100,"Claims")

I have tried various approaches and different formulas, but nothing
seems
to
work. Any help at all would be appreciated. Thanks in advance.









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
Combine SUMIF and SUMPRODUCT Tevuna Excel Worksheet Functions 10 April 28th 23 07:42 PM
Combine COUNTIF & EXACT nastech Excel Discussion (Misc queries) 12 August 28th 07 05:21 AM
Do I need to combine hlookup and countif????? sharkh Excel Worksheet Functions 2 August 17th 06 05:05 PM
How do I combine 2 COUNTIF formulas?? MANDY Excel Worksheet Functions 5 January 19th 06 06:07 PM
SUMPRODUCT - How to combine Robert Excel Worksheet Functions 4 February 1st 05 01:33 PM


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