Trying to find most common value with 2 criteria

shukero

Board Regular
Joined
Dec 3, 2015
Messages
60
Hello everyone,

I have a table of data that contains a list of requests (and their specifics) which come into our team. These specifics include the creator, created date, type of request (IE: Issue type), etc.

I'm trying to have an excel formula find the most common user per request, type per year. (IE: I have two search criterias: a) That the request be between 1/1/2020 & 12/31/2020, & b) That the request type be a specific type of request - "Request Type #1".

I have all my data combined into one table, and I've labelled specific columns with user friendly terms for my formulas:
"Creator" = The User who created the request
"Created Date" = The date the request was created
"Request_Type" = The type of request I'm searching for within this particular formula

So far I've tried variations for the following but haven't gotten anywhere due to the date "IF" statement always coming up as a "#N/A".
Excel Formula:
=INDEX(Creator,MODE(IF(AND(Request_Type="Request Type #1", Created_Date<DATEVALUE("01/01/2021")), MATCH(Creator,Creator,0))))

Can someone please help me?

Thanks,
Mike
 

Some videos you may like

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
1,673
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Please upload your example file & Desired Results with XL2BB ADDIN (Preferable) OR upload it at free uploading site e.g. www.dropbox.com or googledrive or onedrive and insert link here.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,737
Office Version
  1. 365
Platform
  1. Windows
As you are dealing with an array the formula should be
Excel Formula:
=INDEX(Creator,MODE(IF((Request_Type="Request Type A")*(Created_Date<DATEVALUE("01/01/2021")), MATCH(Creator,Creator,0))))
 
Solution

shukero

Board Regular
Joined
Dec 3, 2015
Messages
60
Thanks Fluff,

That worked! So since I named several of my columns for ease of use within formulas I needed to add the "*" and remove the "AND" part of the formula. Just out of curiosity, what does the "*" represent within a formula? is that an array replacement for "AND"?

Thanks,
Mike
 

Watch MrExcel Video

Forum statistics

Threads
1,128,016
Messages
5,628,150
Members
416,296
Latest member
smartua

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
Top