Greater Than and Less than ZERO

frankee_gee

Board Regular
Joined
Mar 3, 2008
Messages
144
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello MRE, looking for assistance with the following formula(s). Need to count the Difference Columns where it's greater or less than ZERO.

I came up with the following formulas below.



1 .
Excel Formula:
=COUNTIFS(E3:E30:H3:H30:K3:K30:N3:N30,"<0")+COUNTIFS(E3:E30:H3:H30:K3:K30:N3:N30,">0")
= 91 (total combined, expecting 11)


2.
Excel Formula:
=COUNTIFS(E3:E30:H3:H30:K3:K30:N3:N30,"<0")
= 3 (correct)


3.
Excel Formula:
=COUNTIFS(E3:E30:H3:H30:K3:K30:N3:N30,">0")
= 88 (expecting 8)

Would like to understand why ">0" is returning a bad number.


EnteredCapturedDIFFERENCEEnteredCapturedDIFFERENCEEnteredCapturedDIFFERENCEEnteredCapturedDIFFERENCE
8067-1324240000000
0003232032320000
0004040040400000
1101100116116032320000
9195499990000000
4747040400000000
11011881401400000000
2730327270000000
606009099900033330
1331330141141000012120
0003030030300000
200200019219200001721720
12312302362360000000
87104178484000018180
200200040040004004000000
000169169016918011000
6060060600000000
7070077847000000
7053-1748480000000
8787052520000000
14714701801800000000
6060072720000000
1101100120136169696016160
114114055550000000
3333028280000000
6053-750500000000
3434020200000000
6767030300000000

Any help would be appreciated.

Thank you in advance,

Frankee Gee
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
You cannot use ranges like that, this
Excel Formula:
=COUNTIFS(E3:E30:H3:H30:K3:K30:N3:N30,">0")
is the same as
Excel Formula:
=COUNTIFS(E3:N30,">0")
 
Upvote 0
How about
Excel Formula:
=SUMPRODUCT((E2:N2="Difference")*(E3:N30<>0))
 
Upvote 0
Solution
You cannot use ranges like that, this
Excel Formula:
=COUNTIFS(E3:E30:H3:H30:K3:K30:N3:N30,">0")
is the same as
Excel Formula:
=COUNTIFS(E3:N30,">0")
Ah, yes. I overlooked that range requirement (Monday Morning strikes again!).

To use COUNTIFS, you would need to do 4 separate COUNTIFS added together (or use the simpler SUMPRODUCT Fluff posted for you).
 
Upvote 0
You cannot use ranges like that, this
Excel Formula:
=COUNTIFS(E3:E30:H3:H30:K3:K30:N3:N30,">0")
is the same as
Excel Formula:
=COUNTIFS(E3:N30,">0")
Fluff reason I can't use that range is due to the fact it would include columns I don't want to count. thanks for the reply.
 
Upvote 0
How about
Excel Formula:
=SUMPRODUCT((E2:N2="Difference")*(E3:N30<>0))
Fluff - yeap.! this did it alright. the help is much appreciated. I can't recall you ever using this formula before. Thanks again Frankee. :)
 
Upvote 0
Ah, yes. I overlooked that range requirement (Monday Morning strikes again!).

To use COUNTIFS, you would need to do 4 separate COUNTIFS added together (or use the simpler SUMPRODUCT Fluff posted for you).
Joe4 - correct, this worked perfectly. thanks again!
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
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