Need to identify highest frequency value with multiple duplicates and break ties

%3CLINGO-SUB%20id%3D%22lingo-sub-1271061%22%20slang%3D%22en-US%22%3ENeed%20to%20identify%20highest%20frequency%20value%20with%20multiple%20duplicates%20and%20break%20ties%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1271061%22%20slang%3D%22en-US%22%3E%3CP%3EI've%20got%20a%20spread%20sheet%20where%20I%20track%20defective%20parts%20in%20one%20column%20and%20the%20corresponding%20costs%20associated%20with%20each%20instance%20in%20another%20column.%26nbsp%3B%20Because%20these%20parts%20are%20inspected%20in%20small%20batches%20there%20are%20frequent%20duplicate%20values%20of%20multiple%20parts%2C%20and%20often%20there%20are%20ties%2C%20ie%20part%20xxx%2C%20yyy%20and%20zzz%20may%20each%20show%20up%203%20different%20times%20on%20this%20list.%26nbsp%3B%20I%20want%20a%20formula%20to%20identify%20the%20part%20with%20the%20highest%20frequency%2C%20and%20when%20there%20are%20ties%20I%20want%20to%20break%20that%20tie%20by%20highest%20total%20cost%20for%20each%20part.%26nbsp%3B%20Right%20now%20I'm%20using%20INDEX%2C%20MODE.MULT%20and%20MATCH%20to%20identfy%20all%20duplicates%20and%20the%20total%20cost%20of%20each%20duplicate%20part%2C%20but%20considering%20this%20is%20a%20rolling%207%20day%20record%20I%20really%20just%20want%20the%20most%20costly%20part%20to%20help%20quickly%20identify%20what%20job%20processes%20need%20to%20be%20looked%20at%20for%20issues.%26nbsp%3B%20Is%20there%20a%20single%20formula%20I%20can%20use%20to%20do%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1271061%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1271228%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20identify%20highest%20frequency%20value%20with%20multiple%20duplicates%20and%20break%20ties%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1271228%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F604288%22%20target%3D%22_blank%22%3E%40mclawren%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20don't%20mention%20the%20%3CSTRONG%3EMAX%3C%2FSTRONG%3E%20function%20as%20one%20you've%20tried%20to%20incorporate.%20From%20what%20you've%20described%2C%20not%20seeing%20your%20actual%20sheet%2C%20it's%20something%20I'd%20suggest....%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1271480%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20identify%20highest%20frequency%20value%20with%20multiple%20duplicates%20and%20break%20ties%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1271480%22%20slang%3D%22en-US%22%3EThanks%2C%20I%20used%20that%20in%20conjunction%20with%20all%20the%20date%20my%20INDEX%20formulas%20gave%20me%20and%20got%20the%20info%20I%20wanted%2C%20but%20it's%20still%20rather%20messy.%20This%20is%20something%20I%20see%20using%20repeatedly%20so%20I'm%20hoping%20to%20find%20a%20single%20(complex)%20formula%20that%20might%20do%20this%2C%20if%20that's%20possible%20that%20is.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1271522%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20identify%20highest%20frequency%20value%20with%20multiple%20duplicates%20and%20break%20ties%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1271522%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F604288%22%20target%3D%22_blank%22%3E%40mclawren%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20hoping%20to%20find%20a%20single%20(complex)%20formula%20that%20might%20do%20this%2C%20if%20that's%20possible%20that%20is.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESingle%20complex%20formulas%20are%20possible%2C%20of%20course.%20They're%20also%20nightmares.%20Most%20texts%20on%20Excel%20warn%20against%20them%20unless%20they're%20unavoidable.%20They're%20awfully%20fun%20to%20write%2C%20cause%20for%20celebration%20when%20they%20first%20work.%3C%2FP%3E%3CP%3EBut%20then%20three%20months%20later%20when%20you%20need%20to%2C%20uh%2C%20fix%20something%20again%2C%20they're%20oh-so-hard%20to%20deconstruct%20and%20remember%20what%20(this%20(nested%20function%20(did%20inside%20of%20(yet%20another%20nested%20conditional%2C%20(etc.%2C%20(etc.%2C%20))))))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFar%20preferable%20(IMHO)%20to%20write%20formulas%20in%20adjacent%20columns%20(helper%20columns)%20that%20finally%20deliver%20the%20desired%20result%2C%26nbsp%3B%20each%20of%20which%20can%20be%20comprehended%20at%20a%20glance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1271573%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20to%20identify%20highest%20frequency%20value%20with%20multiple%20duplicates%20and%20break%20ties%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1271573%22%20slang%3D%22en-US%22%3EThis%20is%20the%20first%20time%20in%20my%20career%20I've%20gotten%20this%20in%20depth%20with%20excel%2C%20so%20still%20learning%20a%20lot.%20Thanks%20for%20the%20advice%20and%20that%20does%20make%20sense.%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I've got a spread sheet where I track defective parts in one column and the corresponding costs associated with each instance in another column.  Because these parts are inspected in small batches there are frequent duplicate values of multiple parts, and often there are ties, ie part xxx, yyy and zzz may each show up 3 different times on this list.  I want a formula to identify the part with the highest frequency, and when there are ties I want to break that tie by highest total cost for each part.  Right now I'm using INDEX, MODE.MULT and MATCH to identfy all duplicates and the total cost of each duplicate part, but considering this is a rolling 7 day record I really just want the most costly part to help quickly identify what job processes need to be looked at for issues.  Is there a single formula I can use to do this?

4 Replies
Highlighted

@mclawren 

 

You don't mention the MAX function as one you've tried to incorporate. From what you've described, not seeing your actual sheet, it's something I'd suggest....

Highlighted
Thanks, I used that in conjunction with all the date my INDEX formulas gave me and got the info I wanted, but it's still rather messy. This is something I see using repeatedly so I'm hoping to find a single (complex) formula that might do this, if that's possible that is.
Highlighted

@mclawren 

 

I'm hoping to find a single (complex) formula that might do this, if that's possible that is.

 

Single complex formulas are possible, of course. They're also nightmares. Most texts on Excel warn against them unless they're unavoidable. They're awfully fun to write, cause for celebration when they first work.

But then three months later when you need to, uh, fix something again, they're oh-so-hard to deconstruct and remember what (this (nested function (did inside of (yet another nested conditional, (etc., (etc., ))))))

 

Far preferable (IMHO) to write formulas in adjacent columns (helper columns) that finally deliver the desired result,  each of which can be comprehended at a glance.

Highlighted
This is the first time in my career I've gotten this in depth with excel, so still learning a lot. Thanks for the advice and that does make sense.