Find the largest amount of instances in column if criteria is met

sharky12345

Well-known Member
Joined
Aug 5, 2010
Messages
3,422
Office Version
  1. 2016
Platform
  1. Windows
I am trying to get a formula to count the values in column I but only if the value in column D is equal to B2. I need the result to be the largest amount of instances of the value found.

In simple terms, and assuming the criteria is met, I need to identify the value that occurs most frequently in column I.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Assuming there would only be one mode, try is formula to identify the value:
This is an array formula and must be entered with CTRL-SHIFT-ENTER.
Excel Workbook
ABCDEFGHI
2311
3355
454
542
635
7210
835
924
1033
11210
1235
1335
Sheet
 
Upvote 0
I am trying to get a formula to count the values in column I but only if the value in column D is equal to B2. [....] assuming the criteria is met, I need to identify the value that occurs most frequently in column I.

Perhaps, the following array-entered formula (press ctrl+shift+Enter instead of just Enter):

=IFERROR(MODE(IF(D2:D1000=B2,I2:I1000)), "none")

If there might be multiple "modes" and you would like all of them, use MODE.MULT instead of MODE. But in that case, select a range of cells that can accommodate the most number of "modes".
 
Upvote 0
Guys,

Thanks - I tried the first one suggested by AhoyNC and it works just fine, but thanks to both!
 
Upvote 0
Just wondering what result you would expect from this set of data and why?


Book1
BCDEFGHI
1
2311
337
454
536
635
7210
838
924
1037
11210
1238
1335
Mode
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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