Formula/Math question (weights)

carlidee

New Member
Joined
Sep 15, 2020
Messages
21
Office Version
  1. 2016
Platform
  1. Windows
Hello, this perhaps skews more on the side of a math question, but this group tends to hit the nail on the head, so I figure I could try tossing it out there! Once the structure is defined I plan to translate into a formula to auto calc. I think the solution has something to do with weighing...

Example scenario: How many of each of these categories have you eaten this week?

  • Vegetables: Carrots, Cucumbers, Tomatoes, Broccoli, Squash
  • Fruits: Strawberries, Peaches, Apples, Pears
  • Dairy: Milk, Cheese, Yogurt

Person 1 Responses:
Vegetables: 1
Fruits: 3
Dairy: 0

Person 2 Response:

Vegetables: 3
Fruits: 1
Dairy: 0

Person 3 Responses:
Vegetables: 2
Fruits: 1
Dairy: 1

Desired outcome: I'm looking to come up with "Vegetable", "Fruit" and "Dairy" scores that gives equal weight to selections. For example right now, if one vegetable is selected then that equals 20% (1/5) for that category, if one fruit selected then that equals 25% (1/4) for that category, if one Dairy is selected then that equals 33% (1/3) for that category. I don't want someone's score for selecting one from the Vegetable category to be an inherently lower score than selecting one from Fruits just because the denominator is higher. Any thoughts??
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
My thought is that you should divide the sum of each persons responses by the total number of items. Format as percent with whatever number of decimal places you want. I used 2.

Book2
ABCDEF
1Vegetables Carrots, Cucumbers, Tomatoes, Broccoli, Squash
2Fruits Strawberries, Peaches, Apples, Pears
3Dairy Milk, Cheese, Yogurt
4
5
6Person 1 Responses
7Vegetables133.33%
8Fruits3
9Dairy0
10
11Person 2 Response
12Vegetables333.33%
13Fruits1
14Dairy0
15
16Person 3 Responses
17Vegetables341.67%
18Fruits1
19Dairy1
Sheet1
Cell Formulas
RangeFormula
C7,C17,C12C7=SUM(B7:B9)/12
 
Upvote 0
This is a common thing in earth sciences (my background) when calculating mineral grades over intervals. For example, if I have 9m at 2% grade and 1m at 20% the average grade for the entire 10m is not 11% (22/2) but rather 3.8%.
The general form of the equation is (v1*w1 + v2*w2 + ... + vn*wn)/sum(w1,w2,...,wn) where v is the value to be averaged and w is the weight to be applied.
In your case the v is the persons response for each category, and the weight is the number of items in those respective categories. Multiplying these out and dividing by the sum of the weights gives a score for each person.

Book1
ABC
1Weighting factor
2Vegetables5
3Fruits4
4Dairy3
5
6
7Person 1 ResponsesScore
8Vegetables11.42
9Fruits3
10Dairy0
11
12Person 2 Response
13Vegetables31.58
14Fruits1
15Dairy0
16
17Person 3 Responses
18Vegetables31.83
19Fruits1
20Dairy1
Sheet1
Cell Formulas
RangeFormula
C8,C18,C13C8=(B8*$B$2+B9*$B$3+B10*$B$4)/SUM($B$2:$B$4)
 
Upvote 0
So you want to give a score based on how many items a person has eaten in total? That is, for example if one person has eaten 3 vegetables and 1 fruit (4 in total), that person should get the same scores as a persona who has eaten 1 vegetable, 1 fruit, and 2 dairies (also 4 in total)?
 
Upvote 0

Forum statistics

Threads
1,223,880
Messages
6,175,157
Members
452,615
Latest member
bogeys2birdies

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