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))
[TABLE="width: 65"]
<tbody>[TR]
[TD][TABLE="width: 49"]
<colgroup><col width="65" style="width: 49pt; mso-width-source: userset; mso-width-alt: 2377;"> <tbody>[TR]
[TD="class: xl65, width: 65, bgcolor: transparent"][TABLE="width: 65"]
<tbody>[TR]
[TD][/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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