Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Count values with conditions

Hi!

I have a sheet with 3 rows (A- date; B-first_name; C-last_name) - see
http://users.kiss.si/~k4ef2308/images/1.jpg for screenshot.

I would like to count a number of (for example) cells with values John
(in row B ) Smith (in row C) for a certain period, let's say April (row
A). I need a review for certain people and for certain period. See
http://users.kiss.si/~k4ef2308/images/2.jpg for screenshot.

How should I write formula?

Tnx, Elvis

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 179
Default Count values with conditions

try this one:
=COUNT(IF((date=A2:A20)*(B2:B20="John")*(C2:C20=" smith"),1))
change date to which date you want.
Example for April month:
=COUNT(IF((A2:A20=DATEVALUE("4/1/2006"))*(A2:A20<=DATEVALUE("4/30/2006"))*(B2:B20="john")*(C2:C20="smith"),1))

Note: this is Array function, so once you entered function to purticular
cell, press Ctrl+Shift+Enter key




"ElvisS" wrote:

Hi!

I have a sheet with 3 rows (A- date; B-first_name; C-last_name) - see
http://users.kiss.si/~k4ef2308/images/1.jpg for screenshot.

I would like to count a number of (for example) cells with values John
(in row B ) Smith (in row C) for a certain period, let's say April (row
A). I need a review for certain people and for certain period. See
http://users.kiss.si/~k4ef2308/images/2.jpg for screenshot.

How should I write formula?

Tnx, Elvis


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Count values with conditions

Try:

=SUMPRODUCT(--(B2:B100="John"),--(C2:C100="Smith"),--(Month(A2:A100)=4))

The "John" , "Smith" and "4" (April) can be cell references.

=SUMPRODUCT(--(B2:B100)X1),--(C2:C100=X2),--(Month(A2:A100)=X3))

I received an error when trying to view your 2.jpg file so I was unable to
see your report format.

HTH

"ElvisS" wrote:

Hi!

I have a sheet with 3 rows (A- date; B-first_name; C-last_name) - see
http://users.kiss.si/~k4ef2308/images/1.jpg for screenshot.

I would like to count a number of (for example) cells with values John
(in row B ) Smith (in row C) for a certain period, let's say April (row
A). I need a review for certain people and for certain period. See
http://users.kiss.si/~k4ef2308/images/2.jpg for screenshot.

How should I write formula?

Tnx, Elvis


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Count values with conditions

=SUMPRODUCT(--(MONTH(A2:A20)=4),--(B2:B20="John"),--(C2:C20="Smith"))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"ElvisS" wrote in message
ups.com...
Hi!

I have a sheet with 3 rows (A- date; B-first_name; C-last_name) - see
http://users.kiss.si/~k4ef2308/images/1.jpg for screenshot.

I would like to count a number of (for example) cells with values John
(in row B ) Smith (in row C) for a certain period, let's say April (row
A). I need a review for certain people and for certain period. See
http://users.kiss.si/~k4ef2308/images/2.jpg for screenshot.

How should I write formula?

Tnx, Elvis



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Count values with conditions

....typo ....

=SUMPRODUCT(--(B2:B100=X1),--(C2:C100=X2),--(Month(A2:A100)=X3))


"Toppers" wrote:

Try:

=SUMPRODUCT(--(B2:B100="John"),--(C2:C100="Smith"),--(Month(A2:A100)=4))

The "John" , "Smith" and "4" (April) can be cell references.

=SUMPRODUCT(--(B2:B100)X1),--(C2:C100=X2),--(Month(A2:A100)=X3))

I received an error when trying to view your 2.jpg file so I was unable to
see your report format.

HTH

"ElvisS" wrote:

Hi!

I have a sheet with 3 rows (A- date; B-first_name; C-last_name) - see
http://users.kiss.si/~k4ef2308/images/1.jpg for screenshot.

I would like to count a number of (for example) cells with values John
(in row B ) Smith (in row C) for a certain period, let's say April (row
A). I need a review for certain people and for certain period. See
http://users.kiss.si/~k4ef2308/images/2.jpg for screenshot.

How should I write formula?

Tnx, Elvis


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
How to Search, Count, Match and Post Values vincentws Excel Worksheet Functions 4 August 17th 06 05:20 PM
get a single count after looking up a set of values andy62 Excel Worksheet Functions 3 July 13th 06 10:48 AM
How to count the number of 'values' in a cell Sandih Excel Worksheet Functions 1 July 11th 06 09:00 AM
Getting Count field to recognise rows with negative values in Exc. hamish Excel Worksheet Functions 2 June 20th 05 05:06 AM
Count Unique Values annie Excel Worksheet Functions 1 June 9th 05 07:19 AM


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