Hi guys,
I'm trying to create a VBA loop that does a few things--mainly to restart every 5 calendar days--, but to start out I just need the basic formula to be translated into a VBA formula.
Here's the formula
=(IF(SUM($AX4:$BH4)>=45,SUM(SUMIF($AX$4:$BH$4,LARGE($AX$4:$BH$4,{1,2,3}),$BV4:$CF4))+SUM(SUMIF($AX$4:$BH$4,SMALL($AX$4:$BH$4,{1,2,3}),$BV4:$CF4)),FALSE))
Explained: As it is now, column CH has a formula that takes the sum of the top three and bottom three values in columns BV:CG. The criteria for "top" and "bottom" is based on the ranks in AX:BH--i.e. if a cell's corresponding "rank" is in the top three highest or lowest in all of the ranks of that row, then that cell is added to the sums in CH. However, the same criteria (i.e. the same ranks in AX:BH) applies to five rows in the range BV:CG *The formula also only runs if the sums of all corresponding ranks on that row add up to 45*
Bookmarks