Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
hkslater
 
Posts: n/a
Default Count Based upon Multiple Conditions

I am trying to write a formula that will count the number of new clients who
received a service in a particular month. Where B contains an X value and
where the sum of C:E is greater than 1. With the data sample below the
result should be 2.
A B C D E
Client New Divorce Custody Paternity
2003 1 2
2004 X 1
2005
2006 1 3
2007
2008 X 2

  #2   Report Post  
Max
 
Posts: n/a
Default

One way

With the sample data posted in A1:E7,

Put in F2: =IF(AND(TRIM(B2)="X",SUM(C2:E2)1),"Y","")
Copy down to E7

Then put in F1: =COUNTIF(F2:F7,"Y")
F1 will return the desired count of 1*
(*not 2 as indicated in your post, think there's a typo)

Adapt to suit
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"hkslater" wrote in message
...
I am trying to write a formula that will count the number of new clients

who
received a service in a particular month. Where B contains an X value and
where the sum of C:E is greater than 1. With the data sample below the
result should be 2.
A B C D E
Client New Divorce Custody Paternity
2003 1 2
2004 X 1
2005
2006 1 3
2007
2008 X 2



  #3   Report Post  
Biff
 
Posts: n/a
Default

=3DSUMPRODUCT((B2:B7=3D"X")*(C2:C7+D2:D7+E2:E71))

Biff

-----Original Message-----
One way

With the sample data posted in A1:E7,

Put in F2: =3DIF(AND(TRIM(B2)=3D"X",SUM(C2:E2)1),"Y","")
Copy down to E7

Then put in F1: =3DCOUNTIF(F2:F7,"Y")
F1 will return the desired count of 1*
(*not 2 as indicated in your post, think there's a typo)

Adapt to suit
--
Rgds
Max
xl 97
---
GMT+8, 1=B0 22' N 103=B0 45' E
xdemechanik <atyahoo<dotcom
----
"hkslater" wrote in=20

message
...
I am trying to write a formula that will count the=20

number of new clients
who
received a service in a particular month. Where B=20

contains an X value and
where the sum of C:E is greater than 1. With the data=20

sample below the
result should be 2.
A B C D E
Client New Divorce Custody Paternity
2003 1 2
2004 X 1
2005
2006 1 3
2007
2008 X 2



.

  #4   Report Post  
Max
 
Posts: n/a
Default

Put in F2: =IF(AND(TRIM(B2)="X",SUM(C2:E2)1),"Y","")
Copy down to E7


Typo, sorry .. E7 should read F7
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


  #5   Report Post  
Max
 
Posts: n/a
Default

"Biff" wrote
=SUMPRODUCT((B2:B7="X")*(C2:C7+D2:D7+E2:E71))


That's much neater, Biff !
Cheers
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----


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 using multiple conditions? Muse of Fire New Users to Excel 3 December 29th 04 08:49 PM
Create a total based on multiple conditions is not giving correct. Jacob Excel Worksheet Functions 2 November 4th 04 04:07 AM
count based on two fields- need as quick as possible Johnny O Excel Worksheet Functions 1 November 1st 04 09:52 PM
count based on two fields - need quickly JO Excel Worksheet Functions 1 November 1st 04 09:44 PM
Count rows based on multiple criteria Murph Excel Worksheet Functions 1 October 28th 04 07:13 AM


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