Compare Products use multiple properties

自闭症网瘾萝莉.ら 提交于 2021-01-28 06:04:35

问题


I have an Excelsheet and want to compare the products by multiple values. My Excel looks like this:

+-----------+--------+------+-------+---------+-------+
| Name| kcal | Fat | Carbs | Protein | €/kg |
+-----------+--------+------+-------+---------+-------+
| Product A | 383,00 | 5,90 | 6,50 | 76,00 | 21,98 |
| Product B | 359,00 | 0,70 | 3,20 | 85,00 | 24,90 |
| Product C | 380,90 | 5,86 | 8,79 | 73,25 | 32,17 |
| Product D | 390,00 | 5,50 | 5,30 | 80,00 | 18,96 |
+-----------+--------+------+-------+---------+-------+

I would like to find the "best" product by the following criteria:

  1. lowest kcal
  2. lowest Fat
  3. lowest Carbs
  4. highest Protein
  5. lowest €/kg

Is there a way to do this with excel/google docs?

Maybe a little add-on. The highest priority is €/kg, after that Protein and the other three have the same importance.


回答1:


It's a bit vague what would be considered the "best", however you could consider adding all these amounts together (subtract the protein) would give you a matrix in which you can get the minimum.

Try:

=INDEX(A2:A5,MATCH(MIN(INDEX(B2:B5+C2:C5+D2:D5-E2:E5+F2:F5,)),INDEX(B2:B5+C2:C5+D2:D5-E2:E5+F2:F5,),0))

Add a multiplication, e.g.: *1.05 to any of the columns if you consider them to be of more importance.



来源:https://stackoverflow.com/questions/59821291/compare-products-use-multiple-properties

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!