CountIf Multiple Criteria in Different Arrays

moppenhe

New Member
Joined
May 28, 2009
Messages
29
I am working with two different a data about properties, and I am trying to count:
-the number of cells in an array in that match a given criteria
-and of those cells, how many match a criteria for a 2nd array in the data set

Array 1 (size):
70,000 | 52,000 | 60,000 | 30,000 | 75,000 | 25,000 | 19,000 | 45,000

Array 2 (expense/per square foot):
0 | .24 | .54 | .1 | 0 | .06 | .09 | .4

So from these two arrays, I would like to count all the cells in Array 1 that are between 50,000 and 100,000, but I only when them to be counted if their corresponding Expense/PSF (Array 2) is greater than 0.

So in this example both the 70,000 in the 1st column and the 75,000 in the 5th column would not be counted because they correspond to 0 expenses.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi and Welcome to the board,

Assuming the data is in A1:H2

I2

=SUMPRODUCT(--(A1:H1>=50000),--(A1:H1<=100000),--(A2:H2>0))
 
Upvote 0
Thank you so much for the quick response! I have seen the "--" show up on different excel message boards around the web, what do they do?
 
Upvote 0

Forum statistics

Threads
1,216,058
Messages
6,128,538
Members
449,456
Latest member
SammMcCandless

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