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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A
[/TD]
[TD]
B
[/TD]
[TD]
C
[/TD]
[/TR]
[TR]
[TD]
1
[/TD]
[TD]
1​
[/TD]
[TD][/TD]
[TD]criteria[/TD]
[/TR]
[TR]
[TD]
2
[/TD]
[TD]
0​
[/TD]
[TD][/TD]
[TD]
1​
[/TD]
[/TR]
[TR]
[TD]
3
[/TD]
[TD]
2​
[/TD]
[TD][/TD]
[TD]
0​
[/TD]
[/TR]
[TR]
[TD]
4
[/TD]
[TD]
3​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
5
[/TD]
[TD]
4​
[/TD]
[TD][/TD]
[TD]
4​
[/TD]
[/TR]
[TR]
[TD]
6
[/TD]
[TD]
0​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
7
[/TD]
[TD]
1​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

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
Maybe this

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

M.
 
Upvote 0

Forum statistics

Threads
1,223,975
Messages
6,175,749
Members
452,667
Latest member
vanessavalentino83

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