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 Countif with Two Criteria


I have on sheet1 a couple thousand rows of data. A:A contains dates,
B:B contains ID numbers.
on sheet2 I need to know how many instances an ID number shows up on a
selected date. The specified ID number will be in sheet2, A2; the
specified date will be in sheet2, A1. It seems like I want a Countif,
but it only allows for one criteria as far as I know. What kind of
formula do I need for this?
Thanks.


--
ForSale
------------------------------------------------------------------------
ForSale's Profile: http://www.excelforum.com/member.php...o&userid=11896
View this thread: http://www.excelforum.com/showthread...hreadid=574454

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 138
Default Countif with Two Criteria


"ForSale" wrote in
message ...

I have on sheet1 a couple thousand rows of data. A:A contains dates,
B:B contains ID numbers.
on sheet2 I need to know how many instances an ID number shows up on a
selected date. The specified ID number will be in sheet2, A2; the
specified date will be in sheet2, A1. It seems like I want a Countif,
but it only allows for one criteria as far as I know. What kind of
formula do I need for this?
Thanks.



Please have a look at array formulas
(http://www.cpearson.com/excel/array.htm)
This technique allows you to SUM all instances, where an ID number matches a
given date.

Joerg


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Countif with Two Criteria

Hi!

Try this:

=SUMPRODUCT(--(Sheet1!A2:A2000=Sheet2!A1),--(Sheet1!B2:B2000=Sheet2!A2))

You can't use entire columns with Sumproduct. A:A

If the formula will be on Sheet2 you don't need to include the sheet name in
the reference:

=SUMPRODUCT(--(Sheet1!A$2:A$2000=A1),--(Sheet1!B$2:B$2000=A2))

Biff

"ForSale" wrote in
message ...

I have on sheet1 a couple thousand rows of data. A:A contains dates,
B:B contains ID numbers.
on sheet2 I need to know how many instances an ID number shows up on a
selected date. The specified ID number will be in sheet2, A2; the
specified date will be in sheet2, A1. It seems like I want a Countif,
but it only allows for one criteria as far as I know. What kind of
formula do I need for this?
Thanks.


--
ForSale
------------------------------------------------------------------------
ForSale's Profile:
http://www.excelforum.com/member.php...o&userid=11896
View this thread: http://www.excelforum.com/showthread...hreadid=574454



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 statement with 3 criteria checks Malvaro Excel Discussion (Misc queries) 4 June 4th 06 11:40 PM
COUNTIF with two criteria Boran Düzgün Excel Worksheet Functions 3 March 7th 06 10:43 PM
Excel COUNTIF Function - a range as criteria ? joes Excel Worksheet Functions 2 March 6th 06 01:13 PM
Countif w/ Multiple Criteria Patrick_KC Excel Worksheet Functions 2 August 9th 05 09:25 PM
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 05:01 PM.

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"