Column Statistics (MODEIF)

jehuh

New Member
Joined
Dec 9, 2021
Messages
9
Office Version
  1. 2016
Platform
  1. Windows
Hello Everyone,

I've run into a bit of a snag here and would like to know if anyone has a simpler solution. I have a data set with 3 columns that I want to analyze. Here is a visual:

IDENTIFIER CATEGORY MODE
SPARK PLUG KEEP KEEP
BRAKE PAD TAKE TAKE
SPARK PLUG KEEP KEEP
SPARK PLUG REMAIN KEEP

I have a little over 220k rows and am trying to use a simpler formula to return the most frequent instance of the CATEGORY column based on the value in the IDENTIFIER column in the MODE column. So in this case, for SPARK PLUG the most common CATEGORY is "KEEP" which what I want to return in the MODE column every time SPARK PLUG appears.

currently I have this array formula:

=INDEX($Q$2:$Q$246076,MODE(IF($P$2:$P$246076=P2,MATCH($Q$2:$Q$246076,$Q$2:$Q$246076,0))))

It takes hours for this to run due to the sheer size of the dataset and I can break it up because there could be multiple instances of the IDENTIFIER in my data. Any simpler solutions?

thanks!
 

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.

Forum statistics

Threads
1,214,388
Messages
6,119,227
Members
448,878
Latest member
Da9l87

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