问题
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:
- lowest kcal
- lowest Fat
- lowest Carbs
- highest Protein
- 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