COUNTIFS Multiple Criteria

lpost1214

New Member
Joined
Nov 9, 2016
Messages
6
Hello,

I am trying to write a COUNTIFS formula to include a criteria that will subtract a value in column P from the row below in column I and if the result is less than 0 then it should be counted, but I can't seem to write this correct so that excel will accept this. Any help is appreciated. Thanks!

IF(B4="","",COUNTIFS($B$4:B4,B4,$O$4:O4,"=0",$P3-$I4, "< 0")*(B4=B4))

<tbody>
</tbody><colgroup><col></colgroup>
<colgroup><col width="65" style="width: 49pt; mso-width-source: userset; mso-width-alt: 2377;"> <tbody> </tbody>

<tbody>
</tbody><colgroup><col></colgroup>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
That P3toI4 operation you're trying to include is a range of the wrong size. Excel's Help feature for function COUNTIFS declares, "Each additional range must have the same number of rows and columns as the criteria_range1 argument. The ranges do not have to be adjacent to each other."

You probable need an array formula to complete this task. If you provide some sample data together with expected outcome we can conduct experiments.
 
Upvote 0

Forum statistics

Threads
1,215,537
Messages
6,125,386
Members
449,221
Latest member
DFCarter

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