Countif conditionally?

spacely

Board Regular
Joined
Oct 26, 2007
Messages
248
Hi,

I have 2 columns of text. There may or may not be empties in either column. And some rows may be hidden. So, I need to count up the number of times when there IS an entry in the 1st column (A) but NO entry in the next column over (B).

Thanks in advance...

Dave
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
=COUNTIFS(A1:A17,"<>""",B1:B17,"")

This one worked for me.

That one returns 29, instead of 6, probably because a bunch of rows are filtered?

just try:
dave1 bill1
bill2
dave3 bill3
dave4 bill4
dave5
dave6 bill6


And filter out some blank rows, ....

Does that work?
 
Upvote 0
...it didn't paste for you right, but put a space or tab before that 1st bill2, and after that 5th dave5 :)
 
Upvote 0
That one returns 29, instead of 6, probably because a bunch of rows are filtered?

just try:
dave1 bill1
bill2
dave3 bill3
dave4 bill4
dave5
dave6 bill6


And filter out some blank rows, ....

Does that work?

...it didn't paste for you right, but put a space or tab before that 1st bill2, and after that 5th dave5 :)

Row\Col
A​
B​
2​
dave1bill1
3​
bill2
4​
dave3bill3
5​
dave4bill4
6​
dave5
7​
dave6bill6

Counting the text occurrences in A while B is empty or blank as you asked for in your initial post, would yield 1 as result. Is this not what you had in mind?
 
Upvote 0
Yes, but now use excel's filters to filter out row 4 with dave3. What's the answer? And then use the filters to filter out row 6 with dave5. What's the answer then? Answer should depend on the filter...so it works only on what's visible....
 
Upvote 0

Forum statistics

Threads
1,214,587
Messages
6,120,406
Members
448,958
Latest member
Hat4Life

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