Note that your result in B4 is not actually 20. It is actually 20.38888889
So not sure if you wanted to use the actual result or the rounded resulted.
If you want to use actual result then:
=SUMIF(A5:A113,"<="&B4)+COUNTIF(A5:A113,">"&B4)*B4
gives 17.38
If you want to use the rounded result, then:
=SUMIF(A5:A113,"<="&ROUND(B4,0))+COUNTIF(A5:A113,">"&ROUND(B4,0))*ROUND(B4,0)
gives 16.60
Is that what you were looking for?
Bookmarks