Countif Max Match

dnelley

New Member
Joined
Apr 25, 2014
Messages
5
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Question:
For the data table below I'd like to count the number of staff leads who had at least one encounter in a specific time frame and the number of these who's last encounter was in a specific region
  • I'd like to accomplish this using a single cell formula/array formula with no helper cells/columns.
    • My table/worksheet is dynamic and i'm interested in using workbook real estate for other data.
    • If it helps in understanding the formula feel free to show the helper cells but use of helper cells is not the way I'd like to do this
    • I'm not good at vba, so, while it may be an option it would be a steeper learning curve for me to understand and implement.
Thanks in advance,
:Dee


#goalexpected resultexplanation
1count number of team members who had an encounter between 7/1/20 and 6/30/219/10Brad, Chin, Dane, Fran, Gigi, Pam, Sam, Sue, Tina, all had at least one encounter in this time frame
Shiela did not
2report the number of leads whose last encounter within the time frame was in the MidWest3/10The last encounter during this time frame for Brad-4/4/21, Sue-9/24/20 and Sam-10/3/20 were in Midwest
All other leads completed a last encounter in other regions



DateRegionLeadCustomerProduct
10/14/2021​
MidWest*TinaAmazonCIN Item
1/7/2021​
SouthEastTinaGoogle DocCOL Item
10/26/2020​
PureWestChinHigh DefAIM Item
5/20/2020​
PureNorthChinOverDoneAIM Item
9/24/2020​
MidWest*SueHigh DefRAD Item
1/14/2021​
MidWest*FranEconomistAIM Item
4/3/2020​
PureWestTinaHigh DefRAD Item
1/20/2021​
NorthEastBradEconomistDAB Item
2/26/2020​
SouthEastTinaH and eMARAD Item
12/16/2021​
MidWest*GigiOverDoneAIM Item
4/5/2020​
NorthEastBradAmazonAIM Item
6/24/2020​
NorthEastTinaYahoo MagRAD Item
8/22/2021​
SouthEastChinMcLendon'sRAD Item
11/9/2021​
NorthEastPamCostco'sCIN Item
3/23/2021​
MidWest*FranHigh DefXOL Item
10/3/2020​
MidWest*SamPeet's NutRAD Item
4/4/2021​
MidWest*BattAmazonAIM Item
1/5/2020​
NorthEastSheliaHigh DefCIN Item
11/6/2021​
NorthEastGigiWomen'sAIM Item
9/25/2021​
SouthEastDaneAmazonXOL Item
11/12/2021​
MidWest*DaneEconomistRAD Item
12/7/2020​
PureWestGigiGoogle DocCIN Item
11/5/2021​
PureNorthSueQuality FCAIM Item
9/30/2021​
NorthEastGigiPeet's NutCIN Item
8/27/2020​
NorthEastFranH and eMAAIM Item
8/18/2021​
NorthEastGigiOverDoneXOL Item
2/19/2020​
PureNorthTinaH and eMARAD Item
12/11/2021​
NorthEastGigiMcLendon'sAIM Item
3/17/2021​
NorthEastPamMcLendon'sCOL Item
12/1/2020​
PureNorthDaneEconomistRAD Item
4/5/2021​
NorthEastFranH and eMANEE Item
6/4/2020​
MidWest*DaneGoogle DocAIM Item
7/19/2021​
PureWestDaneGoogle DocAIM Item
4/25/2020​
PureNorthSueHigh DefCOL Item
9/24/2021​
PureWestSueOverDoneAIM Item
6/17/2020​
MidWest*TinaMcLendon'sNEE Item
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Something like this will do it. I copied your original table to A1 for testing.

copy.xlsx
GHI
27/1/206/30/2110
3Midwest*4
Sheet2
Cell Formulas
RangeFormula
I2I2=IFERROR(ROWS(UNIQUE(FILTER(C2:C37,(A2:A37>=G2)*(A2:A37<=H2)))),0)
I3I3=IFERROR(ROWS(UNIQUE(FILTER(C2:C37,(A2:A37>=G2)*(A2:A37<=H2)*(B2:B37=H3)))),0)
 
Upvote 0

Forum statistics

Threads
1,215,539
Messages
6,125,403
Members
449,222
Latest member
taner zz

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