#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default countif 2 criteria

Hi

Struggling to get this to work, despite looking at the treads. Using excel
2003.
trying to count how many times 5710 in col G has "6" in Col H

col-G col-H
5710 --- 7
5710 ----6
5694 ----6
5678----3
5710 ---6

=SUMPRODUCT(--(G2:G6=5710),--(H2:H6=6))

Would like to add 5694 as well as 5710, is this possible and does if have to
be on the same sheet?
thanks in advance
brian

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/201003/1

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default countif 2 criteria

Would like to add 5694 as well as 5710, is this possible

Yes, here's one way...

Use cells to hold the criteria:

J2 = 5710
K2 = 5694
L2 = 6

=SUMPRODUCT(--(ISNUMBER(MATCH(G2:G6,J2:K2,0))),--(H2:H6=L2))

does if have to be on the same sheet?


Does what have to be on the same sheet? The formula?

No

With the criteria on the same sheet as the formula:

=SUMPRODUCT(--(ISNUMBER(MATCH(Sheet1!G2:G6,J2:K2,0))),--(Sheet1!H2:H6=L2))

--
Biff
Microsoft Excel MVP


"BNT1 via OfficeKB.com" <u19326@uwe wrote in message
news:a5b290940805a@uwe...
Hi

Struggling to get this to work, despite looking at the treads. Using excel
2003.
trying to count how many times 5710 in col G has "6" in Col H

col-G col-H
5710 --- 7
5710 ----6
5694 ----6
5678----3
5710 ---6

=SUMPRODUCT(--(G2:G6=5710),--(H2:H6=6))

Would like to add 5694 as well as 5710, is this possible and does if have
to
be on the same sheet?
thanks in advance
brian

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/201003/1



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default countif 2 criteria

=SUMPRODUCT(--(G2:G6={5710,5694}),--(H2:H6=6))

Can't use the double unary in that syntax.

=SUMPRODUCT((G2:G6={5710,5694})*(H2:H6=6))

--
Biff
Microsoft Excel MVP


"Don Guillett" wrote in message
...
try
=SUMPRODUCT(--(G2:G6={5710,5694}),--(H2:H6=6))


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"BNT1 via OfficeKB.com" <u19326@uwe wrote in message
news:a5b290940805a@uwe...
Hi

Struggling to get this to work, despite looking at the treads. Using
excel
2003.
trying to count how many times 5710 in col G has "6" in Col H

col-G col-H
5710 --- 7
5710 ----6
5694 ----6
5678----3
5710 ---6

=SUMPRODUCT(--(G2:G6=5710),--(H2:H6=6))

Would like to add 5694 as well as 5710, is this possible and does if have
to
be on the same sheet?
thanks in advance
brian

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/201003/1




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default countif 2 criteria

wow

thank you both for the speedy response
Could not get Don's to work- got #Value! error. wonder what I am doing wrong

T.Valko worked perfect, using the second formula for identifying on different
sheet

regards

T. Valko wrote:
Would like to add 5694 as well as 5710, is this possible


Yes, here's one way...

Use cells to hold the criteria:

J2 = 5710
K2 = 5694
L2 = 6

=SUMPRODUCT(--(ISNUMBER(MATCH(G2:G6,J2:K2,0))),--(H2:H6=L2))

does if have to be on the same sheet?


Does what have to be on the same sheet? The formula?

No

With the criteria on the same sheet as the formula:

=SUMPRODUCT(--(ISNUMBER(MATCH(Sheet1!G2:G6,J2:K2,0))),--(Sheet1!H2:H6=L2))

Hi

[quoted text clipped - 16 lines]
thanks in advance
brian


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/201003/1



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default countif 2 criteria

one last Q before you retire to bed ;-)
how to countif value of 6 (L2), for those not in range J2:K2 ?
regards

T. Valko wrote:
Would like to add 5694 as well as 5710, is this possible


Yes, here's one way...

Use cells to hold the criteria:

J2 = 5710
K2 = 5694
L2 = 6

=SUMPRODUCT(--(ISNUMBER(MATCH(G2:G6,J2:K2,0))),--(H2:H6=L2))

does if have to be on the same sheet?


Does what have to be on the same sheet? The formula?

No

With the criteria on the same sheet as the formula:

=SUMPRODUCT(--(ISNUMBER(MATCH(Sheet1!G2:G6,J2:K2,0))),--(Sheet1!H2:H6=L2))

Hi

[quoted text clipped - 16 lines]
thanks in advance
brian


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/201003/1

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default countif 2 criteria

If I undersatand what you want...

=SUMPRODUCT(--(ISNA(MATCH(G2:G6,J2:K2,0))),--(H2:H6=L2))

--
Biff
Microsoft Excel MVP


"BNT1 via OfficeKB.com" <u19326@uwe wrote in message
news:a5b3395ed298e@uwe...
one last Q before you retire to bed ;-)
how to countif value of 6 (L2), for those not in range J2:K2 ?
regards

T. Valko wrote:
Would like to add 5694 as well as 5710, is this possible


Yes, here's one way...

Use cells to hold the criteria:

J2 = 5710
K2 = 5694
L2 = 6

=SUMPRODUCT(--(ISNUMBER(MATCH(G2:G6,J2:K2,0))),--(H2:H6=L2))

does if have to be on the same sheet?


Does what have to be on the same sheet? The formula?

No

With the criteria on the same sheet as the formula:

=SUMPRODUCT(--(ISNUMBER(MATCH(Sheet1!G2:G6,J2:K2,0))),--(Sheet1!H2:H6=L2))

Hi

[quoted text clipped - 16 lines]
thanks in advance
brian


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/201003/1



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default countif 2 criteria

yep- thank you again

T. Valko wrote:
If I undersatand what you want...

=SUMPRODUCT(--(ISNA(MATCH(G2:G6,J2:K2,0))),--(H2:H6=L2))

one last Q before you retire to bed ;-)
how to countif value of 6 (L2), for those not in range J2:K2 ?

[quoted text clipped - 27 lines]
thanks in advance
brian


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/201003/1

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default countif 2 criteria

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"BNT1 via OfficeKB.com" <u19326@uwe wrote in message
news:a5baf921c4105@uwe...
yep- thank you again

T. Valko wrote:
If I undersatand what you want...

=SUMPRODUCT(--(ISNA(MATCH(G2:G6,J2:K2,0))),--(H2:H6=L2))

one last Q before you retire to bed ;-)
how to countif value of 6 (L2), for those not in range J2:K2 ?

[quoted text clipped - 27 lines]
thanks in advance
brian


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/201003/1



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
COUNTIF criteria bikerhal Excel Worksheet Functions 2 April 15th 08 08:07 PM
COUNTIF with various criteria NitaMax Excel Discussion (Misc queries) 6 October 4th 07 10:23 AM
countif criteria Chris Morley Excel Worksheet Functions 6 June 17th 06 01:27 PM
Countif using format criteria not number criteria? Rumbla76 Excel Worksheet Functions 1 April 20th 05 05:38 AM
Countif using format criteria....not number criteria? Troy Excel Worksheet Functions 1 April 20th 05 04:50 AM


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