Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default How to do count with if

Hai,

Need a sugestion from you all. I have problem to count my data. For example,
I want to count for each Team how many coaching or counseling had been done.

ColumnA .....ColumnC
TEAM Action
Level 1 Coaching
Level 1 Coaching
Level 2 Caunseling
Level 3 Counseling
Level 2 Coaching
Level 3 Coaching
Level 1 Counseling

I tried using this formula, but it giving me all result as 1

=COUNT(IF((A2:A11="Level 1")*(C2:C11="Coaching"),C2:C11))

And when I tried this formula, the result will be 0

=SUM(IF(A2:A11="Level 1",IF(C2:C11="Coaching",1,0)))

Please help.
--
Thanks! =)
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2,480
Default How to do count with if

Hi

Try
=SUMPRODUCT((A2:A11="Level 1")*(C2:C11="Coaching"))
Instead of using "level1" or "Coaching", you could put those values in say
cells D1 and E1 and use
=SUMPRODUCT((A2:A11=D1)*(C2:C11=E1))

Changing the values in D1 and E1 will give you results for different queries
without changing the formula.

It works because each test produces a result of True or False.
Multiplying them together coerces True to 1 and False to 0 so you end up
with and array of
1 x 1 = 1
1 x 1 = 1
0 x 0 = 0
0 x 0 = 0
0 x 0 = 0
0 x 0 = 0
1 x 0 = 0

which Sumproduct then totals to give a result of 2
--
Regards
Roger Govier

"no-1" wrote in message
...
Hai,

Need a sugestion from you all. I have problem to count my data. For
example,
I want to count for each Team how many coaching or counseling had been
done.

ColumnA .....ColumnC
TEAM Action
Level 1 Coaching
Level 1 Coaching
Level 2 Caunseling
Level 3 Counseling
Level 2 Coaching
Level 3 Coaching
Level 1 Counseling

I tried using this formula, but it giving me all result as 1

=COUNT(IF((A2:A11="Level 1")*(C2:C11="Coaching"),C2:C11))

And when I tried this formula, the result will be 0

=SUM(IF(A2:A11="Level 1",IF(C2:C11="Coaching",1,0)))

Please help.
--
Thanks! =)


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default How to do count with if

Dear Roger,

The formula did help me.

Thank you very much! =)

--
Thanks!


"Roger Govier" wrote:

Hi

Try
=SUMPRODUCT((A2:A11="Level 1")*(C2:C11="Coaching"))
Instead of using "level1" or "Coaching", you could put those values in say
cells D1 and E1 and use
=SUMPRODUCT((A2:A11=D1)*(C2:C11=E1))

Changing the values in D1 and E1 will give you results for different queries
without changing the formula.

It works because each test produces a result of True or False.
Multiplying them together coerces True to 1 and False to 0 so you end up
with and array of
1 x 1 = 1
1 x 1 = 1
0 x 0 = 0
0 x 0 = 0
0 x 0 = 0
0 x 0 = 0
1 x 0 = 0

which Sumproduct then totals to give a result of 2
--
Regards
Roger Govier

"no-1" wrote in message
...
Hai,

Need a sugestion from you all. I have problem to count my data. For
example,
I want to count for each Team how many coaching or counseling had been
done.

ColumnA .....ColumnC
TEAM Action
Level 1 Coaching
Level 1 Coaching
Level 2 Caunseling
Level 3 Counseling
Level 2 Coaching
Level 3 Coaching
Level 1 Counseling

I tried using this formula, but it giving me all result as 1

=COUNT(IF((A2:A11="Level 1")*(C2:C11="Coaching"),C2:C11))

And when I tried this formula, the result will be 0

=SUM(IF(A2:A11="Level 1",IF(C2:C11="Coaching",1,0)))

Please help.
--
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 Employee Work Time - Don't Count Duplicates J Excel Worksheet Functions 3 May 1st 07 10:47 PM
Count Employee Work Time - Don't Double-count Overlapping Apts. J Excel Worksheet Functions 0 April 27th 07 05:52 AM
Excel 2000, count, sort a list & count totals? sunslight Excel Worksheet Functions 1 April 9th 07 05:46 PM
Count Intervals of 1 Numeric value in a Row and Return Count down Column Sam via OfficeKB.com Excel Worksheet Functions 8 October 4th 05 04:37 PM
Count Intervals of Filtered TEXT values in Column and Return Count across a Row Sam via OfficeKB.com Excel Worksheet Functions 9 July 31st 05 03:37 AM


All times are GMT +1. The time now is 10:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"