Count where the condition1 is a specific value and where condition2 is a date range

standardtoaster

New Member
Joined
Feb 9, 2012
Messages
1
Hello!

I'm trying to count all P1, P2 and P3 problems opened in January 2012, in Sheet1.
All of my problems are listed in Sheet2.

My challenge is Sheet2 contains problems opened on other dates, and I can't figure out how to count where the condition1 is a specific value and where condition2 is a date range.

This is how I have been thinking about it...

Code:
If Sheet2!B:B equals "P1" and Sheet2!C:C equals a date in January 2012
 
     Then count, and store value in Sheet1!B3
Excel Workbook
CDE
1Problems by Priority
2PriorityJanuaryYTD
3P1 - Critical
4P2 - High
5P3 - Average
Sheet1
Excel 2003
Excel Workbook
ABC
1PROBLEMS: ROTATING LIST
2Problem IDPriorityOpen Time
3PM00000310P3Wed 12/21/11
4PM00000116P2Thu 9/8/11
5PM00000092P2Mon 8/22/11
6PM00000321P2Thu 1/5/12
7PM00000350P2Mon 1/30/12
8PM00000223P2Wed 11/2/11
9PM00000344P2Wed 1/25/12
10PM00000348P1Fri 1/27/12
11PM00000277P1Thu 12/1/11
12PM00000346P1Wed 1/25/12
13PM00000119P2Tue 9/13/11
14PM00000322P3Fri 1/6/12
15PM00000307P2Mon 12/19/11
16PM00000296P2Mon 12/12/11
17PM00000312P2Thu 12/22/11
18PM00000161P2Mon 10/3/11
19PM00000347P1Wed 1/25/12
Sheet2
Excel 2003
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Try

Code:
=SUMPRODUCT(($C$B:$B$19="P1")*(MONTH($C$3:$C$19)=1)*(YEAR($C$3:$C$19)=2012))

and let me know, whether it is waht you wanted to have. Of course you should modify the ranges to fit your data location.

Best,

J.Ty.
 
Upvote 0
Try

Code:
=SUMPRODUCT(($C$B:$B$19="P1")*(MONTH($C$3:$C$19)=1)*(YEAR($C$3:$C$19)=2012))

and let me know, whether it is what you wanted to have. Of course you should modify the ranges to fit your data location.

Best,

J.Ty.
 
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,103
Members
452,379
Latest member
IainTru

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top