Reputation: 55
I am trying to look at the skill ratings displayed in columns B:G and RETURN the relevant value listed below into column A.
The different permutations I have to cover are below:
All 3's RETURN 3
All 2's RETURN 2
All 1's RETURN 1
Mix of 3's and 2's RETURN 2
Mix of 2's and 1's RETURN 1
Mix of 3's and 1's RETURN 2
Mix of 3's, 2's and 1's return 2
I used the formula below to get as close as possible to the end goal but I soon realised that the data would be inaccurate at some points.
=IF(SUM(B2:G2)=18,3,IF(SUM(B2:G2)=12,2,IF(SUM(B2:G2)=6,1,IF(SUM(B2:G2)<12,1,IF(SUM(B2:G2)<18,2)))))
Thank you in advance for any help you may offer!
Upvotes: 1
Views: 63
Reputation: 152505
This should satisfy all rules:
=IF(AND(AVERAGE(B2:G2)<=2,COUNTIF(B2:G2,3)>0),2,INT(AVERAGE(B2:G2)))
Upvotes: 2