Help with an formula to get the value that is highest present in a Product

93arpan

New Member
Joined
Aug 21, 2023
Messages
7
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hi,

I'm working on an interesting case where I'm trying to capture a value from a column that has highest composition in a product. In this instance, I have 3 Products named A, B, and C. Each Product has different ingredients in its
Product A has Rice, Milk Solids, and Xantham Gum, with 60% of Rice, 10% of Milk Solids and 40% of Xantham Gum
Similarly, Product B has only one ingredient named Milk Solids which is 100%
Product C has Sugar (30%), Palm Oil (60%), and Rice (10%).

I'm trying to categories a product based on ingredient. For example if Product A has 60% Rice which is highest compared to all the other ingredient, then give me "Rice" next to Product A everywhere. And, in the case of Product C give me Palm Oil which is the highest with 60%.

1740030075420.png

The problem that I'm facing is that Rice is getting repeated.

Can anyone please suggest an solution to it

Thanks,
 

Attachments

  • 1740029999285.png
    1740029999285.png
    26.2 KB · Views: 2
May be something like this,
Excel Formula:
=INDEX($A$3:$A$9, MATCH(1, ($B$3:$B$9=$B3)*($C$3:$C$9=MAXIFS($C$3:$C$9, $B$3:$B$9, $B3)), 0))
 
Upvote 0
For the future, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. ;)
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)

I'm guessing that it is possible that two (or more) ingredients could be equal highest in a product (eg product D below)

25 02 20.xlsm
BCDE
3RiceProduct A60Rice
4Milk SolidsProduct A10Rice
5Xantham GumProduct A40Rice
6Milk SolidsProduct B100Milk Solids
7SugarProduct C30Palm Oil
8Palm OilProduct C60Palm Oil
9RiceProduct C10Palm Oil
10SugarProduct D40Sugar, Rice
11Palm OilProduct D20Sugar, Rice
12RiceProduct D40Sugar, Rice
Highest present
Cell Formulas
RangeFormula
E3:E12E3=TEXTJOIN(", ",,FILTER(B$3:B$12,(C$3:C$12=C3)*(D$3:D$12=MAXIFS(D$3:D$12,C$3:C$12,C3))))
 
Upvote 0

Forum statistics

Threads
1,226,837
Messages
6,193,253
Members
453,784
Latest member
Chandni

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