View Single Post
 
Old 07-15-2016, 06:13 AM
tinfanide tinfanide is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default Simplify "If + SUM + LARGE"?

Code:
{=IF(COUNT(C1:I1)>=5,SUM(LARGE(C1:I1,{1,2,3,4,5})),IF(COUNT(C1:I1)=4,SUM(LARGE(C1:I1,{1,2,3,4})),IF(COUNT(C1:I1)=3,SUM(LARGE(C1:I1,{1,2,3})),IF(COUNT(C1:I1)=2,SUM(LARGE(C1:I1,{1,2})),IF(COUNT(C1:I1)=1,SUM(LARGE(C1:I1,1)))))))}
The codes are like this:
Count how many mark entries (max. = 7, min. = 1). If more than 4, count best 5. If equal to or fewer than 4, count the total (if 4 entries, count best 4; 3, count best 3 ...)
"Count best 5" means to sum the best 5 mark entries.


Is there any way to simplify the codes?
Reply With Quote