Count multiple citeria in a date range

zack8pooh

New Member
Joined
Apr 10, 2014
Messages
2
Hi, i am trying to populate a table using a raw data to count using multiple criteria in a data range. Please refer to the attached file. Based on the team and task, i would like to count following a criteria to dertermine the number of occurrence based on the dates given. Also needed to search the count following a criteria for a specific date range.

Team</SPAN>Task</SPAN>Date</SPAN>
Team</SPAN>Task</SPAN>Date</SPAN>Today</SPAN>Next 2 -3 days</SPAN>Next 4 - 6 days</SPAN>> 6 days</SPAN>
Alpha</SPAN>Inbound </SPAN>4/11/2014</SPAN>Alpha</SPAN>Inbound</SPAN>1</SPAN>
Charlie</SPAN>Outbound</SPAN>4/12/2014</SPAN> Outbound</SPAN>
Delta</SPAN>Data</SPAN>4/10/2014</SPAN> Data</SPAN>
Alpha</SPAN>Outbound</SPAN>4/12/2014</SPAN>Charlie</SPAN>Inbound</SPAN>
Alpha</SPAN>Outbound</SPAN>4/15/2014</SPAN> Outbound</SPAN>
Delta</SPAN>Data</SPAN>4/13/2014</SPAN> Data</SPAN>
Charlie</SPAN>Inbound </SPAN>4/14/2014</SPAN>Delta</SPAN>Inbound</SPAN>
Charlie</SPAN>Inbound </SPAN>4/11/2014</SPAN> Outbound</SPAN>
Charlie</SPAN>Inbound </SPAN>4/12/2014</SPAN> Data</SPAN>1</SPAN>
Delta</SPAN>Inbound </SPAN>4/13/2014</SPAN>
Alpha</SPAN>Inbound </SPAN>4/10/2014</SPAN>Today = 4/10/2014</SPAN>

<TBODY>
</TBODY><COLGROUP><COL><COL><COL><COL span=3><COL><COL span=6></COLGROUP>



Example:
Team Alpha - Inbound - Date (4/10/2014) = 1
Team Charlie - Inbound - Date (4/10/2014) = 0

Team Delta - Outbound - Date (Next 4-6 day) = ?


I have tried multiple formulas but didn't work (Index/ Match, Vlookup, Countif, Sumproduct). Need you assistance on this especially on the date range.


Thank you.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
You might want to consider not using merged cells in your data because it makes writing formulas a little challenging.

As it is, I put todays date in separate columns.

I'm also kind of stuck at a better way of handling your date ranges so you probably need to play with that a little.

maybe someone else has a better way of handling the dates

Excel 2012
ABCDEFGHIJ
1TeamTaskDate
2TeamTaskDateTodayNext 2 -3 daysNext 4 - 6 days> 6 days
3AlphaInbound4/11/2014AlphaInbound1220
4CharlieOutbound4/12/2014Outbound0111
5DeltaData4/10/2014Data0000
6AlphaOutbound4/12/2014CharlieInbound0221
7AlphaOutbound4/25/2014Outbound0110
8DeltaData4/13/2014Data0000
9CharlieInbound4/25/2014DeltaInbound0010
10CharlieInbound4/11/2014Outbound0000
11CharlieInbound4/12/2014Data1120
12DeltaInbound4/13/2014
13AlphaInbound4/10/2014Today =4/10/2014

<tbody>
</tbody>
Sheet5

Worksheet Formulas
CellFormula
G3=COUNTIFS($A$3:$A$13,LOOKUP("zzzz",$E$3:E3),$B$3:$B$13,$F3,$C$3:$C$13,"="&$G$13)
H3=COUNTIFS($A$3:$A$13,LOOKUP("zzzz",$E$3:E3),$B$3:$B$13,$F3,$C$3:$C$13,"<="&$G$13+2)
I3=COUNTIFS($A$3:$A$13,LOOKUP("zzzz",$E$3:E3),$B$3:$B$13,$F3,$C$3:$C$13,"<="&$G$13+6)
J3=COUNTIFS($A$3:$A$13,LOOKUP("zzzz",$E$3:E3),$B$3:$B$13,$F3,$C$3:$C$13,">"&$G$13+6)

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
There are more variations of sumproduct solutions that work than I show here. The formulas in G2:J2 are copied down the columns.
Excel Workbook
ABCDEFGHIJ
1TeamTaskDate*TeamTaskTodayNext 2 -3 daysNext 4 - 6 days> 6 days
2AlphaInbound04/11/2014*AlphaInbound1100
3CharlieOutbound04/12/2014*AlphaOutbound0101
4DeltaData04/10/2014*AlphaData0000
5AlphaOutbound04/12/2014*CharlieInbound0201
6AlphaOutbound04/25/2014*CharlieOutbound0100
7DeltaData04/13/2014*CharlieData0000
8CharlieInbound04/25/2014*DeltaInbound0010
9CharlieInbound04/11/2014*DeltaOutbound0000
10CharlieInbound04/12/2014*DeltaData1010
11DeltaInbound04/13/2014*******
12AlphaInbound04/10/2014*Today =04/10/2014****
Sheet
 
Upvote 0

Forum statistics

Threads
1,214,925
Messages
6,122,303
Members
449,078
Latest member
nonnakkong

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