Distribute values based on weights

vttrian

New Member
Joined
Feb 24, 2023
Messages
7
Office Version
  1. 2021
Platform
  1. Windows
Hello again.

The problem at hand is as following:

Let's say we have 3 people A3:A5 and 3 fruits H3:H5. We need to feed every person a fruit. No two people can have the same fruit. Based on history, we know who has eaten what in the past. We don't want them to eat the same fruit all the time, but rather to alternate. I have managed to find the least of the fruits everyone ate, but when the same value occurs twice, I have a problem.

The goal is to find the Proposal. If the first and second person should eat the same fruit (but not the third), then the first one will eat it and the second will eat the one that is not the first's or the third's. If all three have the same fruit, the fruit will be distributed by the fruits ranking number (first to last).

I thank you all in advance.

Book.xlsx
ABCDEFGH
1PeopleApples in the pastMelons in the pastBerries in the pastWhat he should eatProposalFruit
2
3Allan313MelonMelonApple
4Jack222AppleAppleMelon
5Betty242AppleFALSEBerries
Sheet1
Cell Formulas
RangeFormula
E3E3=IF(MIN(B3:D3)=B3,H3,IF(MIN(B3:D3)=C3, H4,H5))
F3F3=E3
E4E4=IF(MIN(B4:D4)=B4, H3,IF(MIN(B4:D4)=C4, H4,H5))
F4F4=IF(F3<>E4,E4,IF(F3<>E5,E5))
E5E5=IF(MIN(B5:D5)=B5, H3,IF(MIN(B5:D5)=C5,H4,H5))
F5F5=IF(AND(F3<>E5,F4<>E5),E5)
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Distribute values based on weights
and Distribute values based on weights
There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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