Spreadsheet: 867822d1714621037-calculating-a-percentage-based-on-rows-above-and-below-test1-1-
Sheet: Sample 2

 | 20 | rows need to count |  |  |  |  |  |  |  |  |  | From row | to row | rows count | Sum ALL | minus | Sum/count |  | Single formula
2824 |  | B0 |  |  |  |  |  | R
2825 |  | B0 |  |  |  |  |  | R
2826 |  | B0 |  |  |  |  |  | R
2827 |  | B0 |  |  |  |  |  | R
2829 |  | B0 |  |  |  |  |  | R
2830 |  | B0 |  |  |  |  |  | R
2832 |  | B0 |  |  |  |  |  | R
2833 |  | B0 |  |  |  |  |  | R
2834 |  | B0 |  |  |  |  |  | R
2837 |  | B0 |  |  |  |  |  | R
2839 |  | B5 |  |  |  |  |  | R
2842 |  | B5 |  |  |  |  |  | R
2843 |  | B0 |  |  |  |  |  | R
2846 |  | B0 |  |  |  |  |  | R
2848 |  | B0 |  |  |  |  |  | R
2851 |  | B0 |  |  |  |  |  | R
2853 |  | B0 |  |  |  |  |  | R
2854 |  | B0 |  |  |  |  |  | R
2855 |  | B0 |  |  |  |  |  | R
2856 |  | B2 |  |  |  |  |  | R
2858 |  | B0 |  |  |  |  |  | R
2862 |  | B0 |  |  |  |  |  | R
2865 |  | B0 |  |  |  |  |  | R
2866 |  | B0 |  |  |  |  |  | R
2871 |  | B0 |  |  |  |  |  | R
2874 |  | B0 |  |  |  |  |  | R
2876 |  | B0 |  |  |  |  |  | R
2877 |  | B0 |  |  |  |  |  | R
2879 |  | B5 |  |  |  |  |  | R
2880 |  | B0 |  |  |  |  |  | R
2883 |  | B0 |  |  |  |  |  | R
2884 |  | B0 |  |  |  |  |  | R
2885 |  | B0 |  |  |  |  |  | R
2886 |  | B0 |  |  |  |  |  | R
2889 |  | B0 |  |  |  |  |  | R
2892 |  | B5 |  |  |  |  |  | R
2893 |  | B0 |  |  |  |  |  | R
2895 |  | B0 |  |  |  |  |  | R
2896 |  | B0 |  |  |  |  |  | R
2897 |  | B0 |  |  |  |  |  | R
2898 |  | B0 |  |  |  |  |  | R
2902 |  | B0 |  |  |  |  |  | R
2903 |  | B0 |  |  |  |  |  | R
2904 |  | B3 |  |  |  |  |  | R
2907 |  | B0 |  |  |  |  |  | R
2908 |  | B0 |  |  |  |  |  | R
2911 |  | B0 |  |  |  |  |  | R
2912 |  | B0 |  |  |  |  |  | R
2913 |  | B0 |  |  |  |  |  | R
2915 |  | B0 |  |  |  |  |  | R
2920 |  | B0 |  |  |  |  |  | R
2921 |  | B0 |  |  |  |  |  | R
2922 |  | B0 |  |  |  |  |  | R
2923 |  | B0 |  |  |  |  |  | R
2925 |  | B0 |  |  |  |  |  | R
2927 |  | B0 |  |  |  |  |  | R
2928 |  | B0 |  |  |  |  |  | R
2929 |  | B0 |  |  |  |  |  | R
2930 |  | B0 |  |  |  |  |  | R
2931 |  | B0 |  |  |  |  |  | R
2932 |  | B0 |  |  |  |  |  | R
2934 |  | B0 |  |  |  |  |  | R
2935 |  | B0 |  |  |  |  |  | R
2936 |  | B0 |  |  |  |  |  | R
2937 |  | B0 |  |  |  |  |  | R
2938 |  | B0 |  |  |  |  |  | R
2939 |  | B0 |  |  |  |  |  | R
2940 |  | B0 |  |  |  |  |  | R
2941 |  | B0 |  |  |  |  |  | R
2942 |  | B0 |  |  |  |  |  | R
2943 |  | B0 |  |  |  |  |  | R
2944 |  | B0 |  |  |  |  |  | R
2945 |  | B0 |  |  |  |  |  | R
2946 |  | B0 |  |  |  |  |  | R
2947 |  | B0 |  |  |  |  |  | R
2948 |  | B0 |  |  |  |  |  | R
2949 |  | B0 |  |  |  |  |  | R
2950 |  | B0 |  |  |  |  |  | R
2951 |  | B0 |  |  |  |  |  | R
2952 |  | B0 |  |  |  |  |  | R
2953 |  | B0 |  |  |  |  |  | R
2954 |  | B0 |  |  |  |  |  | R
2955 |  | B0 |  |  |  |  |  | R
2956 |  | B0 |  |  |  |  |  | R
2957 |  | B0 |  |  |  |  |  | R
2958 |  | B0 |  |  |  |  |  | R
2959 |  | B0 |  |  |  |  |  | R
2960 |  | B0 |  |  |  |  |  | R
2961 |  | B0 |  |  |  |  |  | R
2962 |  | B0 |  |  |  |  |  | R
2963 |  | B0 |  |  |  |  |  | R
2964 |  | B0 |  |  |  |  |  | R
2965 |  | B0 |  |  |  |  |  | R
2966 |  | B0 |  |  |  |  |  | R
2967 |  | B2 |  |  |  |  |  | R
2968 |  | B0 |  |  |  |  |  | R
2969 |  | B0 |  |  |  |  |  | R
2970 |  | B0 |  |  |  |  |  | R
2971 |  | B0 |  |  |  |  |  | R
2972 |  | B3 |  |  |  |  |  | R
2973 |  | B0 |  |  |  |  |  | R
2974 |  | B0 |  |  |  |  |  | R
2975 |  | B0 |  |  |  |  |  | R
2976 |  | B0 |  |  |  |  |  | R
2977 |  | B0 |  |  |  |  |  | R
2978 |  | B0 |  |  |  |  |  | R
2979 |  | B0 |  |  |  |  |  | R
2980 |  | B0 |  |  |  |  |  | R
2981 |  | B0 |  |  |  |  |  | R
2982 |  | B0 |  |  |  |  |  | R
2983 |  | B0 |  |  |  |  |  | R
2984 |  | B0 |  |  |  |  |  | R
2985 |  | B0 |  |  |  |  |  | R
2986 |  | B0 |  |  |  |  |  | R
2987 |  | B0 |  |  |  |  |  | R
2988 |  | B0 |  |  |  |  |  | R
2989 |  | B0 |  |  |  |  |  | R