Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to count a coloum if two conditions are met

I want to count the number of entries in a column if its value = X but only
if another column = Y, kind of like merging two countif statemnts
so one countif is
=COUNTIF(STATS!E:E,B3) where coloum B is a list of persons' initials
and the second is
=countif(STATS!I:I,"ONLINE")

So I want to count the number of rows with "online" in colomn I, but only on
row's where coloum E = the value in B3

I have tried the following formula
{=COUNT(IF(STATS!E:E=B3,IF(STATS!I:I="ONLINE",STAT S!I:I)))}
as an array function, but it isn't working

What else can I do?

Thanks



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default How to count a coloum if two conditions are met

Hi,

Try this

=SUMPRODUCT((E1:E20=B3)*(I1:I20="Online"))

ir if the formula is on another sheet

=SUMPRODUCT((Stats!E1:E20=B3)*(Stats!I1:I20="Onlin e"))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Mr Fujisawa" wrote:

I want to count the number of entries in a column if its value = X but only
if another column = Y, kind of like merging two countif statemnts
so one countif is
=COUNTIF(STATS!E:E,B3) where coloum B is a list of persons' initials
and the second is
=countif(STATS!I:I,"ONLINE")

So I want to count the number of rows with "online" in colomn I, but only on
row's where coloum E = the value in B3

I have tried the following formula
{=COUNT(IF(STATS!E:E=B3,IF(STATS!I:I="ONLINE",STAT S!I:I)))}
as an array function, but it isn't working

What else can I do?

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 376
Default How to count a coloum if two conditions are met

Hi

Try
=SUMPRODUCT(--($E$1:$E$100=B3),--($I$1:$I$1000="ONLINE"),$I$1:$I$1000)
--
Regards
Roger Govier

Mr Fujisawa wrote:
I want to count the number of entries in a column if its value = X but only
if another column = Y, kind of like merging two countif statemnts
so one countif is
=COUNTIF(STATS!E:E,B3) where coloum B is a list of persons' initials
and the second is
=countif(STATS!I:I,"ONLINE")

So I want to count the number of rows with "online" in colomn I, but only on
row's where coloum E = the value in B3

I have tried the following formula
{=COUNT(IF(STATS!E:E=B3,IF(STATS!I:I="ONLINE",STAT S!I:I)))}
as an array function, but it isn't working

What else can I do?

Thanks



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 563
Default How to count a coloum if two conditions are met

=SUMPRODUCT(--(STATS!E$1:E$100=B3),--(STATS!I$1:I$100="ONLINE"))
You cannot use full column references with SUMPRODUCT (except with Excel
2007) so you need to adjust the ranges in this formula.

In Excel 2007
EITHER:
=SUMPRODUCT(--(STATS!E:E=B3),--(STATS!I:I="ONLINE"))
OR you can use COUNTIFS (note the final S)
=COUNTIFS(STATS!E:E,B3,STATS!I1:I,"ONLINE")
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme


"Mr Fujisawa" <Mr wrote in message
...
I want to count the number of entries in a column if its value = X but
only
if another column = Y, kind of like merging two countif statemnts
so one countif is
=COUNTIF(STATS!E:E,B3) where coloum B is a list of persons' initials
and the second is
=countif(STATS!I:I,"ONLINE")

So I want to count the number of rows with "online" in colomn I, but only
on
row's where coloum E = the value in B3

I have tried the following formula
{=COUNT(IF(STATS!E:E=B3,IF(STATS!I:I="ONLINE",STAT S!I:I)))}
as an array function, but it isn't working

What else can I do?

Thanks





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How to count a coloum if two conditions are met

Thank's for the replies everyone, each one worked.

"Mr Fujisawa" wrote:

I want to count the number of entries in a column if its value = X but only
if another column = Y, kind of like merging two countif statemnts
so one countif is
=COUNTIF(STATS!E:E,B3) where coloum B is a list of persons' initials
and the second is
=countif(STATS!I:I,"ONLINE")

So I want to count the number of rows with "online" in colomn I, but only on
row's where coloum E = the value in B3

I have tried the following formula
{=COUNT(IF(STATS!E:E=B3,IF(STATS!I:I="ONLINE",STAT S!I:I)))}
as an array function, but it isn't working

What else can I do?

Thanks



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 with conditions? Geo Excel Discussion (Misc queries) 10 August 17th 09 01:59 AM
Regonise coloum A while adding up coloum B to give a result in C B.H.JIG Excel Discussion (Misc queries) 3 May 3rd 07 01:25 PM
how do i count the number of cells used in a coloum? mjm Excel Discussion (Misc queries) 2 August 7th 06 08:10 PM
Count with 2 conditions, second one OR [email protected] Excel Worksheet Functions 2 June 4th 06 05:55 PM
Count ifs - 2 conditions Nick Excel Discussion (Misc queries) 5 January 12th 06 05:06 PM


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