CountIFS Assistance Please

Taff

Board Regular
Joined
Mar 31, 2004
Messages
151
Office Version
  1. 365
Platform
  1. Windows
  2. Web
I have this formula which returns a correct result:
=COUNTIFS(E0!BP2:BP2910,">2.5",E0!AZ2:AZ2910,">2.2",E0!AZ2:AZ2910,"<2.7")

When I substitute the exact criteria with a cell reference, with the same criteria in, I get a 0
=COUNTIFS(E0!BP2:BP2910,">A4",E0!AZ2:AZ2910,">B4",E0!AZ2:AZ2910,"<C4")

I am trying to build a query where I can quickly point/change to the criteria without having to go in and change each formula.

Any ideas how to achieve would be appreciated.

Thanks

Taff
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi,

Your values in A4, B4, and the missing third, are they manually entered or from a formula?
Your original formula using 2.5 is a number, but is different if A4 is "2.5" (which is Text).
 
Last edited:
Upvote 0
they are manually entered.

the countifs formula appears to enter them as text automatically. I have tried removing the "" but it won't let me.

well spotted the formula not working is:
=COUNTIFS(E0!BP2:BP2910,">A4",E0!AZ2:AZ2910,">B4",E0!AZ2:AZ2910,"<C4")
 
Upvote 0
they are manually entered.

the countifs formula appears to enter them as text automatically. I have tried removing the "" but it won't let me.

What do you mean it won't let you?
 
Upvote 0
=COUNTIFS(E0!BP2:BP2910,">"&A4,E0!AZ2:AZ2910,">"&B4,E0!AZ2:AZ2910,"<"&C4)

where A4 = 2.5, B4 = 2.2, and C4 = 2.7, would produce the same result as:

=COUNTIFS(E0!BP2:BP2910,">2.5",E0!AZ2:AZ2910,">2.2",E0!AZ2:AZ2910,"<2.7")


 
Last edited:
Upvote 0
Aladin's correct, you have your "" quotes misplaced in your formula.
 
Upvote 0
You're welcome, glad you have it working.
 
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