COUNTIFS for One Column Greater than Another

jonathanwang003

Board Regular
Joined
May 9, 2014
Messages
123
Hi All,

I am stuck and am in need of help. I need to create a COUNTIFS statement for when B:B > A:A and where A:A>0.

I know this works to count if B:B < A:A...

=SUMPRODUCT(--(B:B>A:A))

But how do I add in another criteria to the formula?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
How about
=SUMPRODUCT((B2:B6>A2:A6)*(A2:A6>0))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
@Fluff, would you maybe know how to do the same, but to count only if column C:C is year 2022?

I am going to make chart which will do counts per year with 4 buttons, where FullSeriesCollection will be used.

I am sorry for opening old post.
 
Upvote 0
Assuming col C is dates then try
Excel Formula:
=SUMPRODUCT((B2:B6>A2:A6)*(A2:A6>0)*(YEAR(C2:C6)=2022))
 
Upvote 0
I've tried something like this, but it did not work.
=SUM(AND(IF(R2:R15>F2:F15,1),IF(YEAR(C2:C15)=2025,1)))}

Thank you very much !
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

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