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

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Complex Count formula

It doesn't look as if any cells in column C contain 0 (or does your -
indicate 0 ? If so, then there are 4 of those).

Generally you would have a formula like this:

=SUMPRODUCT((B2:B10=3)*(C2:C10=0))

if you want both conditions to be satisfied at the same time before
you count that row, or this:

=SUMPRODUCT((B2:B10=3)+(C2:C10=0))

if you want either of the conditions to be satisfied.

Hope this helps.

Pete

On Nov 4, 12:47*am, GoBucks wrote:
I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID * * *RATING *AMOUNT *formula match
00304 * 4.0 * * *(5.0) *x
00299 * 2.5 * * *- * * *x
00069 * 2.5 * * *2.0 * *
01380 * 4.0 * * *- * * *x
01729 * 3.0 * * *- * * *x
01783 * 2.5 * * *- * * *x
01934 * 2.0 * * *(1.0) *
01901 * 3.8 * * *(1.0) *x
01482 * 3.0 * * *(1.0) *x
02076 * 2.5 * * *(1.0) *

COUNT * 5 * * * 3 * * * 7

B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default Complex Count formula

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Complex Count formula

Here is one way...

=COUNTIF(B2:B10,"=3")+COUNTIF(C2:C10,"=0")-SUMPRODUCT(--(B2:B10=3),--(C2:C10=0))

Hope this helps,

Hutch

"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Complex Count formula

I think the "-" is a zero in comma format. Your formula is beautiful - thanks
for the lesson in the use of SIGN.

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Complex Count formula

mark

--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match
some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values
in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm
having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Complex Count formula

I think the "-" is a zero in comma format.

Yeah, I figured that out after the fact!

Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Tom Hutchins" wrote in message
...
I think the "-" is a zero in comma format. Your formula is beautiful -
thanks
for the lesson in the use of SIGN.

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match
some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with
values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm
having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default Complex Count formula

I think the "-" is a zero in comma format.

Yeah, I figured that out after the fact!

Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Tom Hutchins" wrote:

I think the "-" is a zero in comma format. Your formula is beautiful - thanks
for the lesson in the use of SIGN.

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default Complex Count formula

Thank you for the help!! How would you write the formula if the criteria for
column B is =3 and <-3.9 along with column C=0??

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default Complex Count formula

Sorry edit to to previous post:

How would you write the formula if the criteria for
column B is =3 and <=3.9 along with column C=0??


"GoBucks" wrote:

Thank you for the help!! How would you write the formula if the criteria for
column B is =3 and <-3.9 along with column C=0??

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.




  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Complex Count formula

Add one more condition as

=SUMPRODUCT((B2:B11=3)*(B2:B11<=3.9)+(C2:C11=0))

If this post helps click Yes
---------------
Jacob Skaria


"GoBucks" wrote:

Sorry edit to to previous post:

How would you write the formula if the criteria for
column B is =3 and <=3.9 along with column C=0??


"GoBucks" wrote:

Thank you for the help!! How would you write the formula if the criteria for
column B is =3 and <-3.9 along with column C=0??

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.


  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Complex Count formula

If you want to use an AND test for the 2 conditions for column B, and then
an OR to combine that with the column C condition, you could change Biff's
=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))
to
=SUMPRODUCT(SIGN(((B2:B11=3)*(B2:B11<=3.9))+(C2:C 11=0)))
--
David Biddulph

"GoBucks" wrote in message
...
Sorry edit to to previous post:

How would you write the formula if the criteria for
column B is =3 and <=3.9 along with column C=0??


"GoBucks" wrote:

Thank you for the help!! How would you write the formula if the criteria
for
column B is =3 and <-3.9 along with column C=0??

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that
match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with
values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm
having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.




  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 57
Default Complex Count formula

thank you Jacob. I tried the formula and result I recv'd was 7 when I was
looking for 6. There are 3 rows in Column B that match (=3, <=3.9) and 4
rows in Column C that match (=0). But overall, there are 6 rows total that
match the entire criteria. I can't seem to figure this one out.

"Jacob Skaria" wrote:

Add one more condition as

=SUMPRODUCT((B2:B11=3)*(B2:B11<=3.9)+(C2:C11=0))

If this post helps click Yes
---------------
Jacob Skaria


"GoBucks" wrote:

Sorry edit to to previous post:

How would you write the formula if the criteria for
column B is =3 and <=3.9 along with column C=0??


"GoBucks" wrote:

Thank you for the help!! How would you write the formula if the criteria for
column B is =3 and <-3.9 along with column C=0??

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.

  #14   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Complex Count formula

One row satisfy both the conditions.

If this post helps click Yes
---------------
Jacob Skaria


"GoBucks" wrote:

thank you Jacob. I tried the formula and result I recv'd was 7 when I was
looking for 6. There are 3 rows in Column B that match (=3, <=3.9) and 4
rows in Column C that match (=0). But overall, there are 6 rows total that
match the entire criteria. I can't seem to figure this one out.

"Jacob Skaria" wrote:

Add one more condition as

=SUMPRODUCT((B2:B11=3)*(B2:B11<=3.9)+(C2:C11=0))

If this post helps click Yes
---------------
Jacob Skaria


"GoBucks" wrote:

Sorry edit to to previous post:

How would you write the formula if the criteria for
column B is =3 and <=3.9 along with column C=0??

"GoBucks" wrote:

Thank you for the help!! How would you write the formula if the criteria for
column B is =3 and <-3.9 along with column C=0??

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.

  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Complex Count formula

Try this

=SUMPRODUCT(SIGN((B2:B11=3)*(B2:B11<=3.9)+(C2:C11 =0)))

Hope this helps,

Hutch

"GoBucks" wrote:

thank you Jacob. I tried the formula and result I recv'd was 7 when I was
looking for 6. There are 3 rows in Column B that match (=3, <=3.9) and 4
rows in Column C that match (=0). But overall, there are 6 rows total that
match the entire criteria. I can't seem to figure this one out.

"Jacob Skaria" wrote:

Add one more condition as

=SUMPRODUCT((B2:B11=3)*(B2:B11<=3.9)+(C2:C11=0))

If this post helps click Yes
---------------
Jacob Skaria


"GoBucks" wrote:

Sorry edit to to previous post:

How would you write the formula if the criteria for
column B is =3 and <=3.9 along with column C=0??

"GoBucks" wrote:

Thank you for the help!! How would you write the formula if the criteria for
column B is =3 and <-3.9 along with column C=0??

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.



  #16   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Complex Count formula

Oops...Ignore my post and go with what Tom has suggested. I copy/pasted your
sample data.....
....only meant to add an additional condition to your existing formula...

"Jacob Skaria" wrote:

One row satisfy both the conditions.

If this post helps click Yes
---------------
Jacob Skaria


"GoBucks" wrote:

thank you Jacob. I tried the formula and result I recv'd was 7 when I was
looking for 6. There are 3 rows in Column B that match (=3, <=3.9) and 4
rows in Column C that match (=0). But overall, there are 6 rows total that
match the entire criteria. I can't seem to figure this one out.

"Jacob Skaria" wrote:

Add one more condition as

=SUMPRODUCT((B2:B11=3)*(B2:B11<=3.9)+(C2:C11=0))

If this post helps click Yes
---------------
Jacob Skaria


"GoBucks" wrote:

Sorry edit to to previous post:

How would you write the formula if the criteria for
column B is =3 and <=3.9 along with column C=0??

"GoBucks" wrote:

Thank you for the help!! How would you write the formula if the criteria for
column B is =3 and <-3.9 along with column C=0??

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that match some
criteria. The sample table is listed below. I would to have a formula
calculate the # of rows in which values in column B =3 along with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I 'm having a
difficult time figuring our how to write the formula for this. Any
suggestions will be much appreciated.

  #17   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Complex Count formula

You've left out the SIGN function which Jacob had in his original formula,
and which I think he intended to be in the new one (and which I included in
mine).
--
David Biddulph

"GoBucks" wrote in message
...
thank you Jacob. I tried the formula and result I recv'd was 7 when I was
looking for 6. There are 3 rows in Column B that match (=3, <=3.9) and 4
rows in Column C that match (=0). But overall, there are 6 rows total that
match the entire criteria. I can't seem to figure this one out.

"Jacob Skaria" wrote:

Add one more condition as

=SUMPRODUCT((B2:B11=3)*(B2:B11<=3.9)+(C2:C11=0))

If this post helps click Yes
---------------
Jacob Skaria


"GoBucks" wrote:

Sorry edit to to previous post:

How would you write the formula if the criteria for
column B is =3 and <=3.9 along with column C=0??

"GoBucks" wrote:

Thank you for the help!! How would you write the formula if the
criteria for
column B is =3 and <-3.9 along with column C=0??

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that
match some
criteria. The sample table is listed below. I would to have a
formula
calculate the # of rows in which values in column B =3 along
with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I
'm having a
difficult time figuring our how to write the formula for this.
Any
suggestions will be much appreciated.



  #18   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Complex Count formula

Correction. The original formula with the SIGN function included was from
Biff, not from Jacob.
--
David Biddulph

"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
You've left out the SIGN function which Jacob had in his original formula,
and which I think he intended to be in the new one (and which I included
in mine).
--
David Biddulph

"GoBucks" wrote in message
...
thank you Jacob. I tried the formula and result I recv'd was 7 when I was
looking for 6. There are 3 rows in Column B that match (=3, <=3.9) and 4
rows in Column C that match (=0). But overall, there are 6 rows total
that
match the entire criteria. I can't seem to figure this one out.

"Jacob Skaria" wrote:

Add one more condition as

=SUMPRODUCT((B2:B11=3)*(B2:B11<=3.9)+(C2:C11=0))

If this post helps click Yes
---------------
Jacob Skaria


"GoBucks" wrote:

Sorry edit to to previous post:

How would you write the formula if the criteria for
column B is =3 and <=3.9 along with column C=0??

"GoBucks" wrote:

Thank you for the help!! How would you write the formula if the
criteria for
column B is =3 and <-3.9 along with column C=0??

"T. Valko" wrote:

I assume the "-" means the cell is empty?

=SUMPRODUCT(SIGN((B2:B11=3)+(C2:C11=0)))

I don't see a single 0 in
--
Biff
Microsoft Excel MVP


"GoBucks" wrote:

I am looking to get a formula that count the number of rows that
match some
criteria. The sample table is listed below. I would to have a
formula
calculate the # of rows in which values in column B =3 along
with values in
Column C = 0

ID RATING AMOUNT formula match
00304 4.0 (5.0) x
00299 2.5 - x
00069 2.5 2.0
01380 4.0 - x
01729 3.0 - x
01783 2.5 - x
01934 2.0 (1.0)
01901 3.8 (1.0) x
01482 3.0 (1.0) x
02076 2.5 (1.0)

COUNT 5 3 7


B=3 = 5 rows
C=0 = 3 rows

But if you combine both criteria, there are 7 rows that match. I
'm having a
difficult time figuring our how to write the formula for this.
Any
suggestions will be much appreciated.





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
Complex SUMIF/COUNT IF Evan Excel Discussion (Misc queries) 5 October 19th 07 11:57 PM
Complex count formula Wmcculler Excel Discussion (Misc queries) 1 January 15th 07 05:15 PM
complex count FSmitty Excel Worksheet Functions 7 February 3rd 06 10:22 PM
Count using complex criteria Rob Excel Worksheet Functions 2 May 4th 05 02:34 PM
complex count question JBoulton Excel Worksheet Functions 13 March 24th 05 02:57 AM


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