Help with Countifs with multiple criteria

trone77

Board Regular
Joined
Dec 28, 2009
Messages
137
Wondering if there is a way to execute the formula below using countifs?


=countifs('[AY.xlsx]1998-2015'!$W$1:$W$8766,$M5)+countifs('[AY.xlsx]1998-2015'!$W$1:$W$8766,$N5),'[AY.xlsx]1998-2015'!$C$1:$C$8766,$Q5,'[AY.xlsx]1998-2015'!$X$1:$X$8766,$O5,'[AY.xlsx]1998-2015'!$Y$1:$Y$8766,U$3,'[AY.xlsx]1998-2015'!$Z$1:$Z$8766,$AH$2,'[AY.xlsx]1998-2015'!$AA$1:$AA$8766>=$AZ$2,'[AY.xlsx]1998-2015'!$AA$1:$AA$8766,$AZ$3))
 

Some videos you may like

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.

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,467
Office Version
  1. 365
Platform
  1. Windows
The last bracket and the one after $N5 shouldn't be there, delete those and it should work.
 

trone77

Board Regular
Joined
Dec 28, 2009
Messages
137
The last bracket and the one after $N5 shouldn't be there, delete those and it should work.

The last bracket and the one after $N5 shouldn't be there, delete those and it should work.

Thanks for the reply. However after removing the bracket after $N5 and the one at the end, there still returns the error too few arguments. Is there alternative formula without an array that would work?
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,467
Office Version
  1. 365
Platform
  1. Windows
Not sure why you're seeing a 'too few arguments' error, there is a syntax error that I missed.

=countifs('[AY.xlsx]1998-2015'!$W$1:$W$8766,$M5)+countifs('[AY.xlsx]1998-2015'!$W$1:$W$8766,$N5,'[AY.xlsx]1998-2015'!$C$1:$C$8766,$Q5,'[AY.xlsx]1998-2015'!$X$1:$X$8766,$O5,'[AY.xlsx]1998-2015'!$Y$1:$Y$8766,U$3,'[AY.xlsx]1998-2015'!$Z$1:$Z$8766,$AH$2,'[AY.xlsx]1998-2015'!$AA$1:$AA$8766">="&$AZ$2,'[AY.xlsx]1998-2015'!$AA$1:$AA$8766,$AZ$3)

Some of the criteria look a bit dubious, as far as I can see the syntax is now correct, but whether or not the formula will give you the result that you want is something totally different.

I suspect that $AZ$3 at the end of the formula should actually be "<="&$AZ$3
 

Watch MrExcel Video

Forum statistics

Threads
1,127,620
Messages
5,625,894
Members
416,141
Latest member
Bartek9q

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
Top