Hoping for some guidance - thought this would be straightforward but cannot solve it. In its most simplistic form I have 3 columns as shown below. I want to know the frequency with which the difference between the value in column A and the corresponding cell (same row) in B is ">5" (A-B), and the corresponding row in column C is "<30". I could of course create another column D [=if(A-B>5,1,0)] then use '=countifs(D:D,1,C:C,"<30") to retrieve the answer but as there will be many columns with different parameters this would require many additional columns needing to be created and will get unwieldy. I have fiddled around with SUMPRODUCT to try and get to the answer but have not had any luck. ANy help would be greatly appreciated. Thanks in advance.

** A B C**

[TABLE="width: 192"]

[TD="width: 64, align: right"]18[/TD]

[TD="width: 64, align: right"]9[/TD]

[TD="width: 64, align: right"]40[/TD]

[TD="align: right"]8[/TD]

[TD="align: right"]4[/TD]

[TD="align: right"]29[/TD]

[TD="align: right"]17[/TD]

[TD="align: right"]10[/TD]

[TD="align: right"]41[/TD]

[TD="align: right"]19[/TD]

[TD="align: right"]10[/TD]

[TD="align: right"]29[/TD]

[TD="align: right"]12[/TD]

[TD="align: right"]10[/TD]

[TD="align: right"]31[/TD]

[TD="align: right"]6[/TD]

[TD="align: right"]12[/TD]

[TD="align: right"]29[/TD]

[TD="align: right"]11[/TD]

[TD="align: right"]5[/TD]

[TD="align: right"]43[/TD]

[TD="align: right"]16[/TD]

[TD="align: right"]8[/TD]

[TD="align: right"]20[/TD]

[TD="align: right"]13[/TD]

[TD="align: right"]13[/TD]

[TD="align: right"]33[/TD]

[TD="align: right"]13[/TD]

[TD="align: right"]7[/TD]

[TD="align: right"]26[/TD]

[TD="align: right"]12[/TD]

[TD="align: right"]6[/TD]

[TD="align: right"]20[/TD]

[TD="align: right"]19[/TD]

[TD="align: right"]11[/TD]

[TD="align: right"]20[/TD]

[TD="align: right"]11[/TD]

[TD="align: right"]13[/TD]

[TD="align: right"]23[/TD]

[TD="align: right"]13[/TD]

[TD="align: right"]4[/TD]

[TD="align: right"]32[/TD]

[TD="align: right"]6[/TD]

[TD="align: right"]5[/TD]

[TD="align: right"]24[/TD]

[/TABLE]