I apologize for the confusing title, I was not sure how to phrase this question.
I have a (dynamic and constantly updating) database of stocks in column A. In columns B through J, there are names of people who have invested in the stock.
In each group of 4 stocks (so stock 1 through stock 4) each person can choose to invest in ONLY 2 stocks. However, each person does not always participate. For example, Person 10 below did not participate in picking stocks until the second round. And Person 9 only pariticpaed in picking stocks the first round (stocks 1-4).
I want to write a function that can tell me how often each person picked a stock that was in the majority
Stock 1 Person 1 Person 2
Stock 2 Person 3 Person 4 Person 5 Person 6 Person 7 Person 8 Person 9
Stock 3 Person 2 Person 3 Person 4 Person 5 Person 6 Person 1 Person 7 Person 8
Stock 4 Person 9
Stock 5 Person 6 Person 4 Person 3 Person 7 Person 1 Person 10
Stock 6 Person 6 Person 8 Person 4 Person 3 Person 1 Person 10 Person 2
Stock 7 Person 7
Stock 8 Person 2 Person 8
I want to find the percent of times each person was in the majority. For example, Person 10 was in the majority for both of the stocks that he/she picked. Therefore, Person 10 would be 100% (even though Person 10 did NOT vote in the first 4 stocks it should not be counted against his/her percentage).
Person 1, however, participated in picking stocks 1-8 and was in the majority 3/4 times. Her percentage would be 75%.
I honestly don't even know where to begin. The fact that I do not want the stocks a person did not pick between to count against them is making me confused. I hope my explanation makes sense, if anyone has suggestions about the first step to take, I would appreciate it!
Aucun commentaire:
Enregistrer un commentaire