Counting

eng_jamal

New Member
Joined
Oct 5, 2017
Messages
22
Hello I would ask you how can count many value in many column by using a conditions
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I used it but when countifs don't work
For example:
I have range for A to g cells how can count cells which contain 0 or 1 in the range
 
Upvote 0
A
B
C
1
1​
criteria
2
0​
1​
3
2​
0​
4
3​
5
4​
4​
6
0​
7
1​

<tbody>
</tbody>

c5=SUMPRODUCT(COUNTIF(A1:A7,C2:C3))
 
Upvote 0
Thanks friends
I have another question if I have ex:
I have range of cells in many colunms and I want to count the cells which contain word "center" in range a2 to a100 and cells b to g which contain 0
 
Upvote 0
Your question is slightly ambiguous.

If you want to add number of cells containing center to number of all cells containing 0 use =COUNTIF(A2:A100,"*center*")+COUNTIF(B:G,0)

If you want to add all the cells that contain 0 if the respective row contains the word center use =COUNTIFS(A:A,"*center*",B:B,0)+COUNTIFS(A:A,"*center*",C:C,0)+COUNTIFS(A:A,"*center*",D:D,0)+COUNTIFS(A:A,"*center*",E:E,0)+COUNTIFS(A:A,"*center*",F:F,0)+COUNTIFS(A:A,"*center*",G:G,0)

It's a bit longwinded but gets the job done. It can be neater with an array formula but I tend to stay away from these as they have the capacity to cause problems if the spreadsheet is available to multiple users.
 
Upvote 0
Thanks a lot
I would like to know how can formula be if use array I want short formula
Thanks in advance
 
Upvote 0
Maybe this

=SUMPRODUCT(ISNUMBER(SEARCH("center",A2:A100))*(B2:G100=0)*(B2:G100<>""))

M.
 
Upvote 0

Forum statistics

Threads
1,215,261
Messages
6,123,943
Members
449,134
Latest member
NickWBA

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