Countifs not returning any values...

albertc30

Well-known Member
Joined
May 7, 2012
Messages
1,091
Office Version
  1. 2019
Platform
  1. Windows
Hi all.

Formula below is, to my eyes correct in the sense it will evaluate data and count anything it finds, greater than -5.0% and +5.0%.

=COUNTIFS(B21:B29,"MIN",U21:U29,"<-0.05",U21:U29,">0.05")

Even though I have 4 values that meet the criteria, no results, or errors, are returned.

Should I quit now?

Any help is trully appreciated.

Regards,
Albert
 
Albert

In post #4 you said 'between', I would assume that would mean between -5% and 5%, not less than -5% or more than 5%.
Hmm, yes, I had missed post #7. It certainly seems to contradict post #4. :confused:
 
Upvote 0

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Sorry Peter.

Column B is all MIN apart from line 29 which is empty.
 
Upvote 0
Again, my bad, sorry.

I got confused with my own doings as I have formulas for both.

For the between & equal to -5% & +5% I got;
=COUNTIFS(B21:B29,"MIN",U21:U29,">=-0.05",U21:U29,"<=0.05")
The above formula works fine.

For the higher than -5% & +5% I got;
=COUNTIFS(B21:B29,"MIN",U21:U29,">0.05")+COUNTIFS(B21:B29,"MIN",U21:U29,"<-0.05")
The above works fine. I was now wondering if there's any way to make this formula shorter.

I also tried to do it trying to use 3 ranges but then it failled to return a value. In the end I just used countifs + countifs.

Apologies again for you all kind good people, and many thanks for helping, much appreciated.

Any more sugestions please send them my way.

Regards,
Albert
 
Upvote 0
For the between & equal to -5% & +5% I got;
=COUNTIFS(B21:B29,"MIN",U21:U29,">=-0.05",U21:U29,"<=0.05")
The above formula works fine.

Any more sugestions please send them my way.
I don't know where your formulas are located but say that first on is in cell A21, then try this for the other result:

=COUNTIFS(B21:B29,"MIN",U21:U29,"<>")-A21

I've assumed that cells in U21:U29 contain numbers or are blank.
 
Upvote 0
For the higher than -5% & +5% I got;
=COUNTIFS(B21:B29,"MIN",U21:U29,">0.05")+COUNTIFS(B21:B29,"MIN",U21:U29,"<-0.05")
The above works fine. I was now wondering if there's any way to make this formula shorter.

Try
=SUM(COUNTIFS(B21:B29,"MIN",U21:U29,{">0.05","<-0.05"}))
 
Upvote 0
I don't know where your formulas are located but say that first on is in cell A21, then try this for the other result:

=COUNTIFS(B21:B29,"MIN",U21:U29,"<>")-A21

I've assumed that cells in U21:U29 contain numbers or are blank.

I see what you are saying. I have done it at some point and it works.
 
Upvote 0

Forum statistics

Threads
1,215,095
Messages
6,123,072
Members
449,093
Latest member
ripvw

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