Counting number of cells that satisfy a range of conditions

Wintermelon96

New Member
Joined
Oct 4, 2019
Messages
1
Hi all,

Really stuck in a project right now - help is much appreciated!!

Let's assume I have 7 columns of data, A/B/C/D/E/F/G.

What I need is (the count of) the number of rows whereby:

Column A must have a value of at least 1.
Column B must be <= Column C minus the sum of Columns D/E/F in the same row.
Column B must be > Column C minus Column G.

Additionally, it would be extra nice if the code would be such that I can drag it to the right and keep everything except Column C (which is in fact on a different sheet, and is the variable that I intend to change horizontally).

I have tried searching for sumproduct / countif functions, but haven't had success. Thanks so much in advance!

Cheers
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi @★ Wintermelon96, welcome to the forum!

I hope this helps you.

=SUMPRODUCT(($A$2:$A$10>=1)*($B$2:$B$10<=(Sheet1!C$2:C$10-($D$2:$D$10+$E$2:$E$10+$F$2:$F$10))*($B$2:$B$10>(Sheet1!C$2:C$10-$G$2:$G$10))))
 
Upvote 0

Forum statistics

Threads
1,214,921
Messages
6,122,280
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top